This commit was manufactured by cvs2svn to create tag
'carlton_dictionary-20021223-merge'.

Sprout from cagney-unwind-20030108-branch 2003-01-09 20:50:26 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'cagney-'
Cherrypick from master 2002-12-23 17:07:28 UTC Daniel Jacobowitz <drow@false.org> '	* config/pa/nm-hppab.h: Delete duplicate CANNOT_STORE_REGISTER decl.':
    ChangeLog
    Makefile.def
    Makefile.in
    Makefile.tpl
    bfd/ChangeLog
    bfd/Makefile.am
    bfd/Makefile.in
    bfd/aoutx.h
    bfd/archures.c
    bfd/bfd-in2.h
    bfd/coff64-rs6000.c
    bfd/config.bfd
    bfd/configure
    bfd/configure.in
    bfd/cpu-mips.c
    bfd/elf.c
    bfd/elf32-hppa.c
    bfd/elf32-ip2k.c
    bfd/elf32-m68k.c
    bfd/elf32-xstormy16.c
    bfd/elf64-alpha.c
    bfd/elfn32-mips.c
    bfd/elfxx-mips.c
    bfd/libbfd.h
    bfd/reloc.c
    bfd/targets.c
    bfd/version.h
    config.guess
    config.sub
    config/ChangeLog
    config/mh-a68bsd
    config/mh-apollo68
    config/mh-cxux
    config/mh-dgux386
    config/mh-hp300
    config/mh-hpux
    config/mh-hpux8
    config/mh-interix
    config/mh-irix5
    config/mh-irix6
    config/mh-lynxrs6k
    config/mh-ncr3000
    config/mh-ncrsvr43
    config/mh-necv4
    config/mh-openedition
    config/mh-riscos
    config/mh-sco
    config/mh-solaris
    config/mh-sysv
    config/mh-sysv4
    config/mh-sysv5
    config/mt-aix43
    configure
    configure.in
    etc/ChangeLog
    etc/Makefile.in
    gdb/ChangeLog
    gdb/MAINTAINERS
    gdb/Makefile.in
    gdb/NEWS
    gdb/README
    gdb/TODO
    gdb/acconfig.h
    gdb/acinclude.m4
    gdb/aclocal.m4
    gdb/ada-lang.c
    gdb/alpha-linux-tdep.c
    gdb/alpha-osf1-tdep.c
    gdb/alpha-tdep.c
    gdb/alpha-tdep.h
    gdb/alphafbsd-tdep.c
    gdb/alphanbsd-tdep.c
    gdb/arch-utils.c
    gdb/arm-linux-tdep.c
    gdb/arm-tdep.c
    gdb/arm-tdep.h
    gdb/armnbsd-tdep.c
    gdb/avr-tdep.c
    gdb/ax-gdb.c
    gdb/blockframe.c
    gdb/breakpoint.c
    gdb/buildsym.c
    gdb/buildsym.h
    gdb/c-typeprint.c
    gdb/c-valprint.c
    gdb/charset.c
    gdb/cli/cli-decode.h
    gdb/config.in
    gdb/config/h8500/tm-h8500.h
    gdb/config/i386/go32.mh
    gdb/config/m32r/tm-m32r.h
    gdb/config/m68k/tm-apollo68b.h
    gdb/config/m68k/tm-m68kv4.h
    gdb/config/m68k/tm-monitor.h
    gdb/config/m68k/tm-os68k.h
    gdb/config/m68k/tm-vx68.h
    gdb/config/mn10200/tm-mn10200.h
    gdb/config/pa/tm-hppa.h
    gdb/config/pa/tm-hppah.h
    gdb/config/sparc/tm-sparc.h
    gdb/config/sparc/tm-sparclite.h
    gdb/configure
    gdb/configure.host
    gdb/configure.in
    gdb/configure.tgt
    gdb/corefile.c
    gdb/cris-tdep.c
    gdb/d10v-tdep.c
    gdb/defs.h
    gdb/demangle.c
    gdb/disasm.c
    gdb/doc/ChangeLog
    gdb/doc/fdl.texi
    gdb/doc/gdb.texinfo
    gdb/doc/gdbint.texinfo
    gdb/doc/stabs.texinfo
    gdb/dwarf2cfi.c
    gdb/dwarfread.c
    gdb/elfread.c
    gdb/eval.c
    gdb/exec.c
    gdb/expprint.c
    gdb/expression.h
    gdb/f-typeprint.c
    gdb/findvar.c
    gdb/frame.c
    gdb/frame.h
    gdb/frv-tdep.c
    gdb/gcore.c
    gdb/gdb_dirent.h
    gdb/gdb_mbuild.sh
    gdb/gdb_regex.h
    gdb/gdbarch.c
    gdb/gdbarch.h
    gdb/gdbarch.sh
    gdb/gdbserver/ChangeLog
    gdb/gdbserver/Makefile.in
    gdb/gdbserver/linux-m68k-low.c
    gdb/gdbtypes.c
    gdb/gdbtypes.h
    gdb/gnu-v2-abi.c
    gdb/h8300-tdep.c
    gdb/hppa-hpux-tdep.c
    gdb/hppa-tdep.c
    gdb/hpread.c
    gdb/i386-linux-tdep.c
    gdb/i386-sol2-tdep.c
    gdb/i386-tdep.c
    gdb/i386-tdep.h
    gdb/i386bsd-tdep.c
    gdb/i386gnu-tdep.c
    gdb/i386ly-tdep.c
    gdb/i386nbsd-tdep.c
    gdb/i386obsd-tdep.c
    gdb/ia64-tdep.c
    gdb/inferior.h
    gdb/infrun.c
    gdb/inftarg.c
    gdb/language.c
    gdb/language.h
    gdb/lin-lwp.c
    gdb/linespec.c
    gdb/m32r-tdep.c
    gdb/m68hc11-tdep.c
    gdb/m68k-tdep.c
    gdb/maint.c
    gdb/mcore-tdep.c
    gdb/mdebugread.c
    gdb/mi/ChangeLog
    gdb/mi/mi-cmd-env.c
    gdb/minsyms.c
    gdb/mips-linux-tdep.c
    gdb/mips-tdep.c
    gdb/mn10200-tdep.c
    gdb/mn10300-tdep.c
    gdb/ns32k-tdep.c
    gdb/ns32k-tdep.h
    gdb/ns32knbsd-tdep.c
    gdb/objc-exp.y
    gdb/objc-lang.c
    gdb/osabi.c
    gdb/osabi.h
    gdb/ppc-linux-tdep.c
    gdb/ppc-tdep.h
    gdb/ppcnbsd-tdep.c
    gdb/regformats/reg-m68k.dat
    gdb/rs6000-tdep.c
    gdb/s390-tdep.c
    gdb/scm-lang.c
    gdb/scm-lang.h
    gdb/sh-tdep.c
    gdb/sh-tdep.h
    gdb/shnbsd-tdep.c
    gdb/somsolib.c
    gdb/somsolib.h
    gdb/sparc-tdep.c
    gdb/stabsread.c
    gdb/stabsread.h
    gdb/symfile.c
    gdb/symtab.c
    gdb/symtab.h
    gdb/testsuite/ChangeLog
    gdb/testsuite/Makefile.in
    gdb/testsuite/configure
    gdb/testsuite/configure.in
    gdb/testsuite/gdb.arch/Makefile.in
    gdb/testsuite/gdb.arch/configure
    gdb/testsuite/gdb.arch/configure.in
    gdb/testsuite/gdb.asm/Makefile.in
    gdb/testsuite/gdb.asm/configure
    gdb/testsuite/gdb.asm/configure.in
    gdb/testsuite/gdb.base/Makefile.in
    gdb/testsuite/gdb.base/callfuncs.exp
    gdb/testsuite/gdb.base/completion.exp
    gdb/testsuite/gdb.base/configure
    gdb/testsuite/gdb.base/configure.in
    gdb/testsuite/gdb.base/maint.exp
    gdb/testsuite/gdb.base/miscexprs.c
    gdb/testsuite/gdb.base/store.exp
    gdb/testsuite/gdb.base/whatis.exp
    gdb/testsuite/gdb.c++/Makefile.in
    gdb/testsuite/gdb.c++/annota2.exp
    gdb/testsuite/gdb.c++/casts.exp
    gdb/testsuite/gdb.c++/configure
    gdb/testsuite/gdb.c++/configure.in
    gdb/testsuite/gdb.disasm/Makefile.in
    gdb/testsuite/gdb.disasm/configure
    gdb/testsuite/gdb.disasm/configure.in
    gdb/testsuite/gdb.java/Makefile.in
    gdb/testsuite/gdb.java/configure
    gdb/testsuite/gdb.java/configure.in
    gdb/testsuite/gdb.mi/Makefile.in
    gdb/testsuite/gdb.mi/config.in
    gdb/testsuite/gdb.mi/configure
    gdb/testsuite/gdb.mi/configure.in
    gdb/testsuite/gdb.mi/gdb669.exp
    gdb/testsuite/gdb.mi/mi-pthreads.exp
    gdb/testsuite/gdb.mi/mi1-pthreads.exp
    gdb/testsuite/gdb.threads/Makefile.in
    gdb/testsuite/gdb.threads/config.in
    gdb/testsuite/gdb.threads/configure
    gdb/testsuite/gdb.threads/configure.in
    gdb/testsuite/gdb.threads/gcore-thread.exp
    gdb/testsuite/gdb.threads/killed.exp
    gdb/testsuite/gdb.threads/linux-dp.exp
    gdb/testsuite/gdb.threads/print-threads.exp
    gdb/testsuite/gdb.threads/pthreads.exp
    gdb/testsuite/gdb.threads/schedlock.exp
    gdb/testsuite/gdb.trace/Makefile.in
    gdb/testsuite/gdb.trace/configure.in
    gdb/testsuite/lib/gdb.exp
    gdb/tracepoint.c
    gdb/typeprint.c
    gdb/utils.c
    gdb/v850-tdep.c
    gdb/valarith.c
    gdb/valops.c
    gdb/value.h
    gdb/values.c
    gdb/vax-tdep.c
    gdb/vax-tdep.h
    gdb/version.in
    gdb/x86-64-linux-nat.c
    gdb/x86-64-linux-tdep.c
    gdb/x86-64-tdep.c
    gdb/xstormy16-tdep.c
    gdb/z8k-tdep.c
    include/ChangeLog
    include/dis-asm.h
    include/elf/ChangeLog
    include/elf/common.h
    include/elf/mips.h
    include/gdb/ChangeLog
    include/gdb/sim-h8300.h
    include/opcode/ChangeLog
    include/opcode/h8300.h
    include/opcode/mips.h
    libiberty/ChangeLog
    libiberty/Makefile.in
    opcodes/ChangeLog
    opcodes/Makefile.am
    opcodes/Makefile.in
    opcodes/configure
    opcodes/configure.in
    opcodes/disassemble.c
    opcodes/mips-dis.c
    opcodes/mips-opc.c
    opcodes/ppc-opc.c
    readline/ChangeLog.gdb
    readline/support/config.guess
    readline/support/config.sub
    sim/common/ChangeLog
    sim/common/run.c
    sim/h8300/ChangeLog
    sim/h8300/compile.c
    sim/h8300/inst.h
    sim/mips/ChangeLog
    sim/mips/Makefile.in
    sim/mips/configure
    sim/mips/configure.in
    sim/mips/mips.igen
    sim/mips/sim-main.h
    sim/mips/vr.igen
    src-release
Cherrypick from cygnus 1999-05-03 07:29:11 UTC Richard Henderson <rth@redhat.com> '19990502 sourceware import':
    config/mh-aix386
    config/mh-delta88
    config/mt-v810
Delete:
    bfd/cpu-iq2000.c
    bfd/cpu-msp430.c
    bfd/elf32-iq2000.c
    bfd/elf32-msp430.c
    config/acx.m4
    gdb/config/mips/linux64.mt
    gdb/config/mips/tm-linux64.h
    gdb/testsuite/config.hin
    gdb/testsuite/gdb.base/detach.exp
    gdb/testsuite/gdb.base/psymtab.exp
    gdb/testsuite/gdb.base/psymtab1.c
    gdb/testsuite/gdb.base/psymtab2.c
    include/elf/iq2000.h
    include/elf/msp430.h
    include/opcode/msp430.h
    opcodes/iq2000-asm.c
    opcodes/iq2000-desc.c
    opcodes/iq2000-desc.h
    opcodes/iq2000-dis.c
    opcodes/iq2000-ibld.c
    opcodes/iq2000-opc.c
    opcodes/iq2000-opc.h
    opcodes/msp430-dis.c
diff --git a/ChangeLog b/ChangeLog
index 5545640..0f57aaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,146 +1,3 @@
-2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
-
-	* Makefile.tpl (BASE_FLAGS_TO_PASS): Also pass DESTDIR.
-	(install-info, dir.info): Prepend $(DESTDIR) to $(infodir).
-	* Makefile.in: Regenerate.
-
-2003-01-09  Alexandre Oliva  <aoliva@redhat.com>
-
-	* configure.in: Remove Makefile in build, host and target modules
-	unless configure was run with --no-recursion.
-	* configure: Rebuilt.
-
-2003-01-08  Chris Demetriou  <cgd@broadcom.com>
-
-	* config.guess: Update to 2003-01-03 version.
-	* config.sub: Update to 2003-01-03 version.
-
-2003-01-07  Christopher Faylor  <cgf@redhat.com>
-
-	* configure: Regenerate with proper autoconf 2.13.
-
-2003-01-07  Christopher Faylor  <cgf@redhat.com>
-
-        * configure.in: Add AC_PREREQ for consistency.
-        * configure: Regenerate.
-
-2003-01-06  Andrew Cagney  <ac131313@redhat.com>
-
-	* configure.in (GDB_TK): Add tcl directories conditional on
-	gdb/gdbtk directory being present.
-	* configure: Regenerate.
-	
-2003-01-04 John David Anglin  <dave.anglin@nrc.ca>
-
-	* configure.in (LD): Improve test for gcc.  Try to set LD to the ld used
-	by gcc if LD is not defined and we are not doing a Canadian Cross.
-	* configure: Rebuilt.
-
-2003-01-01  Daniel Jacobowitz  <drow@mvista.com>
-
-	* src-release (ETC_SUPPORT): Add fdl.texi and texi2pod.pl.
-
-2002-12-31  Tom Tromey  <tromey@redhat.com>
-
-	* Makefile.in: Rebuilt.
-	* Makefile.def (target_modules) [libffi]: Allow installation.
-
-2002-12-31  Andreas Schwab  <schwab@suse.de>
-
-	* configure.in: Fix use of $program_transform_name.
-	* configure: Regenerated.
-
-2002-12-30  Daniel Jacobowitz  <drow@mvista.com>
-
-	* configure.in (baseargs): Don't remove first configure argument.
-	* configure: Regenerated.
-
-2002-12-29  Alexandre Oliva  <aoliva@redhat.com>
-
-	* Makefile.tpl (local-distclean): Don't remove...
-	(multilib.ts): ... this.  Moved into...
-	(multilib.out): ... this.  Don't use sub-make.
-	($(BUILD_SUBDIR)/[+module+]/Makefile, [+module+]/Makefile,
-	$(TARGET_SUBDIR)/[+module+]/Makefile, gcc/Makefile): Moved into...
-	(configure-build-[+module+], configure-[+module+],
-	configure-target-[+module+], configure-gcc): ... these.  Test
-	for Makefile existence.  Drop config.status from dependencies.
-	* Makefile.in: Rebuilt.
-	* configure.in: Move gcc-version-trigger to the end of
-	ac_configure_args.  Add comments to maybedep.tmp and
-	serdep.tmp.  Introduce --disable-serial-configure.  Remove
-	nonopt from baseargs, matching and removing corresponding
-	whitespace while at it.
-	* configure: Rebuilt.
-
-2002-12-28  Alexandre Oliva  <aoliva@redhat.com>
-
-	* configure.in (host_configargs): Replace reference to
-	no-longer-defined buildopts with --build=${build_alias}.
-	* configure: Rebuilt.
-
-2002-12-28  Alexandre Oliva  <aoliva@redhat.com>
-
-	* Makefile.tpl ($(NOTPARALLEL)): Move to the end.  Bring uses of
-	program_transform_name to standard idiom.
-	(AUTOGEN, AUTOCONF): Define.
-	(Makefile.in): Use $(AUTOGEN).
-	(Makefile): Depend on config.status, and use autoconf-style rule to
-	build it.  Move original commands to...
-	(config.status): ... this new target.
-	(configure): Add $(srcdir).  Depend on config/acx.m4.  Use
-	$(AUTOCONF).
-	* Makefile.in: Rebuilt.
-
-2002-12-28  Nathanael Nerode  <neroden@gcc.gnu.org>
-
-	* Makefile.tpl: Fix dramatic bustage due to change in
-	program_transform_name.
-	* Makefile.in: Regenerate.
-
-	* configure.in: Remove unnecessary PATH setting.
-	* configure: Regnerate.
-
-	* configure.in: Don't default to unprefixed tools unless
-	the native tools will work.
-	* configure: Regenerate.
-
-	* configure.in: Convert to autoconf script.  Blow away lots
-	of now-redundant Makefile fragments.
-	* configure: Generate using Autoconf.
-	* Makefile.tpl: Rewrite to reflect autoconfiscation.
-	* Makefile.in: Regenerate.
-
-2002-12-27  Nathanael Nerode  <neroden@gcc.gnu.org>
-
-	* configure: Remove unneeded 'export's.  Make CC_FOR_TARGET, 
-	CXX_FOR_TARGET, GCJ_FOR_TARGET substituted in configure.in only.
-
-	* ChangeLog: Move a couple of entries from here to winsup/cygwin, 
-	where they belong.
-
-2002-12-24  Andreas Schwab  <schwab@suse.de>
-
-	* Makefile.tpl (multilib.out): Fix missing space.
-	* Makefile.in: Regenerate.
-
-2002-12-23  Nathanael Nerode  <neroden@gcc.gnu.org>
-
-	* Makefile.tpl: Use shared multilib.out.  Use move-if-change for it.
-	Convert (cd foo; make) to (cd foo && make).  Clean up multilib.out.
-	* Makefile.in: Regenerate.
-	* configure.in: Remove unnecessary leftovers.
-
-2002-12-22  Geoffrey Keating  <geoffk@apple.com>
-
-	* config/mt-aix43: Delete.
-
-2002-12-21  Geoffrey Keating  <geoffk@apple.com>
-
-	* configure.in (extra_ranlibflags_for_target): New variable.
-	(*-*-darwin): Add -c to ranlib commands.
-	* configure (tooldir): Handle extra_ranlibflags_for_target.
-
 2002-12-20  Jeff Johnston  <jjohnstn@redhat.com>
 
 	* COPYING.NEWLIB: Updated.
diff --git a/Makefile.def b/Makefile.def
index 0096521..b27b071 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -81,7 +81,7 @@
 target_modules = { module= libiberty; };
 target_modules = { module= gperf; };
 target_modules = { module= examples; no_check=true; no_install=true; };
-target_modules = { module= libffi; };
+target_modules = { module= libffi; no_install=true; };
 target_modules = { module= libjava; raw_cxx=true; };
 target_modules = { module= zlib; };
 target_modules = { module= boehm-gc; };
diff --git a/Makefile.in b/Makefile.in
index 7acf526..64b0657 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,6 +20,12 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #
 
+# Tell GNU make 3.79 not to run the top level in parallel.  This 
+# prevents contention for $builddir/$target/config.cache, as well
+# as minimizing scatter in file system caches.
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+
 VPATH=@srcdir@
 links=@configlinks@
 
@@ -273,7 +279,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(AS); \
     else \
-       echo as | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -287,7 +293,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(LD); \
     else \
-       echo ld | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -299,7 +305,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(DLLTOOL); \
     else \
-       echo dlltool | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -311,7 +317,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(WINDRES); \
     else \
-       echo windres | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -323,7 +329,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(AR); \
     else \
-       echo ar | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -339,7 +345,7 @@
          echo ranlib; \
       fi; \
     else \
-       echo ranlib | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -353,7 +359,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(NM); \
     else \
-       echo nm | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -363,10 +369,6 @@
 .PHONY: all
 
 #### host and target specific makefile fragments come in here.
-@target_makefile_frag@
-@alphaieee_frag@
-@ospace_frag@
-@host_makefile_frag@
 ###
 
 # Flags to pass down to all sub-makes.
@@ -385,7 +387,6 @@
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
-	"DESTDIR=$(DESTDIR)" \
 	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
 	"INSTALL=$(INSTALL)" \
 	"INSTALL_DATA=$(INSTALL_DATA)" \
@@ -655,13 +656,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			clean) \
-	    || exit 1; \
+			clean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -673,13 +674,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			clean) \
-	    || exit 1; \
+			clean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -702,13 +703,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			distclean) \
-	    || exit 1; \
+			distclean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -720,13 +721,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			distclean) \
-	    || exit 1; \
+			distclean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -749,13 +750,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			dvi) \
-	    || exit 1; \
+			dvi); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -767,13 +768,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			dvi) \
-	    || exit 1; \
+			dvi); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -796,13 +797,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			info) \
-	    || exit 1; \
+			info); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -814,13 +815,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			info) \
-	    || exit 1; \
+			info); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -843,13 +844,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			install-info) \
-	    || exit 1; \
+			install-info); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -861,13 +862,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			install-info) \
-	    || exit 1; \
+			install-info); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -890,13 +891,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			installcheck) \
-	    || exit 1; \
+			installcheck); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -908,13 +909,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			installcheck) \
-	    || exit 1; \
+			installcheck); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -937,13 +938,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			mostlyclean) \
-	    || exit 1; \
+			mostlyclean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -955,13 +956,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			mostlyclean) \
-	    || exit 1; \
+			mostlyclean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -984,13 +985,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			maintainer-clean) \
-	    || exit 1; \
+			maintainer-clean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -1002,13 +1003,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			maintainer-clean) \
-	    || exit 1; \
+			maintainer-clean); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -1031,13 +1032,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			TAGS) \
-	    || exit 1; \
+			TAGS); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -1049,13 +1050,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			TAGS) \
-	    || exit 1; \
+			TAGS); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 
@@ -1077,7 +1078,7 @@
 install-info: do-install-info dir.info
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	if [ -f dir.info ] ; then \
-	  $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
+	  $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
 	else true ; fi
 
 local-clean:
@@ -1085,7 +1086,6 @@
 
 local-distclean:
 	-rm -f Makefile config.status config.cache mh-frag mt-frag
-	-rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
 	-if [ "$(TARGET_SUBDIR)" != "." ]; then \
 	  rm -rf $(TARGET_SUBDIR); \
 	else true; fi
@@ -1114,7 +1114,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
+	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
 	else \
 	  true; \
 	fi
@@ -1127,7 +1127,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
+	  (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
 	else \
 	  true; \
 	fi
@@ -1185,7 +1185,7 @@
 	@if [ -f ./gcc/Makefile ] ; then \
 		r=`${PWD}` ; export r ; \
 		$(SET_LIB_PATH) \
-		(cd ./gcc && \
+		(cd ./gcc; \
 		$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
 	else \
 		true ; \
@@ -1208,7 +1208,7 @@
 
 dir.info: do-install-info
 	if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
-	  $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
+	  $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
 	  mv -f dir.info.new dir.info ; \
 	else true ; \
 	fi
@@ -1227,16 +1227,16 @@
 # built are.
 TAGS: do-TAGS
 
+
 # --------------------------------------
 # Modules which run on the build machine
 # --------------------------------------
 
 .PHONY: configure-build-libiberty maybe-configure-build-libiberty
 maybe-configure-build-libiberty:
-configure-build-libiberty:
-	@test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
-	    [ -d $(BUILD_SUBDIR)/libiberty ] || \
-		mkdir $(BUILD_SUBDIR)/libiberty;\
+configure-build-libiberty: $(BUILD_SUBDIR)/libiberty/Makefile
+$(BUILD_SUBDIR)/libiberty/Makefile: config.status
+	@[ -d $(BUILD_SUBDIR)/libiberty ] || mkdir $(BUILD_SUBDIR)/libiberty;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    AR="$(AR_FOR_BUILD)"; export AR; \
@@ -1307,9 +1307,10 @@
 
 .PHONY: configure-ash maybe-configure-ash
 maybe-configure-ash:
-configure-ash:
-	@test ! -f ash/Makefile || exit 0; \
-	[ -d ash ] || mkdir ash; \
+configure-ash: ash/Makefile
+
+ash/Makefile: config.status
+	@[ -d ash ] || mkdir ash; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1351,7 +1352,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd ash; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-ash
@@ -1359,7 +1360,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd ash; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1369,14 +1370,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd ash; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-autoconf maybe-configure-autoconf
 maybe-configure-autoconf:
-configure-autoconf:
-	@test ! -f autoconf/Makefile || exit 0; \
-	[ -d autoconf ] || mkdir autoconf; \
+configure-autoconf: autoconf/Makefile
+
+autoconf/Makefile: config.status
+	@[ -d autoconf ] || mkdir autoconf; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1418,7 +1420,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-autoconf
@@ -1426,7 +1428,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1436,14 +1438,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-automake maybe-configure-automake
 maybe-configure-automake:
-configure-automake:
-	@test ! -f automake/Makefile || exit 0; \
-	[ -d automake ] || mkdir automake; \
+configure-automake: automake/Makefile
+
+automake/Makefile: config.status
+	@[ -d automake ] || mkdir automake; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1485,7 +1488,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd automake; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-automake
@@ -1493,7 +1496,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd automake; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1503,14 +1506,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd automake; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-bash maybe-configure-bash
 maybe-configure-bash:
-configure-bash:
-	@test ! -f bash/Makefile || exit 0; \
-	[ -d bash ] || mkdir bash; \
+configure-bash: bash/Makefile
+
+bash/Makefile: config.status
+	@[ -d bash ] || mkdir bash; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1552,7 +1556,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd bash; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bash
@@ -1560,7 +1564,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd bash; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1570,14 +1574,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd bash; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-bfd maybe-configure-bfd
 maybe-configure-bfd:
-configure-bfd:
-	@test ! -f bfd/Makefile || exit 0; \
-	[ -d bfd ] || mkdir bfd; \
+configure-bfd: bfd/Makefile
+
+bfd/Makefile: config.status
+	@[ -d bfd ] || mkdir bfd; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1619,7 +1624,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd bfd; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bfd
@@ -1627,7 +1632,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd bfd; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1637,14 +1642,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd bfd; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-opcodes maybe-configure-opcodes
 maybe-configure-opcodes:
-configure-opcodes:
-	@test ! -f opcodes/Makefile || exit 0; \
-	[ -d opcodes ] || mkdir opcodes; \
+configure-opcodes: opcodes/Makefile
+
+opcodes/Makefile: config.status
+	@[ -d opcodes ] || mkdir opcodes; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1686,7 +1692,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-opcodes
@@ -1694,7 +1700,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1704,14 +1710,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-binutils maybe-configure-binutils
 maybe-configure-binutils:
-configure-binutils:
-	@test ! -f binutils/Makefile || exit 0; \
-	[ -d binutils ] || mkdir binutils; \
+configure-binutils: binutils/Makefile
+
+binutils/Makefile: config.status
+	@[ -d binutils ] || mkdir binutils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1753,7 +1760,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd binutils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-binutils
@@ -1761,7 +1768,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd binutils; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1771,14 +1778,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd binutils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-bison maybe-configure-bison
 maybe-configure-bison:
-configure-bison:
-	@test ! -f bison/Makefile || exit 0; \
-	[ -d bison ] || mkdir bison; \
+configure-bison: bison/Makefile
+
+bison/Makefile: config.status
+	@[ -d bison ] || mkdir bison; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1820,7 +1828,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd bison; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bison
@@ -1830,7 +1838,7 @@
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
-	    (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
+	    (cd bison; $(MAKE) $(FLAGS_TO_PASS) check); \
 	fi
 
 
@@ -1841,14 +1849,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd bison; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-byacc maybe-configure-byacc
 maybe-configure-byacc:
-configure-byacc:
-	@test ! -f byacc/Makefile || exit 0; \
-	[ -d byacc ] || mkdir byacc; \
+configure-byacc: byacc/Makefile
+
+byacc/Makefile: config.status
+	@[ -d byacc ] || mkdir byacc; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1890,7 +1899,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd byacc; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-byacc
@@ -1900,7 +1909,7 @@
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
-	    (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
+	    (cd byacc; $(MAKE) $(FLAGS_TO_PASS) check); \
 	fi
 
 
@@ -1911,14 +1920,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd byacc; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-bzip2 maybe-configure-bzip2
 maybe-configure-bzip2:
-configure-bzip2:
-	@test ! -f bzip2/Makefile || exit 0; \
-	[ -d bzip2 ] || mkdir bzip2; \
+configure-bzip2: bzip2/Makefile
+
+bzip2/Makefile: config.status
+	@[ -d bzip2 ] || mkdir bzip2; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1960,7 +1970,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bzip2
@@ -1968,7 +1978,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1978,14 +1988,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-db maybe-configure-db
 maybe-configure-db:
-configure-db:
-	@test ! -f db/Makefile || exit 0; \
-	[ -d db ] || mkdir db; \
+configure-db: db/Makefile
+
+db/Makefile: config.status
+	@[ -d db ] || mkdir db; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2027,7 +2038,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd db && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd db; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-db
@@ -2035,7 +2046,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd db && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd db; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2045,14 +2056,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd db && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd db; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-dejagnu maybe-configure-dejagnu
 maybe-configure-dejagnu:
-configure-dejagnu:
-	@test ! -f dejagnu/Makefile || exit 0; \
-	[ -d dejagnu ] || mkdir dejagnu; \
+configure-dejagnu: dejagnu/Makefile
+
+dejagnu/Makefile: config.status
+	@[ -d dejagnu ] || mkdir dejagnu; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2094,7 +2106,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-dejagnu
@@ -2102,7 +2114,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2112,14 +2124,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-diff maybe-configure-diff
 maybe-configure-diff:
-configure-diff:
-	@test ! -f diff/Makefile || exit 0; \
-	[ -d diff ] || mkdir diff; \
+configure-diff: diff/Makefile
+
+diff/Makefile: config.status
+	@[ -d diff ] || mkdir diff; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2161,7 +2174,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd diff; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-diff
@@ -2169,7 +2182,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd diff; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2179,14 +2192,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd diff; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-dosutils maybe-configure-dosutils
 maybe-configure-dosutils:
-configure-dosutils:
-	@test ! -f dosutils/Makefile || exit 0; \
-	[ -d dosutils ] || mkdir dosutils; \
+configure-dosutils: dosutils/Makefile
+
+dosutils/Makefile: config.status
+	@[ -d dosutils ] || mkdir dosutils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2228,7 +2242,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd dosutils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-dosutils
@@ -2242,14 +2256,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd dosutils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-etc maybe-configure-etc
 maybe-configure-etc:
-configure-etc:
-	@test ! -f etc/Makefile || exit 0; \
-	[ -d etc ] || mkdir etc; \
+configure-etc: etc/Makefile
+
+etc/Makefile: config.status
+	@[ -d etc ] || mkdir etc; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2291,7 +2306,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd etc; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-etc
@@ -2299,7 +2314,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd etc; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2309,14 +2324,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd etc; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-fastjar maybe-configure-fastjar
 maybe-configure-fastjar:
-configure-fastjar:
-	@test ! -f fastjar/Makefile || exit 0; \
-	[ -d fastjar ] || mkdir fastjar; \
+configure-fastjar: fastjar/Makefile
+
+fastjar/Makefile: config.status
+	@[ -d fastjar ] || mkdir fastjar; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2358,7 +2374,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-fastjar
@@ -2368,7 +2384,7 @@
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
-	    (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
+	    (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) check); \
 	fi
 
 
@@ -2379,14 +2395,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-fileutils maybe-configure-fileutils
 maybe-configure-fileutils:
-configure-fileutils:
-	@test ! -f fileutils/Makefile || exit 0; \
-	[ -d fileutils ] || mkdir fileutils; \
+configure-fileutils: fileutils/Makefile
+
+fileutils/Makefile: config.status
+	@[ -d fileutils ] || mkdir fileutils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2428,7 +2445,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-fileutils
@@ -2436,7 +2453,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2446,14 +2463,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-findutils maybe-configure-findutils
 maybe-configure-findutils:
-configure-findutils:
-	@test ! -f findutils/Makefile || exit 0; \
-	[ -d findutils ] || mkdir findutils; \
+configure-findutils: findutils/Makefile
+
+findutils/Makefile: config.status
+	@[ -d findutils ] || mkdir findutils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2495,7 +2513,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd findutils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-findutils
@@ -2503,7 +2521,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd findutils; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2513,14 +2531,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd findutils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-find maybe-configure-find
 maybe-configure-find:
-configure-find:
-	@test ! -f find/Makefile || exit 0; \
-	[ -d find ] || mkdir find; \
+configure-find: find/Makefile
+
+find/Makefile: config.status
+	@[ -d find ] || mkdir find; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2562,7 +2581,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd find; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-find
@@ -2570,7 +2589,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd find && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd find; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2580,14 +2599,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd find && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd find; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-flex maybe-configure-flex
 maybe-configure-flex:
-configure-flex:
-	@test ! -f flex/Makefile || exit 0; \
-	[ -d flex ] || mkdir flex; \
+configure-flex: flex/Makefile
+
+flex/Makefile: config.status
+	@[ -d flex ] || mkdir flex; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2629,7 +2649,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd flex; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-flex
@@ -2639,7 +2659,7 @@
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
-	    (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
+	    (cd flex; $(MAKE) $(FLAGS_TO_PASS) check); \
 	fi
 
 
@@ -2650,14 +2670,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd flex; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-gas maybe-configure-gas
 maybe-configure-gas:
-configure-gas:
-	@test ! -f gas/Makefile || exit 0; \
-	[ -d gas ] || mkdir gas; \
+configure-gas: gas/Makefile
+
+gas/Makefile: config.status
+	@[ -d gas ] || mkdir gas; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2699,7 +2720,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd gas; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gas
@@ -2707,7 +2728,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd gas; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2717,14 +2738,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd gas; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-gawk maybe-configure-gawk
 maybe-configure-gawk:
-configure-gawk:
-	@test ! -f gawk/Makefile || exit 0; \
-	[ -d gawk ] || mkdir gawk; \
+configure-gawk: gawk/Makefile
+
+gawk/Makefile: config.status
+	@[ -d gawk ] || mkdir gawk; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2766,7 +2788,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd gawk; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gawk
@@ -2774,7 +2796,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd gawk; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2784,14 +2806,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd gawk; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-gettext maybe-configure-gettext
 maybe-configure-gettext:
-configure-gettext:
-	@test ! -f gettext/Makefile || exit 0; \
-	[ -d gettext ] || mkdir gettext; \
+configure-gettext: gettext/Makefile
+
+gettext/Makefile: config.status
+	@[ -d gettext ] || mkdir gettext; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2833,7 +2856,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd gettext; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gettext
@@ -2841,7 +2864,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd gettext; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2851,14 +2874,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd gettext; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-gnuserv maybe-configure-gnuserv
 maybe-configure-gnuserv:
-configure-gnuserv:
-	@test ! -f gnuserv/Makefile || exit 0; \
-	[ -d gnuserv ] || mkdir gnuserv; \
+configure-gnuserv: gnuserv/Makefile
+
+gnuserv/Makefile: config.status
+	@[ -d gnuserv ] || mkdir gnuserv; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2900,7 +2924,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gnuserv
@@ -2908,7 +2932,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2918,14 +2942,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-gprof maybe-configure-gprof
 maybe-configure-gprof:
-configure-gprof:
-	@test ! -f gprof/Makefile || exit 0; \
-	[ -d gprof ] || mkdir gprof; \
+configure-gprof: gprof/Makefile
+
+gprof/Makefile: config.status
+	@[ -d gprof ] || mkdir gprof; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -2967,7 +2992,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd gprof; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gprof
@@ -2975,7 +3000,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd gprof; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2985,14 +3010,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd gprof; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-grep maybe-configure-grep
 maybe-configure-grep:
-configure-grep:
-	@test ! -f grep/Makefile || exit 0; \
-	[ -d grep ] || mkdir grep; \
+configure-grep: grep/Makefile
+
+grep/Makefile: config.status
+	@[ -d grep ] || mkdir grep; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3034,7 +3060,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd grep && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd grep; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-grep
@@ -3042,7 +3068,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd grep && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd grep; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3052,14 +3078,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd grep && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd grep; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-gzip maybe-configure-gzip
 maybe-configure-gzip:
-configure-gzip:
-	@test ! -f gzip/Makefile || exit 0; \
-	[ -d gzip ] || mkdir gzip; \
+configure-gzip: gzip/Makefile
+
+gzip/Makefile: config.status
+	@[ -d gzip ] || mkdir gzip; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3101,7 +3128,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd gzip; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gzip
@@ -3109,7 +3136,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd gzip; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3119,14 +3146,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd gzip; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-hello maybe-configure-hello
 maybe-configure-hello:
-configure-hello:
-	@test ! -f hello/Makefile || exit 0; \
-	[ -d hello ] || mkdir hello; \
+configure-hello: hello/Makefile
+
+hello/Makefile: config.status
+	@[ -d hello ] || mkdir hello; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3168,7 +3196,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd hello; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-hello
@@ -3176,7 +3204,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd hello; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3186,14 +3214,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd hello; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-indent maybe-configure-indent
 maybe-configure-indent:
-configure-indent:
-	@test ! -f indent/Makefile || exit 0; \
-	[ -d indent ] || mkdir indent; \
+configure-indent: indent/Makefile
+
+indent/Makefile: config.status
+	@[ -d indent ] || mkdir indent; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3235,7 +3264,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd indent; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-indent
@@ -3243,7 +3272,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd indent; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3253,14 +3282,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd indent; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-intl maybe-configure-intl
 maybe-configure-intl:
-configure-intl:
-	@test ! -f intl/Makefile || exit 0; \
-	[ -d intl ] || mkdir intl; \
+configure-intl: intl/Makefile
+
+intl/Makefile: config.status
+	@[ -d intl ] || mkdir intl; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3302,7 +3332,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd intl; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-intl
@@ -3310,7 +3340,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd intl; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3320,14 +3350,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd intl; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-tcl maybe-configure-tcl
 maybe-configure-tcl:
-configure-tcl:
-	@test ! -f tcl/Makefile || exit 0; \
-	[ -d tcl ] || mkdir tcl; \
+configure-tcl: tcl/Makefile
+
+tcl/Makefile: config.status
+	@[ -d tcl ] || mkdir tcl; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3369,7 +3400,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd tcl; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tcl
@@ -3377,7 +3408,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd tcl; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3387,14 +3418,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd tcl; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-itcl maybe-configure-itcl
 maybe-configure-itcl:
-configure-itcl:
-	@test ! -f itcl/Makefile || exit 0; \
-	[ -d itcl ] || mkdir itcl; \
+configure-itcl: itcl/Makefile
+
+itcl/Makefile: config.status
+	@[ -d itcl ] || mkdir itcl; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3436,7 +3468,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd itcl; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-itcl
@@ -3444,7 +3476,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd itcl; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3454,14 +3486,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd itcl; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-ld maybe-configure-ld
 maybe-configure-ld:
-configure-ld:
-	@test ! -f ld/Makefile || exit 0; \
-	[ -d ld ] || mkdir ld; \
+configure-ld: ld/Makefile
+
+ld/Makefile: config.status
+	@[ -d ld ] || mkdir ld; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3503,7 +3536,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd ld; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-ld
@@ -3511,7 +3544,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd ld; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3521,14 +3554,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd ld; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-libgui maybe-configure-libgui
 maybe-configure-libgui:
-configure-libgui:
-	@test ! -f libgui/Makefile || exit 0; \
-	[ -d libgui ] || mkdir libgui; \
+configure-libgui: libgui/Makefile
+
+libgui/Makefile: config.status
+	@[ -d libgui ] || mkdir libgui; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3570,7 +3604,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd libgui; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libgui
@@ -3578,7 +3612,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd libgui; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3588,14 +3622,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd libgui; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-libiberty maybe-configure-libiberty
 maybe-configure-libiberty:
-configure-libiberty:
-	@test ! -f libiberty/Makefile || exit 0; \
-	[ -d libiberty ] || mkdir libiberty; \
+configure-libiberty: libiberty/Makefile
+
+libiberty/Makefile: config.status
+	@[ -d libiberty ] || mkdir libiberty; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3637,7 +3672,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libiberty
@@ -3645,7 +3680,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3655,14 +3690,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-libtool maybe-configure-libtool
 maybe-configure-libtool:
-configure-libtool:
-	@test ! -f libtool/Makefile || exit 0; \
-	[ -d libtool ] || mkdir libtool; \
+configure-libtool: libtool/Makefile
+
+libtool/Makefile: config.status
+	@[ -d libtool ] || mkdir libtool; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3704,7 +3740,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd libtool; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libtool
@@ -3712,7 +3748,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd libtool; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3722,14 +3758,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd libtool; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-m4 maybe-configure-m4
 maybe-configure-m4:
-configure-m4:
-	@test ! -f m4/Makefile || exit 0; \
-	[ -d m4 ] || mkdir m4; \
+configure-m4: m4/Makefile
+
+m4/Makefile: config.status
+	@[ -d m4 ] || mkdir m4; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3771,7 +3808,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd m4; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-m4
@@ -3779,7 +3816,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd m4; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3789,14 +3826,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd m4; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-make maybe-configure-make
 maybe-configure-make:
-configure-make:
-	@test ! -f make/Makefile || exit 0; \
-	[ -d make ] || mkdir make; \
+configure-make: make/Makefile
+
+make/Makefile: config.status
+	@[ -d make ] || mkdir make; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3838,7 +3876,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd make; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-make
@@ -3846,7 +3884,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd make && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd make; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3856,14 +3894,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd make && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd make; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-mmalloc maybe-configure-mmalloc
 maybe-configure-mmalloc:
-configure-mmalloc:
-	@test ! -f mmalloc/Makefile || exit 0; \
-	[ -d mmalloc ] || mkdir mmalloc; \
+configure-mmalloc: mmalloc/Makefile
+
+mmalloc/Makefile: config.status
+	@[ -d mmalloc ] || mkdir mmalloc; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3905,7 +3944,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd mmalloc; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-mmalloc
@@ -3919,14 +3958,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd mmalloc; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-patch maybe-configure-patch
 maybe-configure-patch:
-configure-patch:
-	@test ! -f patch/Makefile || exit 0; \
-	[ -d patch ] || mkdir patch; \
+configure-patch: patch/Makefile
+
+patch/Makefile: config.status
+	@[ -d patch ] || mkdir patch; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -3968,7 +4008,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd patch; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-patch
@@ -3976,7 +4016,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd patch; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -3986,14 +4026,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd patch; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-perl maybe-configure-perl
 maybe-configure-perl:
-configure-perl:
-	@test ! -f perl/Makefile || exit 0; \
-	[ -d perl ] || mkdir perl; \
+configure-perl: perl/Makefile
+
+perl/Makefile: config.status
+	@[ -d perl ] || mkdir perl; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4035,7 +4076,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd perl; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-perl
@@ -4043,7 +4084,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd perl; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4053,14 +4094,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd perl; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-prms maybe-configure-prms
 maybe-configure-prms:
-configure-prms:
-	@test ! -f prms/Makefile || exit 0; \
-	[ -d prms ] || mkdir prms; \
+configure-prms: prms/Makefile
+
+prms/Makefile: config.status
+	@[ -d prms ] || mkdir prms; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4102,7 +4144,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd prms; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-prms
@@ -4110,7 +4152,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd prms; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4120,14 +4162,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd prms; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-rcs maybe-configure-rcs
 maybe-configure-rcs:
-configure-rcs:
-	@test ! -f rcs/Makefile || exit 0; \
-	[ -d rcs ] || mkdir rcs; \
+configure-rcs: rcs/Makefile
+
+rcs/Makefile: config.status
+	@[ -d rcs ] || mkdir rcs; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4169,7 +4212,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd rcs; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-rcs
@@ -4177,7 +4220,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd rcs; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4187,14 +4230,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd rcs; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-readline maybe-configure-readline
 maybe-configure-readline:
-configure-readline:
-	@test ! -f readline/Makefile || exit 0; \
-	[ -d readline ] || mkdir readline; \
+configure-readline: readline/Makefile
+
+readline/Makefile: config.status
+	@[ -d readline ] || mkdir readline; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4236,7 +4280,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd readline; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-readline
@@ -4244,7 +4288,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd readline; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4254,14 +4298,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd readline; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-release maybe-configure-release
 maybe-configure-release:
-configure-release:
-	@test ! -f release/Makefile || exit 0; \
-	[ -d release ] || mkdir release; \
+configure-release: release/Makefile
+
+release/Makefile: config.status
+	@[ -d release ] || mkdir release; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4303,7 +4348,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd release; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-release
@@ -4318,9 +4363,10 @@
 
 .PHONY: configure-recode maybe-configure-recode
 maybe-configure-recode:
-configure-recode:
-	@test ! -f recode/Makefile || exit 0; \
-	[ -d recode ] || mkdir recode; \
+configure-recode: recode/Makefile
+
+recode/Makefile: config.status
+	@[ -d recode ] || mkdir recode; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4362,7 +4408,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd recode; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-recode
@@ -4370,7 +4416,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd recode; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4380,14 +4426,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd recode; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-sed maybe-configure-sed
 maybe-configure-sed:
-configure-sed:
-	@test ! -f sed/Makefile || exit 0; \
-	[ -d sed ] || mkdir sed; \
+configure-sed: sed/Makefile
+
+sed/Makefile: config.status
+	@[ -d sed ] || mkdir sed; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4429,7 +4476,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd sed; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-sed
@@ -4437,7 +4484,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd sed; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4447,14 +4494,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd sed; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-send-pr maybe-configure-send-pr
 maybe-configure-send-pr:
-configure-send-pr:
-	@test ! -f send-pr/Makefile || exit 0; \
-	[ -d send-pr ] || mkdir send-pr; \
+configure-send-pr: send-pr/Makefile
+
+send-pr/Makefile: config.status
+	@[ -d send-pr ] || mkdir send-pr; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4496,7 +4544,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-send-pr
@@ -4504,7 +4552,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4514,14 +4562,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-shellutils maybe-configure-shellutils
 maybe-configure-shellutils:
-configure-shellutils:
-	@test ! -f shellutils/Makefile || exit 0; \
-	[ -d shellutils ] || mkdir shellutils; \
+configure-shellutils: shellutils/Makefile
+
+shellutils/Makefile: config.status
+	@[ -d shellutils ] || mkdir shellutils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4563,7 +4612,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-shellutils
@@ -4571,7 +4620,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4581,14 +4630,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-sid maybe-configure-sid
 maybe-configure-sid:
-configure-sid:
-	@test ! -f sid/Makefile || exit 0; \
-	[ -d sid ] || mkdir sid; \
+configure-sid: sid/Makefile
+
+sid/Makefile: config.status
+	@[ -d sid ] || mkdir sid; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4630,7 +4680,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd sid; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-sid
@@ -4638,7 +4688,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd sid; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4648,14 +4698,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd sid; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-sim maybe-configure-sim
 maybe-configure-sim:
-configure-sim:
-	@test ! -f sim/Makefile || exit 0; \
-	[ -d sim ] || mkdir sim; \
+configure-sim: sim/Makefile
+
+sim/Makefile: config.status
+	@[ -d sim ] || mkdir sim; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4697,7 +4748,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd sim; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-sim
@@ -4705,7 +4756,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd sim; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4715,14 +4766,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd sim; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-snavigator maybe-configure-snavigator
 maybe-configure-snavigator:
-configure-snavigator:
-	@test ! -f snavigator/Makefile || exit 0; \
-	[ -d snavigator ] || mkdir snavigator; \
+configure-snavigator: snavigator/Makefile
+
+snavigator/Makefile: config.status
+	@[ -d snavigator ] || mkdir snavigator; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4764,7 +4816,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd snavigator && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-snavigator
@@ -4772,7 +4824,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd snavigator && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4782,14 +4834,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd snavigator && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-tar maybe-configure-tar
 maybe-configure-tar:
-configure-tar:
-	@test ! -f tar/Makefile || exit 0; \
-	[ -d tar ] || mkdir tar; \
+configure-tar: tar/Makefile
+
+tar/Makefile: config.status
+	@[ -d tar ] || mkdir tar; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4831,7 +4884,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd tar; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tar
@@ -4839,7 +4892,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd tar; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4849,14 +4902,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd tar; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-texinfo maybe-configure-texinfo
 maybe-configure-texinfo:
-configure-texinfo:
-	@test ! -f texinfo/Makefile || exit 0; \
-	[ -d texinfo ] || mkdir texinfo; \
+configure-texinfo: texinfo/Makefile
+
+texinfo/Makefile: config.status
+	@[ -d texinfo ] || mkdir texinfo; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4898,7 +4952,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd texinfo; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-texinfo
@@ -4906,7 +4960,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd texinfo; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4917,9 +4971,10 @@
 
 .PHONY: configure-textutils maybe-configure-textutils
 maybe-configure-textutils:
-configure-textutils:
-	@test ! -f textutils/Makefile || exit 0; \
-	[ -d textutils ] || mkdir textutils; \
+configure-textutils: textutils/Makefile
+
+textutils/Makefile: config.status
+	@[ -d textutils ] || mkdir textutils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -4961,7 +5016,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd textutils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-textutils
@@ -4969,7 +5024,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd textutils; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -4979,14 +5034,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd textutils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-time maybe-configure-time
 maybe-configure-time:
-configure-time:
-	@test ! -f time/Makefile || exit 0; \
-	[ -d time ] || mkdir time; \
+configure-time: time/Makefile
+
+time/Makefile: config.status
+	@[ -d time ] || mkdir time; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5028,7 +5084,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd time; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-time
@@ -5036,7 +5092,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd time && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd time; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -5046,14 +5102,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd time && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd time; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-uudecode maybe-configure-uudecode
 maybe-configure-uudecode:
-configure-uudecode:
-	@test ! -f uudecode/Makefile || exit 0; \
-	[ -d uudecode ] || mkdir uudecode; \
+configure-uudecode: uudecode/Makefile
+
+uudecode/Makefile: config.status
+	@[ -d uudecode ] || mkdir uudecode; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5095,7 +5152,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-uudecode
@@ -5103,7 +5160,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -5113,14 +5170,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-wdiff maybe-configure-wdiff
 maybe-configure-wdiff:
-configure-wdiff:
-	@test ! -f wdiff/Makefile || exit 0; \
-	[ -d wdiff ] || mkdir wdiff; \
+configure-wdiff: wdiff/Makefile
+
+wdiff/Makefile: config.status
+	@[ -d wdiff ] || mkdir wdiff; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5162,7 +5220,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-wdiff
@@ -5170,7 +5228,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
+	  (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -5180,14 +5238,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-zip maybe-configure-zip
 maybe-configure-zip:
-configure-zip:
-	@test ! -f zip/Makefile || exit 0; \
-	[ -d zip ] || mkdir zip; \
+configure-zip: zip/Makefile
+
+zip/Makefile: config.status
+	@[ -d zip ] || mkdir zip; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5229,7 +5288,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd zip; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-zip
@@ -5239,7 +5298,7 @@
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
-	    (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
+	    (cd zip; $(MAKE) $(FLAGS_TO_PASS) check); \
 	fi
 
 
@@ -5250,14 +5309,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd zip; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-zlib maybe-configure-zlib
 maybe-configure-zlib:
-configure-zlib:
-	@test ! -f zlib/Makefile || exit 0; \
-	[ -d zlib ] || mkdir zlib; \
+configure-zlib: zlib/Makefile
+
+zlib/Makefile: config.status
+	@[ -d zlib ] || mkdir zlib; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5299,7 +5359,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd zlib; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-zlib
@@ -5314,9 +5374,10 @@
 
 .PHONY: configure-gdb maybe-configure-gdb
 maybe-configure-gdb:
-configure-gdb:
-	@test ! -f gdb/Makefile || exit 0; \
-	[ -d gdb ] || mkdir gdb; \
+configure-gdb: gdb/Makefile
+
+gdb/Makefile: config.status
+	@[ -d gdb ] || mkdir gdb; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5358,7 +5419,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+	  (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gdb
@@ -5366,7 +5427,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -5376,14 +5437,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-expect maybe-configure-expect
 maybe-configure-expect:
-configure-expect:
-	@test ! -f expect/Makefile || exit 0; \
-	[ -d expect ] || mkdir expect; \
+configure-expect: expect/Makefile
+
+expect/Makefile: config.status
+	@[ -d expect ] || mkdir expect; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5425,7 +5487,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+	  (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-expect
@@ -5433,7 +5495,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -5443,14 +5505,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-guile maybe-configure-guile
 maybe-configure-guile:
-configure-guile:
-	@test ! -f guile/Makefile || exit 0; \
-	[ -d guile ] || mkdir guile; \
+configure-guile: guile/Makefile
+
+guile/Makefile: config.status
+	@[ -d guile ] || mkdir guile; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5492,7 +5555,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+	  (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-guile
@@ -5500,7 +5563,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -5510,14 +5573,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-tk maybe-configure-tk
 maybe-configure-tk:
-configure-tk:
-	@test ! -f tk/Makefile || exit 0; \
-	[ -d tk ] || mkdir tk; \
+configure-tk: tk/Makefile
+
+tk/Makefile: config.status
+	@[ -d tk ] || mkdir tk; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5559,7 +5623,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+	  (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tk
@@ -5567,7 +5631,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -5577,14 +5641,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-tix maybe-configure-tix
 maybe-configure-tix:
-configure-tix:
-	@test ! -f tix/Makefile || exit 0; \
-	[ -d tix ] || mkdir tix; \
+configure-tix: tix/Makefile
+
+tix/Makefile: config.status
+	@[ -d tix ] || mkdir tix; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5626,7 +5691,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+	  (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tix
@@ -5634,7 +5699,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+	  (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -5644,14 +5709,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+	  (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-libtermcap maybe-configure-libtermcap
 maybe-configure-libtermcap:
-configure-libtermcap:
-	@test ! -f libtermcap/Makefile || exit 0; \
-	[ -d libtermcap ] || mkdir libtermcap; \
+configure-libtermcap: libtermcap/Makefile
+
+libtermcap/Makefile: config.status
+	@[ -d libtermcap ] || mkdir libtermcap; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5693,7 +5759,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd libtermcap; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libtermcap
@@ -5707,14 +5773,15 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd libtermcap; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-utils maybe-configure-utils
 maybe-configure-utils:
-configure-utils:
-	@test ! -f utils/Makefile || exit 0; \
-	[ -d utils ] || mkdir utils; \
+configure-utils: utils/Makefile
+
+utils/Makefile: config.status
+	@[ -d utils ] || mkdir utils; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -5756,7 +5823,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
+	  (cd utils; $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-utils
@@ -5770,7 +5837,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
+	  (cd utils; $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 
@@ -5780,18 +5847,18 @@
 
 .PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
 maybe-configure-target-libstdc++-v3:
+configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || \
-	    mkdir $(TARGET_SUBDIR)/libstdc++-v3; \
-	rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libstdc++-v3"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.out 2> /dev/null
 
-configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || \
-		mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
+$(TARGET_SUBDIR)/libstdc++-v3/Makefile: config.status $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -5856,7 +5923,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+	  (cd $(TARGET_SUBDIR)/libstdc++-v3; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  all)
 
 .PHONY: check-target-libstdc++-v3
@@ -5864,7 +5931,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+	  (cd $(TARGET_SUBDIR)/libstdc++-v3; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  check)
 
 
@@ -5874,24 +5941,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+	  (cd $(TARGET_SUBDIR)/libstdc++-v3; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-newlib maybe-configure-target-newlib
 maybe-configure-target-newlib:
+configure-target-newlib: $(TARGET_SUBDIR)/newlib/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/newlib ] || \
-	    mkdir $(TARGET_SUBDIR)/newlib; \
-	rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/newlib/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for newlib"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.out 2> /dev/null
 
-configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/newlib ] || \
-		mkdir $(TARGET_SUBDIR)/newlib;\
+$(TARGET_SUBDIR)/newlib/Makefile: config.status $(TARGET_SUBDIR)/newlib/multilib.out
+	@[ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -5955,7 +6022,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/newlib && \
+	  (cd $(TARGET_SUBDIR)/newlib; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-newlib
@@ -5963,7 +6030,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/newlib && \
+	  (cd $(TARGET_SUBDIR)/newlib; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -5973,24 +6040,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/newlib && \
+	  (cd $(TARGET_SUBDIR)/newlib; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libf2c maybe-configure-target-libf2c
 maybe-configure-target-libf2c:
+configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libf2c ] || \
-	    mkdir $(TARGET_SUBDIR)/libf2c; \
-	rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libf2c/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libf2c"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libf2c/multilib.out 2> /dev/null
 
-configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libf2c ] || \
-		mkdir $(TARGET_SUBDIR)/libf2c;\
+$(TARGET_SUBDIR)/libf2c/Makefile: config.status $(TARGET_SUBDIR)/libf2c/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6054,7 +6121,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libf2c && \
+	  (cd $(TARGET_SUBDIR)/libf2c; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libf2c
@@ -6062,7 +6129,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libf2c && \
+	  (cd $(TARGET_SUBDIR)/libf2c; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -6072,24 +6139,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libf2c && \
+	  (cd $(TARGET_SUBDIR)/libf2c; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libobjc maybe-configure-target-libobjc
 maybe-configure-target-libobjc:
+configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libobjc ] || \
-	    mkdir $(TARGET_SUBDIR)/libobjc; \
-	rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libobjc/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libobjc"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/multilib.out 2> /dev/null
 
-configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libobjc ] || \
-		mkdir $(TARGET_SUBDIR)/libobjc;\
+$(TARGET_SUBDIR)/libobjc/Makefile: config.status $(TARGET_SUBDIR)/libobjc/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6153,7 +6220,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libobjc && \
+	  (cd $(TARGET_SUBDIR)/libobjc; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libobjc
@@ -6161,7 +6228,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libobjc && \
+	  (cd $(TARGET_SUBDIR)/libobjc; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -6171,24 +6238,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libobjc && \
+	  (cd $(TARGET_SUBDIR)/libobjc; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
 maybe-configure-target-libtermcap:
+configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libtermcap ] || \
-	    mkdir $(TARGET_SUBDIR)/libtermcap; \
-	rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libtermcap/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libtermcap"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/multilib.out 2> /dev/null
 
-configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libtermcap ] || \
-		mkdir $(TARGET_SUBDIR)/libtermcap;\
+$(TARGET_SUBDIR)/libtermcap/Makefile: config.status $(TARGET_SUBDIR)/libtermcap/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6252,7 +6319,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libtermcap && \
+	  (cd $(TARGET_SUBDIR)/libtermcap; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 # Dummy target for uncheckable module.
@@ -6266,24 +6333,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libtermcap && \
+	  (cd $(TARGET_SUBDIR)/libtermcap; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-winsup maybe-configure-target-winsup
 maybe-configure-target-winsup:
+configure-target-winsup: $(TARGET_SUBDIR)/winsup/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/winsup ] || \
-	    mkdir $(TARGET_SUBDIR)/winsup; \
-	rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/winsup/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for winsup"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/multilib.out 2> /dev/null
 
-configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/winsup ] || \
-		mkdir $(TARGET_SUBDIR)/winsup;\
+$(TARGET_SUBDIR)/winsup/Makefile: config.status $(TARGET_SUBDIR)/winsup/multilib.out
+	@[ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6347,7 +6414,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/winsup && \
+	  (cd $(TARGET_SUBDIR)/winsup; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-winsup
@@ -6355,7 +6422,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/winsup && \
+	  (cd $(TARGET_SUBDIR)/winsup; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -6365,24 +6432,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/winsup && \
+	  (cd $(TARGET_SUBDIR)/winsup; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libgloss maybe-configure-target-libgloss
 maybe-configure-target-libgloss:
+configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libgloss ] || \
-	    mkdir $(TARGET_SUBDIR)/libgloss; \
-	rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libgloss/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libgloss"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/multilib.out 2> /dev/null
 
-configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libgloss ] || \
-		mkdir $(TARGET_SUBDIR)/libgloss;\
+$(TARGET_SUBDIR)/libgloss/Makefile: config.status $(TARGET_SUBDIR)/libgloss/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6446,7 +6513,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libgloss && \
+	  (cd $(TARGET_SUBDIR)/libgloss; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 # Dummy target for uncheckable module.
@@ -6460,24 +6527,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libgloss && \
+	  (cd $(TARGET_SUBDIR)/libgloss; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libiberty maybe-configure-target-libiberty
 maybe-configure-target-libiberty:
+configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libiberty ] || \
-	    mkdir $(TARGET_SUBDIR)/libiberty; \
-	rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libiberty/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libiberty"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/multilib.out 2> /dev/null
 
-configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libiberty ] || \
-		mkdir $(TARGET_SUBDIR)/libiberty;\
+$(TARGET_SUBDIR)/libiberty/Makefile: config.status $(TARGET_SUBDIR)/libiberty/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6541,7 +6608,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libiberty && \
+	  (cd $(TARGET_SUBDIR)/libiberty; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libiberty
@@ -6549,7 +6616,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libiberty && \
+	  (cd $(TARGET_SUBDIR)/libiberty; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -6559,24 +6626,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libiberty && \
+	  (cd $(TARGET_SUBDIR)/libiberty; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-gperf maybe-configure-target-gperf
 maybe-configure-target-gperf:
+configure-target-gperf: $(TARGET_SUBDIR)/gperf/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/gperf ] || \
-	    mkdir $(TARGET_SUBDIR)/gperf; \
-	rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/gperf/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for gperf"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/multilib.out 2> /dev/null
 
-configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/gperf ] || \
-		mkdir $(TARGET_SUBDIR)/gperf;\
+$(TARGET_SUBDIR)/gperf/Makefile: config.status $(TARGET_SUBDIR)/gperf/multilib.out
+	@[ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6640,7 +6707,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/gperf && \
+	  (cd $(TARGET_SUBDIR)/gperf; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-gperf
@@ -6648,7 +6715,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/gperf && \
+	  (cd $(TARGET_SUBDIR)/gperf; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -6658,24 +6725,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/gperf && \
+	  (cd $(TARGET_SUBDIR)/gperf; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-examples maybe-configure-target-examples
 maybe-configure-target-examples:
+configure-target-examples: $(TARGET_SUBDIR)/examples/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/examples/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/examples ] || \
-	    mkdir $(TARGET_SUBDIR)/examples; \
-	rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/examples/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for examples"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/multilib.out 2> /dev/null
 
-configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/examples ] || \
-		mkdir $(TARGET_SUBDIR)/examples;\
+$(TARGET_SUBDIR)/examples/Makefile: config.status $(TARGET_SUBDIR)/examples/multilib.out
+	@[ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6739,7 +6806,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/examples && \
+	  (cd $(TARGET_SUBDIR)/examples; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 # Dummy target for uncheckable module.
@@ -6755,18 +6822,18 @@
 
 .PHONY: configure-target-libffi maybe-configure-target-libffi
 maybe-configure-target-libffi:
+configure-target-libffi: $(TARGET_SUBDIR)/libffi/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libffi ] || \
-	    mkdir $(TARGET_SUBDIR)/libffi; \
-	rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libffi/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libffi"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/multilib.out 2> /dev/null
 
-configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libffi ] || \
-		mkdir $(TARGET_SUBDIR)/libffi;\
+$(TARGET_SUBDIR)/libffi/Makefile: config.status $(TARGET_SUBDIR)/libffi/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6830,7 +6897,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libffi && \
+	  (cd $(TARGET_SUBDIR)/libffi; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libffi
@@ -6838,34 +6905,30 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libffi && \
+	  (cd $(TARGET_SUBDIR)/libffi; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
 .PHONY: install-target-libffi maybe-install-target-libffi
 maybe-install-target-libffi:
-install-target-libffi: installdirs
-	@r=`${PWD}`; export r; \
-	  s=`cd $(srcdir); ${PWD}`; export s; \
-	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libffi && \
-	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+# Dummy target for uninstallable.
+install-target-libffi:
 
 
 .PHONY: configure-target-libjava maybe-configure-target-libjava
 maybe-configure-target-libjava:
+configure-target-libjava: $(TARGET_SUBDIR)/libjava/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/libjava ] || \
-	    mkdir $(TARGET_SUBDIR)/libjava; \
-	rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/libjava/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for libjava"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.out 2> /dev/null
 
-configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/libjava ] || \
-		mkdir $(TARGET_SUBDIR)/libjava;\
+$(TARGET_SUBDIR)/libjava/Makefile: config.status $(TARGET_SUBDIR)/libjava/multilib.out
+	@[ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -6930,7 +6993,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libjava && \
+	  (cd $(TARGET_SUBDIR)/libjava; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  all)
 
 .PHONY: check-target-libjava
@@ -6938,7 +7001,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libjava && \
+	  (cd $(TARGET_SUBDIR)/libjava; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  check)
 
 
@@ -6948,24 +7011,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/libjava && \
+	  (cd $(TARGET_SUBDIR)/libjava; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-zlib maybe-configure-target-zlib
 maybe-configure-target-zlib:
+configure-target-zlib: $(TARGET_SUBDIR)/zlib/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/zlib ] || \
-	    mkdir $(TARGET_SUBDIR)/zlib; \
-	rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/zlib/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for zlib"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.out 2> /dev/null
 
-configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/zlib ] || \
-		mkdir $(TARGET_SUBDIR)/zlib;\
+$(TARGET_SUBDIR)/zlib/Makefile: config.status $(TARGET_SUBDIR)/zlib/multilib.out
+	@[ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -7029,7 +7092,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/zlib && \
+	  (cd $(TARGET_SUBDIR)/zlib; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-zlib
@@ -7037,7 +7100,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/zlib && \
+	  (cd $(TARGET_SUBDIR)/zlib; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -7047,24 +7110,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/zlib && \
+	  (cd $(TARGET_SUBDIR)/zlib; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
 maybe-configure-target-boehm-gc:
+configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/boehm-gc ] || \
-	    mkdir $(TARGET_SUBDIR)/boehm-gc; \
-	rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/boehm-gc/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for boehm-gc"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/multilib.out 2> /dev/null
 
-configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/boehm-gc ] || \
-		mkdir $(TARGET_SUBDIR)/boehm-gc;\
+$(TARGET_SUBDIR)/boehm-gc/Makefile: config.status $(TARGET_SUBDIR)/boehm-gc/multilib.out
+	@[ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -7128,7 +7191,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/boehm-gc && \
+	  (cd $(TARGET_SUBDIR)/boehm-gc; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-boehm-gc
@@ -7136,7 +7199,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/boehm-gc && \
+	  (cd $(TARGET_SUBDIR)/boehm-gc; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -7146,24 +7209,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/boehm-gc && \
+	  (cd $(TARGET_SUBDIR)/boehm-gc; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-qthreads maybe-configure-target-qthreads
 maybe-configure-target-qthreads:
+configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/qthreads ] || \
-	    mkdir $(TARGET_SUBDIR)/qthreads; \
-	rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/qthreads/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for qthreads"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/multilib.out 2> /dev/null
 
-configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/qthreads ] || \
-		mkdir $(TARGET_SUBDIR)/qthreads;\
+$(TARGET_SUBDIR)/qthreads/Makefile: config.status $(TARGET_SUBDIR)/qthreads/multilib.out
+	@[ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -7227,7 +7290,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/qthreads && \
+	  (cd $(TARGET_SUBDIR)/qthreads; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-qthreads
@@ -7235,7 +7298,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/qthreads && \
+	  (cd $(TARGET_SUBDIR)/qthreads; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -7245,24 +7308,24 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/qthreads && \
+	  (cd $(TARGET_SUBDIR)/qthreads; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-rda maybe-configure-target-rda
 maybe-configure-target-rda:
+configure-target-rda: $(TARGET_SUBDIR)/rda/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/rda/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/rda ] || \
-	    mkdir $(TARGET_SUBDIR)/rda; \
-	rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/rda/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for rda"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/multilib.out 2> /dev/null
 
-configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/rda ] || \
-		mkdir $(TARGET_SUBDIR)/rda;\
+$(TARGET_SUBDIR)/rda/Makefile: config.status $(TARGET_SUBDIR)/rda/multilib.out
+	@[ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -7326,7 +7389,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/rda && \
+	  (cd $(TARGET_SUBDIR)/rda; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-rda
@@ -7334,7 +7397,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/rda && \
+	  (cd $(TARGET_SUBDIR)/rda; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -7344,7 +7407,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/rda && \
+	  (cd $(TARGET_SUBDIR)/rda; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
@@ -7360,9 +7423,10 @@
 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
 .PHONY: configure-gcc maybe-configure-gcc
 maybe-configure-gcc:
-configure-gcc:
-	@test ! -f gcc/Makefile || exit 0; \
-	[ -d gcc ] || mkdir gcc; \
+configure-gcc: gcc/Makefile
+
+gcc/Makefile: config.status
+	@[ -d gcc ] || mkdir gcc; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -7408,12 +7472,12 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
 	else \
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
 	fi
 
 # Building GCC uses some tools for rebuilding "source" files
@@ -7475,7 +7539,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
 	else \
 	  true; \
 	fi
@@ -7486,7 +7550,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
 	else \
 	  true; \
 	fi
@@ -7501,7 +7565,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
 	else \
 	  true; \
 	fi
@@ -7521,7 +7585,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}` ; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ./gcc && \
+	  (cd ./gcc; \
 	   $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
 	  rm -rf gcc/include; \
 	  mv gcc/tmp-include gcc/include 2>/dev/null; \
@@ -7657,42 +7721,21 @@
 # Regenerating top level configury
 # --------------------------------
 
-# Multilib.out tells target dirs what multilibs they should build.
-# There is really only one copy.  We use the 'timestamp' method to
-# work around various timestamp bugs on some systems.
-# We use move-if-change so that it's only considered updated when it
-# actually changes, because it has to depend on a phony target.
-multilib.out: maybe-all-gcc
-	@r=`${PWD}`; export r; \
-	echo "Checking multilib configuration..."; \
-	$(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
-	$(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
-
 # Rebuilding Makefile.in, using autogen.
-AUTOGEN = autogen
 $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
-	cd $(srcdir) && $(AUTOGEN) Makefile.def
+	cd $(srcdir) && autogen Makefile.def
 
-# Rebuilding Makefile.
-Makefile: $(srcdir)/Makefile.in config.status
-	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+# with the gnu make, this is done automatically.
 
-config.status: configure $(gcc_version_trigger)
-	$(SHELL) ./config.status --recheck
+host_makefile_frag=@host_makefile_frag@
+target_makefile_frag=@target_makefile_frag@
 
-# Rebuilding configure.
-AUTOCONF = autoconf
-$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/config/acx.m4
-	cd $(srcdir) && $(AUTOCONF)
+Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
+	$(SHELL) ./config.status
+
 #
 
 .NOEXPORT:
 MAKEOVERRIDES=
 
-# Tell GNU make 3.79 not to run the top level in parallel.  This 
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
 # end of Makefile.in
diff --git a/Makefile.tpl b/Makefile.tpl
index 5e42382..d4edeed 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -23,6 +23,12 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #
 
+# Tell GNU make 3.79 not to run the top level in parallel.  This 
+# prevents contention for $builddir/$target/config.cache, as well
+# as minimizing scatter in file system caches.
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+
 VPATH=@srcdir@
 links=@configlinks@
 
@@ -276,7 +282,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(AS); \
     else \
-       echo as | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -290,7 +296,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(LD); \
     else \
-       echo ld | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -302,7 +308,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(DLLTOOL); \
     else \
-       echo dlltool | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -314,7 +320,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(WINDRES); \
     else \
-       echo windres | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -326,7 +332,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(AR); \
     else \
-       echo ar | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -342,7 +348,7 @@
          echo ranlib; \
       fi; \
     else \
-       echo ranlib | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -356,7 +362,7 @@
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(NM); \
     else \
-       echo nm | sed '$(program_transform_name)' ; \
+       t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
     fi; \
   fi`
 
@@ -366,10 +372,6 @@
 .PHONY: all
 
 #### host and target specific makefile fragments come in here.
-@target_makefile_frag@
-@alphaieee_frag@
-@ospace_frag@
-@host_makefile_frag@
 ###
 
 # Flags to pass down to all sub-makes.
@@ -388,7 +390,6 @@
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
-	"DESTDIR=$(DESTDIR)" \
 	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
 	"INSTALL=$(INSTALL)" \
 	"INSTALL_DATA=$(INSTALL_DATA)" \
@@ -588,13 +589,13 @@
 	      done; \
 	      ;; \
 	    esac ; \
-	    (cd ./$$i && \
+	    if (cd ./$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			[+target+]) \
-	    || exit 1; \
+			[+target+]); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 	# Break into two pieces
@@ -606,13 +607,13 @@
 	    for flag in $(EXTRA_TARGET_FLAGS); do \
 		eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	    done; \
-	    (cd $(TARGET_SUBDIR)/$$i && \
+	    if (cd $(TARGET_SUBDIR)/$$i; \
 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
 	                "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
 			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-			[+target+]) \
-	    || exit 1; \
+			[+target+]); \
+	    then true; else exit 1; fi; \
 	  else true; fi; \
 	done
 [+ ENDFOR recursive_targets +]
@@ -634,7 +635,7 @@
 install-info: do-install-info dir.info
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	if [ -f dir.info ] ; then \
-	  $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
+	  $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
 	else true ; fi
 
 local-clean:
@@ -642,7 +643,6 @@
 
 local-distclean:
 	-rm -f Makefile config.status config.cache mh-frag mt-frag
-	-rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
 	-if [ "$(TARGET_SUBDIR)" != "." ]; then \
 	  rm -rf $(TARGET_SUBDIR); \
 	else true; fi
@@ -671,7 +671,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
+	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
 	else \
 	  true; \
 	fi
@@ -684,7 +684,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
+	  (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
 	else \
 	  true; \
 	fi
@@ -742,7 +742,7 @@
 	@if [ -f ./gcc/Makefile ] ; then \
 		r=`${PWD}` ; export r ; \
 		$(SET_LIB_PATH) \
-		(cd ./gcc && \
+		(cd ./gcc; \
 		$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
 	else \
 		true ; \
@@ -765,7 +765,7 @@
 
 dir.info: do-install-info
 	if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
-	  $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
+	  $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
 	  mv -f dir.info.new dir.info ; \
 	else true ; \
 	fi
@@ -784,16 +784,16 @@
 # built are.
 TAGS: do-TAGS
 
+
 # --------------------------------------
 # Modules which run on the build machine
 # --------------------------------------
 [+ FOR build_modules +]
 .PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
 maybe-configure-build-[+module+]:
-configure-build-[+module+]:
-	@test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
-	    [ -d $(BUILD_SUBDIR)/[+module+] ] || \
-		mkdir $(BUILD_SUBDIR)/[+module+];\
+configure-build-[+module+]: $(BUILD_SUBDIR)/[+module+]/Makefile
+$(BUILD_SUBDIR)/[+module+]/Makefile: config.status
+	@[ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    AR="$(AR_FOR_BUILD)"; export AR; \
@@ -864,9 +864,10 @@
 [+ FOR host_modules +]
 .PHONY: configure-[+module+] maybe-configure-[+module+]
 maybe-configure-[+module+]:
-configure-[+module+]:
-	@test ! -f [+module+]/Makefile || exit 0; \
-	[ -d [+module+] ] || mkdir [+module+]; \
+configure-[+module+]: [+module+]/Makefile
+
+[+module+]/Makefile: config.status
+	@[ -d [+module+] ] || mkdir [+module+]; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -908,7 +909,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
+	  (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
 	    IF with_x 
 	      +] $(X11_FLAGS_TO_PASS)[+ 
 	    ENDIF with_x +] all)
@@ -924,7 +925,7 @@
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
-	    (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
+	    (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
 	      IF with_x 
 	        +] $(X11_FLAGS_TO_PASS)[+ 
 	      ENDIF with_x +] check); \
@@ -935,7 +936,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
+	  (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
 	    IF with_x 
 	      +] $(X11_FLAGS_TO_PASS)[+ 
 	    ENDIF with_x +] check)
@@ -952,7 +953,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
+	  (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
 	    IF with_x 
 	      +] $(X11_FLAGS_TO_PASS)[+ 
 	    ENDIF with_x +] install)
@@ -965,18 +966,18 @@
 [+ FOR target_modules +]
 .PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
 maybe-configure-target-[+module+]:
+configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/Makefile
 
-# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
-$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
-	@[ -d $(TARGET_SUBDIR)/[+module+] ] || \
-	    mkdir $(TARGET_SUBDIR)/[+module+]; \
-	rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
-	cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
+# Don't manually override CC_FOR_TARGET at make time; get it set right
+# at configure time.  Otherwise multilibs may be wrong.
+$(TARGET_SUBDIR)/[+module+]/multilib.out: maybe-all-gcc
+	@[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
+	r=`${PWD}`; export r; \
+	echo "Configuring multilibs for [+module+]"; \
+	$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/[+module+]/multilib.out 2> /dev/null
 
-configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
-	@test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \
-	    [ -d $(TARGET_SUBDIR)/[+module+] ] || \
-		mkdir $(TARGET_SUBDIR)/[+module+];\
+$(TARGET_SUBDIR)/[+module+]/Makefile: config.status $(TARGET_SUBDIR)/[+module+]/multilib.out
+	@[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
 	    r=`${PWD}`; export r; \
 	    s=`cd $(srcdir); ${PWD}`; export s; \
 	    $(SET_LIB_PATH) \
@@ -1045,7 +1046,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/[+module+] && \
+	  (cd $(TARGET_SUBDIR)/[+module+]; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
 	       IF raw_cxx 
 	         +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ 
@@ -1061,7 +1062,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/[+module+] && \
+	  (cd $(TARGET_SUBDIR)/[+module+]; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
 	       IF raw_cxx 
 	         +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ 
@@ -1080,7 +1081,7 @@
 	@r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/[+module+] && \
+	  (cd $(TARGET_SUBDIR)/[+module+]; \
 	    $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 [+ ENDIF no_install +]
 [+ ENDFOR target_modules +]
@@ -1096,9 +1097,10 @@
 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
 .PHONY: configure-gcc maybe-configure-gcc
 maybe-configure-gcc:
-configure-gcc:
-	@test ! -f gcc/Makefile || exit 0; \
-	[ -d gcc ] || mkdir gcc; \
+configure-gcc: gcc/Makefile
+
+gcc/Makefile: config.status
+	@[ -d gcc ] || mkdir gcc; \
 	r=`${PWD}`; export r; \
 	s=`cd $(srcdir); ${PWD}`; export s; \
 	CC="$(CC)"; export CC; \
@@ -1144,12 +1146,12 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
 	else \
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
 	fi
 
 # Building GCC uses some tools for rebuilding "source" files
@@ -1211,7 +1213,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
 	else \
 	  true; \
 	fi
@@ -1222,7 +1224,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
 	else \
 	  true; \
 	fi
@@ -1237,7 +1239,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
 	else \
 	  true; \
 	fi
@@ -1257,7 +1259,7 @@
 	  r=`${PWD}`; export r; \
 	  s=`cd $(srcdir); ${PWD}` ; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd ./gcc && \
+	  (cd ./gcc; \
 	   $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
 	  rm -rf gcc/include; \
 	  mv gcc/tmp-include gcc/include 2>/dev/null; \
@@ -1393,42 +1395,21 @@
 # Regenerating top level configury
 # --------------------------------
 
-# Multilib.out tells target dirs what multilibs they should build.
-# There is really only one copy.  We use the 'timestamp' method to
-# work around various timestamp bugs on some systems.
-# We use move-if-change so that it's only considered updated when it
-# actually changes, because it has to depend on a phony target.
-multilib.out: maybe-all-gcc
-	@r=`${PWD}`; export r; \
-	echo "Checking multilib configuration..."; \
-	$(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
-	$(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
-
 # Rebuilding Makefile.in, using autogen.
-AUTOGEN = autogen
 $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
-	cd $(srcdir) && $(AUTOGEN) Makefile.def
+	cd $(srcdir) && autogen Makefile.def
 
-# Rebuilding Makefile.
-Makefile: $(srcdir)/Makefile.in config.status
-	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+# with the gnu make, this is done automatically.
 
-config.status: configure $(gcc_version_trigger)
-	$(SHELL) ./config.status --recheck
+host_makefile_frag=@host_makefile_frag@
+target_makefile_frag=@target_makefile_frag@
 
-# Rebuilding configure.
-AUTOCONF = autoconf
-$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/config/acx.m4
-	cd $(srcdir) && $(AUTOCONF)
+Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
+	$(SHELL) ./config.status
+
 #
 
 .NOEXPORT:
 MAKEOVERRIDES=
 
-# Tell GNU make 3.79 not to run the top level in parallel.  This 
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
 # end of Makefile.in
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 44f3ac3..df7a736 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,126 +1,3 @@
-2002-01-08  Klee Dienes  <kdienes@apple.com>
-
-	* Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
-	(BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
-	* Makefile.in: Regenerate.
-	
-2003-01-08  Alexandre Oliva  <aoliva@redhat.com>
-
-	* elfn32-mips.c (prev_reloc_section): New.
-	(GET_RELOC_ADDEND): Use it.  Parenthesize macro arguments.
-	(SET_RELOC_ADDEND): Parenthesize macro argument.
-
-2003-01-07  John David Anglin  <dave.anglin@nrc.gc.ca>
-
-	* elf32-hppa.c (final_link_relocate): For all DP relative relocations,
-	adjust addil instructions if the symbol has no section.
-
-2003-01-07  DJ Delorie  <dj@redhat.com>
-
-	* elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
-	partial_inplace.
-
-2003-01-07  Andreas Schwab  <schwab@suse.de>
-
-	* elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
-	PC relative relocations.
-	(elf_m68k_discard_copies): Set it here instead.
-
-2002-01-02  Ben Elliston  <bje@redhat.com>
-	    Jeff Johnston  <jjohnstn@redhat.com>
-
-	* Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
-	(ALL_MACHINES_CFILES): Add cpu-iq2000.c.
-	(BFD32_BACKENDS): Add elf32-iq2000.lo.
-	(BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
-	(cpu-iq2000.lo): New target.
-	* Makefile.in: Regenerate.
-	* config.bfd: Handle iq2000-*-elf.
-	* archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
-	(bfd_archures_list): Add bfd_iq2000_arch.
-	* configure.in: Handle bfd_elf32_iq2000_vec.
-	* configure: Regenerate.
-	* reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21, 
-	and BFD_RELOC_IQ2000_UHI16.
-	* targets.c (bfd_elf32_iq2000_vec): Declare.
-	(bfd_target_vector): Add bfd_elf32_iq2000_vec.
-	* elf.c (prep_headers): Set e_machine to EM_IQ2000.
-	* cpu-iq2000.c: New file.
-	* elf32-iq2000.c: Likewise.
-	* libbfd.h: Regenerate.
-	* bfd-in2.h: Likewise.
-
-2003-01-02  Richard Sandiford  <rsandifo@redhat.com>
-
-	* elfxx-mips.c: Include libiberty.h.
-	(elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
-	(mips_set_isa_flags): New function, split out from...
-	(_bfd_mips_elf_final_write_processing): ...here.  Only call
-	mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
-	(mips_mach_extensions): New array.
-	(mips_32bit_flags_p): New function.
-	(_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
-	Use mips_32bit_flags_p to check if one binary is 32-bit and the
-	other is 64-bit.  When adopting IBFD's architecture, adopt the
-	bfd_mach as well as the flags.
-
-2003-01-02  Nick Kelsey  <nickk@ubicom.com>
-
-	* elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
-	fix internal errors, fix bad code generation, fix incorrect stabs
-	information, and improve ability to eliminate redundant page
-	instructions. Added code to ip2k_final_link_relocate to self-verify
-	the linker relaxation.  Fix formatting problems.
-
-2002-12-30  Chris Demetriou  <cgd@broadcom.com>
-
-	* aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
-	* archures.c (bfd_mach_mipsisa32r2): New define.
-	* bfd-in2.h: Regenerate.
-	* cpu-mips.c (I_mipsisa32r2): New enum value.
-	(arch_info_struct): Add entry for I_mipsisa32r2.
-	* elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
-	(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
-	(_bfd_mips_elf_final_write_processing): Add
-	bfd_mach_mipsisa32r2 case.
-	(_bfd_mips_elf_merge_private_bfd_data): Handle merging of
-	binaries marked as using MIPS32 Release 2.
-
-2002-12-30    Dmitry Diky <diwil@mail.ru>
-
-	* Makefile.am: Add msp430 target.
-	* configure.in: Likewise.
-	* Makefile.in: Regenerate.
-	* configure: Regenerate.
-	* archures.c: Add msp430 architecture vector.
-	* config.bfd: Likewise.
-	* reloc.c: Add msp430 relocs.
-	* targets.c: Add msp320 target.
-	* cpu-msp430.c: New file: msp430 cpu detection.
-	* elf32-msp430.c: New file: msp430 reloc processing.
-	* bfd-in2.h: Regenerate.
-	* libbfd.h: Regenerate.
-
-2002-12-28  Jakub Jelinek  <jakub@redhat.com>
-
-	* elf.c (elf_sort_sections): Don't reorder .tbss.
-	(assign_file_positions_for_segments): Only adjust off/voff
-	for increased alignment in PT_LOAD or PT_NOTE segment,
-	but adjust p_filesz for .tbss too.  in PT_LOAD consider
-	.tbss to have zero memory size.
-	(copy_private_bfd_data) [SECTION_SIZE]: Define.
-	[IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
-	[INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
-	into PT_TLS segment.  Never put SHF_TLS sections in
-	segments other than PT_TLS or PT_LOAD.
-
-	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
-	sh_entsize.
-
-2002-12-23  DJ Delorie  <dj@redhat.com>
-
-	* coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
-
 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
 
 	* elflink.h (elf_link_output_extsym): Heed strip_discarded.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 4a2f2e8..73739fd 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -70,7 +70,6 @@
 	cpu-i860.lo \
 	cpu-i960.lo \
 	cpu-ip2k.lo \
-	cpu-iq2000.lo \
 	cpu-m32r.lo \
 	cpu-m68hc11.lo \
 	cpu-m68hc12.lo \
@@ -81,7 +80,6 @@
 	cpu-mcore.lo \
 	cpu-mips.lo \
 	cpu-mmix.lo \
-	cpu-msp430.lo \
 	cpu-or32.lo \
 	cpu-ns32k.lo \
 	cpu-openrisc.lo \
@@ -124,7 +122,6 @@
 	cpu-i860.c \
 	cpu-i960.c \
 	cpu-ip2k.c \
-	cpu-iq2000.c \
 	cpu-m32r.c \
 	cpu-m68hc11.c \
 	cpu-m68hc12.c \
@@ -135,7 +132,6 @@
 	cpu-mcore.c \
 	cpu-mips.c \
 	cpu-mmix.c \
-	cpu-msp430.c \
 	cpu-or32.c \
 	cpu-ns32k.c \
 	cpu-openrisc.c \
@@ -225,7 +221,6 @@
 	elf32-i960.lo \
 	elf32-ia64.lo \
 	elf32-ip2k.lo \
-	elf32-iq2000.lo \
 	elf32-m32r.lo \
 	elf32-m68hc11.lo \
 	elf32-m68hc12.lo \
@@ -236,7 +231,6 @@
 	elf32-mcore.lo \
 	elfxx-mips.lo \
 	elf32-mips.lo \
-	elf32-msp430.lo \
 	elf32-openrisc.lo \
 	elf32-or32.lo \
 	elf32-pj.lo \
@@ -384,7 +378,6 @@
 	elf32-i860.c \
 	elf32-i960.c \
 	elf32-ip2k.c \
-	elf32-iq2000.c \
 	elf32-m32r.c \
 	elf32-m68k.c \
 	elf32-m68hc11.c \
@@ -395,7 +388,6 @@
 	elf32-mcore.c \
 	elfxx-mips.c \
 	elf32-mips.c \
-	elf32-msp430.c \
 	elf32-openrisc.c \
 	elf32-or32.c \
 	elf32-pj.c \
@@ -925,7 +917,6 @@
 cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
 cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
 cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
-cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h
 cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
 cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
 cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
@@ -936,7 +927,6 @@
 cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
 cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
 cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
-cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
 cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
 cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
 cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
@@ -1180,10 +1170,6 @@
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
-elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h elf-bfd.h \
-  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/reloc-macros.h \
-  elf32-target.h
 elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
@@ -1226,10 +1212,6 @@
   $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
   $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
   $(INCDIR)/coff/external.h ecoffswap.h elf32-target.h
-elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.h elf-bfd.h \
-  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
-  elf32-target.h
 elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 798e2fb..2bd807c 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -195,7 +195,6 @@
 	cpu-i860.lo \
 	cpu-i960.lo \
 	cpu-ip2k.lo \
-	cpu-iq2000.lo \
 	cpu-m32r.lo \
 	cpu-m68hc11.lo \
 	cpu-m68hc12.lo \
@@ -206,7 +205,6 @@
 	cpu-mcore.lo \
 	cpu-mips.lo \
 	cpu-mmix.lo \
-	cpu-msp430.lo \
 	cpu-or32.lo \
 	cpu-ns32k.lo \
 	cpu-openrisc.lo \
@@ -250,7 +248,6 @@
 	cpu-i860.c \
 	cpu-i960.c \
 	cpu-ip2k.c \
-	cpu-iq2000.c \
 	cpu-m32r.c \
 	cpu-m68hc11.c \
 	cpu-m68hc12.c \
@@ -261,7 +258,6 @@
 	cpu-mcore.c \
 	cpu-mips.c \
 	cpu-mmix.c \
-	cpu-msp430.c \
 	cpu-or32.c \
 	cpu-ns32k.c \
 	cpu-openrisc.c \
@@ -352,7 +348,6 @@
 	elf32-i960.lo \
 	elf32-ia64.lo \
 	elf32-ip2k.lo \
-	elf32-iq2000.lo \
 	elf32-m32r.lo \
 	elf32-m68hc11.lo \
 	elf32-m68hc12.lo \
@@ -363,7 +358,6 @@
 	elf32-mcore.lo \
 	elfxx-mips.lo \
 	elf32-mips.lo \
-	elf32-msp430.lo \
 	elf32-openrisc.lo \
 	elf32-or32.lo \
 	elf32-pj.lo \
@@ -512,7 +506,6 @@
 	elf32-i860.c \
 	elf32-i960.c \
 	elf32-ip2k.c \
-	elf32-iq2000.c \
 	elf32-m32r.c \
 	elf32-m68k.c \
 	elf32-m68hc11.c \
@@ -523,7 +516,6 @@
 	elf32-mcore.c \
 	elfxx-mips.c \
 	elf32-mips.c \
-	elf32-msp430.c \
 	elf32-openrisc.c \
 	elf32-or32.c \
 	elf32-pj.c \
@@ -1458,7 +1450,6 @@
 cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
 cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
 cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
-cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h
 cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
 cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
 cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
@@ -1469,7 +1460,6 @@
 cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
 cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
 cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
-cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
 cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
 cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
 cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
@@ -1713,10 +1703,6 @@
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
-elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h elf-bfd.h \
-  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/reloc-macros.h \
-  elf32-target.h
 elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
@@ -1759,10 +1745,6 @@
   $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
   $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \
   $(INCDIR)/coff/external.h ecoffswap.h elf32-target.h
-elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.h elf-bfd.h \
-  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
-  elf32-target.h
 elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 998bca7..d8b465c 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -800,7 +800,6 @@
 	case bfd_mach_mips12000:
 	case bfd_mach_mips16:
 	case bfd_mach_mipsisa32:
-	case bfd_mach_mipsisa32r2:
 	case bfd_mach_mips5:
 	case bfd_mach_mipsisa64:
 	case bfd_mach_mips_sb1:
diff --git a/bfd/archures.c b/bfd/archures.c
index f881444..b73766f 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1,6 +1,6 @@
 /* BFD library support routines for architectures.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
 
@@ -145,7 +145,6 @@
 .#define bfd_mach_mips5                 5
 .#define bfd_mach_mips_sb1              12310201 {* octal 'SB', 01 *}
 .#define bfd_mach_mipsisa32             32
-.#define bfd_mach_mipsisa32r2           33
 .#define bfd_mach_mipsisa64             64
 .  bfd_arch_i386,      {* Intel 386 *}
 .#define bfd_mach_i386_i386 1
@@ -272,9 +271,6 @@
 .  bfd_arch_ip2k,      {* Ubicom IP2K microcontrollers. *}
 .#define bfd_mach_ip2022	1
 .#define bfd_mach_ip2022ext	2
-. bfd_arch_iq2000,     {* Vitesse IQ2000.  *}
-.#define bfd_mach_iq2000        1
-.#define bfd_mach_iq10          2
 .  bfd_arch_pj,
 .  bfd_arch_avr,       {* Atmel AVR microcontrollers.  *}
 .#define bfd_mach_avr1		1
@@ -290,20 +286,6 @@
 .  bfd_arch_mmix,      {* Donald Knuth's educational processor.  *}
 .  bfd_arch_xstormy16,
 .#define bfd_mach_xstormy16	1
-.  bfd_arch_msp430,    {* Texas Instruments MSP430 architecture.  *}
-.#define bfd_mach_msp110         110
-.#define bfd_mach_msp11          11
-.#define bfd_mach_msp12          12
-.#define bfd_mach_msp13          13
-.#define bfd_mach_msp14          14
-.#define bfd_mach_msp41          41
-.#define bfd_mach_msp31          31
-.#define bfd_mach_msp32          32
-.#define bfd_mach_msp33          33
-.#define bfd_mach_msp43          43
-.#define bfd_mach_msp44          44
-.#define bfd_mach_msp15          15
-.#define bfd_mach_msp16          16  
 .  bfd_arch_last
 .  };
 */
@@ -363,7 +345,6 @@
 extern const bfd_arch_info_type bfd_i960_arch;
 extern const bfd_arch_info_type bfd_ia64_arch;
 extern const bfd_arch_info_type bfd_ip2k_arch;
-extern const bfd_arch_info_type bfd_iq2000_arch;
 extern const bfd_arch_info_type bfd_m32r_arch;
 extern const bfd_arch_info_type bfd_m68hc11_arch;
 extern const bfd_arch_info_type bfd_m68hc12_arch;
@@ -374,7 +355,6 @@
 extern const bfd_arch_info_type bfd_mmix_arch;
 extern const bfd_arch_info_type bfd_mn10200_arch;
 extern const bfd_arch_info_type bfd_mn10300_arch;
-extern const bfd_arch_info_type bfd_msp430_arch;
 extern const bfd_arch_info_type bfd_ns32k_arch;
 extern const bfd_arch_info_type bfd_openrisc_arch;
 extern const bfd_arch_info_type bfd_or32_arch;
@@ -422,7 +402,6 @@
     &bfd_i960_arch,
     &bfd_ia64_arch,
     &bfd_ip2k_arch,
-    &bfd_iq2000_arch,
     &bfd_m32r_arch,
     &bfd_m68hc11_arch,
     &bfd_m68hc12_arch,
@@ -433,7 +412,6 @@
     &bfd_mmix_arch,
     &bfd_mn10200_arch,
     &bfd_mn10300_arch,
-    &bfd_msp430_arch,
     &bfd_ns32k_arch,
     &bfd_openrisc_arch,
     &bfd_or32_arch,
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index f679fcc..362cc8f 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1572,7 +1572,6 @@
 #define bfd_mach_mips5                 5
 #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
 #define bfd_mach_mipsisa32             32
-#define bfd_mach_mipsisa32r2           33
 #define bfd_mach_mipsisa64             64
   bfd_arch_i386,      /* Intel 386 */
 #define bfd_mach_i386_i386 1
@@ -1699,9 +1698,6 @@
   bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
 #define bfd_mach_ip2022        1
 #define bfd_mach_ip2022ext     2
- bfd_arch_iq2000,     /* Vitesse IQ2000.  */
-#define bfd_mach_iq2000        1
-#define bfd_mach_iq10          2
   bfd_arch_pj,
   bfd_arch_avr,       /* Atmel AVR microcontrollers.  */
 #define bfd_mach_avr1          1
@@ -1717,20 +1713,6 @@
   bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
   bfd_arch_xstormy16,
 #define bfd_mach_xstormy16     1
-  bfd_arch_msp430,    /* Texas Instruments MSP430 architecture.  */
-#define bfd_mach_msp110         110
-#define bfd_mach_msp11          11
-#define bfd_mach_msp12          12
-#define bfd_mach_msp13          13
-#define bfd_mach_msp14          14
-#define bfd_mach_msp41          41
-#define bfd_mach_msp31          31
-#define bfd_mach_msp32          32
-#define bfd_mach_msp33          33
-#define bfd_mach_msp43          43
-#define bfd_mach_msp44          44
-#define bfd_mach_msp15          15
-#define bfd_mach_msp16          16  
   bfd_arch_last
   };
 
@@ -3264,18 +3246,6 @@
   BFD_RELOC_VAX_GLOB_DAT,
   BFD_RELOC_VAX_JMP_SLOT,
   BFD_RELOC_VAX_RELATIVE,
-
-/* msp430 specific relocation codes  */
-  BFD_RELOC_MSP430_10_PCREL,
-  BFD_RELOC_MSP430_16_PCREL,
-  BFD_RELOC_MSP430_16,
-  BFD_RELOC_MSP430_16_PCREL_BYTE,
-  BFD_RELOC_MSP430_16_BYTE,
-
-/* IQ2000 Relocations.  */
-  BFD_RELOC_IQ2000_OFFSET_16,
-  BFD_RELOC_IQ2000_OFFSET_21,
-  BFD_RELOC_IQ2000_UHI16,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index dcb96dd..c13d54b 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1292,7 +1292,7 @@
 	}
 
       if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
-	  || !((*xcoff64_calculate_relocation[rel->r_type])
+	  || ((*xcoff64_calculate_relocation[rel->r_type])
 	      (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
 	       addend, &relocation, contents)))
 	return FALSE;
diff --git a/bfd/config.bfd b/bfd/config.bfd
index ec364a0..9270d7e 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -553,10 +553,6 @@
     targ_defvec=bfd_elf32_ip2k_vec
     ;;
 
-  iq2000-*-elf)
-    targ_defvec=bfd_elf32_iq2000_vec
-    ;;
-
   m32r-*-*)
     targ_defvec=bfd_elf32_m32r_vec
     ;;
@@ -811,10 +807,6 @@
     targ_defvec=bfd_elf32_mn10300_vec
     ;;
 
-  msp430-*-*)
-    targ_defvec=bfd_elf32_msp430_vec
-    ;;
-
   ns32k-pc532-mach* | ns32k-pc532-ux*)
     targ_defvec=pc532machaout_vec
     targ_underscore=yes
diff --git a/bfd/configure b/bfd/configure
index f41ac1d..74fe037 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -6094,7 +6094,6 @@
     bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
     bfd_elf32_ip2k_vec)		tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
-    bfd_elf32_iq2000_vec)       tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_littlearc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
@@ -6109,7 +6108,6 @@
     bfd_elf32_mcore_little_vec)	tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
     bfd_elf32_mn10200_vec)	tb="$tb elf-m10200.lo elf32.lo $elf" ;;
     bfd_elf32_mn10300_vec)	tb="$tb elf-m10300.lo elf32.lo $elf" ;;
-    bfd_elf32_msp430_vec)	tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
     bfd_elf32_nbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_nlittlemips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_ntradbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -6360,10 +6358,10 @@
     if test -n "$GCC" ; then
        bad_64bit_gcc=no;
        echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6363: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6362: checking for gcc version with buggy 64-bit support" >&5
        # Add more tests for gcc versions with non-working 64-bit support here.
        cat > conftest.$ac_ext <<EOF
-#line 6366 "configure"
+#line 6365 "configure"
 #include "confdefs.h"
 :__GNUC__:__GNUC_MINOR__:__i386__:
 EOF
@@ -6409,17 +6407,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6412: checking for $ac_hdr" >&5
+echo "configure:6411: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6417 "configure"
+#line 6416 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6448,12 +6446,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6451: checking for $ac_func" >&5
+echo "configure:6450: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6456 "configure"
+#line 6455 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6476,7 +6474,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6501,7 +6499,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6504: checking for working mmap" >&5
+echo "configure:6503: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6509,7 +6507,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6512 "configure"
+#line 6511 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6662,7 +6660,7 @@
 }
 
 EOF
-if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -6687,12 +6685,12 @@
 for ac_func in madvise mprotect
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6690: checking for $ac_func" >&5
+echo "configure:6689: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6695 "configure"
+#line 6694 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6715,7 +6713,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
diff --git a/bfd/configure.in b/bfd/configure.in
index 82dc090..aa34e7d 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -590,7 +590,6 @@
     bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
     bfd_elf32_ip2k_vec)		tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
-    bfd_elf32_iq2000_vec)       tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_littlearc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
@@ -605,7 +604,6 @@
     bfd_elf32_mcore_little_vec)	tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
     bfd_elf32_mn10200_vec)	tb="$tb elf-m10200.lo elf32.lo $elf" ;;
     bfd_elf32_mn10300_vec)	tb="$tb elf-m10300.lo elf32.lo $elf" ;;
-    bfd_elf32_msp430_vec)	tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
     bfd_elf32_nbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_nlittlemips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_ntradbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
diff --git a/bfd/cpu-iq2000.c b/bfd/cpu-iq2000.c
deleted file mode 100644
index fd6d230..0000000
--- a/bfd/cpu-iq2000.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* BFD support for the Vitesse IQ2000 processor.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-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.  */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-
-static const bfd_arch_info_type arch_info_struct[] =
-{
-  32,				/* bits per word */
-  32,				/* bits per address */
-  8,				/* bits per byte */
-  bfd_arch_iq2000,		/* architecture */
-  bfd_mach_iq10,		/* machine */
-  "iq2000",			/* architecture name */
-  "iq10",			/* printable name */
-  3,				/* section align power */
-  FALSE,				/* the default ? */
-  bfd_default_compatible,	/* architecture comparison fn */
-  bfd_default_scan,		/* string to architecture convert fn */
-  NULL				/* next in list */
-};
-
-const bfd_arch_info_type bfd_iq2000_arch =
-{
-  32,				/* bits per word */
-  32,				/* bits per address */
-  8,				/* bits per byte */
-  bfd_arch_iq2000,		/* architecture */
-  bfd_mach_iq2000,		/* machine */
-  "iq2000",			/* architecture name */
-  "iq2000",			/* printable name */
-  3,				/* section align power */
-  TRUE,				/* the default ? */
-  bfd_default_compatible,	/* architecture comparison fn */
-  bfd_default_scan,		/* string to architecture convert fn */
-  &arch_info_struct[0],		/* next in list */
-};
-
-
-
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index 13355c5..e587535 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -82,7 +82,6 @@
   I_mips16,
   I_mips5,
   I_mipsisa32,
-  I_mipsisa32r2,
   I_mipsisa64,
   I_sb1,
 };
@@ -112,7 +111,6 @@
   N (64, 64, bfd_mach_mips16,   "mips:16",        FALSE, NN(I_mips16)),
   N (64, 64, bfd_mach_mips5,    "mips:mips5",     FALSE, NN(I_mips5)),
   N (32, 32, bfd_mach_mipsisa32,  "mips:isa32",   FALSE, NN(I_mipsisa32)),
-  N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)),
   N (64, 64, bfd_mach_mipsisa64,  "mips:isa64",   FALSE, NN(I_mipsisa64)),
   N (64, 64, bfd_mach_mips_sb1, "mips:sb1",       FALSE, 0),
 };
diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c
deleted file mode 100644
index c7d283b..0000000
--- a/bfd/cpu-msp430.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* BFD library support routines for the MSP architecture.
-   Copyright (C) 2002 Free Software Foundation, Inc.
-   Contributed by Dmitry Diky <diwil@mail.ru>
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   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.  */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-
-static const bfd_arch_info_type *compatible
-  PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
-
-#define N(addr_bits, machine, print, default, next)		\
-{								\
-  16,				/* 16 bits in a word.  */	\
-  addr_bits,			/* Bits in an address.  */	\
-  8,				/* 8 bits in a byte.  */	\
-  bfd_arch_msp430,						\
-  machine,			/* Machine number.  */		\
-  "msp430",			/* Architecture name.   */	\
-  print,			/* Printable name.  */		\
-  1,				/* Section align power.  */	\
-  default,			/* The default machine.  */	\
-  compatible,							\
-  bfd_default_scan,						\
-  next								\
-}
-
-static const bfd_arch_info_type arch_info_struct[] =
-{
-  /* msp430x11x.  */
-  N (16, bfd_mach_msp11, "msp:11", FALSE, & arch_info_struct[1]),
-
-  /* msp430x12x.  */
-  N (16, bfd_mach_msp12, "msp:12", FALSE, & arch_info_struct[2]),
-
-  /* msp430x13x.  */
-  N (16, bfd_mach_msp13, "msp:13", FALSE, & arch_info_struct[3]),
-
-  /* msp430x14x.  */
-  N (16, bfd_mach_msp14, "msp:14", FALSE, & arch_info_struct[4]),
-
-  /* msp430x31x.  */
-  N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[5]), 
-
-  /* msp430x32x.  */
-  N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[6]), 
-
-  /* msp430x33x.  */
-  N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[7]),
-  
-  /* msp430x41x.  */
-  N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[8]),
-
-  /* msp430x43x.  */
-  N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[9]),
-
-  /* msp430x44x.  */
-  N (16, bfd_mach_msp43, "msp:44", FALSE, & arch_info_struct[10]),
-  
-  /* msp430x15x.  */
-  N (16, bfd_mach_msp15, "msp:15", FALSE, & arch_info_struct[11]),
-  
-  /* msp430x16x.  */
-  N (16, bfd_mach_msp16, "msp:16", FALSE, & arch_info_struct[12]),
-
-  /* msp430x11x1.  */
-  N (16, bfd_mach_msp110, "msp:110", FALSE, NULL)
-
-};
-
-const bfd_arch_info_type bfd_msp430_arch =
-  N (16, bfd_mach_msp14, "msp:14", TRUE, & arch_info_struct[0]);
-
-/* This routine is provided two arch_infos and works out which MSP
-   machine which would be compatible with both and returns a pointer
-   to its info structure.  */
-
-static const bfd_arch_info_type *
-compatible (a,b)
-     const bfd_arch_info_type * a;
-     const bfd_arch_info_type * b;
-{
-  /* If a & b are for different architectures we can do nothing.  */
-  if (a->arch != b->arch)
-    return NULL;
-
-  if (a->mach <= b->mach)
-    return b;
-
-  return a;
-}
diff --git a/bfd/elf.c b/bfd/elf.c
index 22349bd..45c7d75 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3518,7 +3518,6 @@
 {
   const asection *sec1 = *(const asection **) arg1;
   const asection *sec2 = *(const asection **) arg2;
-  bfd_size_type size1, size2;
 
   /* Sort by LMA first, since this is the address used to
      place the section into a segment.  */
@@ -3536,7 +3535,7 @@
 
   /* Put !SEC_LOAD sections after SEC_LOAD ones.  */
 
-#define TOEND(x) (((x)->flags & (SEC_LOAD|SEC_THREAD_LOCAL)) == 0)
+#define TOEND(x) (((x)->flags & SEC_LOAD) == 0)
 
   if (TOEND (sec1))
     {
@@ -3558,12 +3557,9 @@
   /* Sort by size, to put zero sized sections
      before others at the same address.  */
 
-  size1 = (sec1->flags & SEC_LOAD) ? sec1->_raw_size : 0;
-  size2 = (sec2->flags & SEC_LOAD) ? sec2->_raw_size : 0;
-
-  if (size1 < size2)
+  if (sec1->_raw_size < sec2->_raw_size)
     return -1;
-  if (size1 > size2)
+  if (sec1->_raw_size > sec2->_raw_size)
     return 1;
 
   return sec1->target_index - sec2->target_index;
@@ -3844,15 +3840,9 @@
 	      bfd_vma adjust = sec->lma - (p->p_paddr + p->p_memsz);
 
 	      p->p_memsz += adjust;
-	      if (p->p_type == PT_LOAD
-		  || (p->p_type == PT_NOTE
-		      && bfd_get_format (abfd) == bfd_core))
-		{
-		  off += adjust;
-		  voff += adjust;
-		}
-	      if ((flags & SEC_LOAD) != 0
-		  || (flags & SEC_THREAD_LOCAL) != 0)
+	      off += adjust;
+	      voff += adjust;
+	      if ((flags & SEC_LOAD) != 0)
 		p->p_filesz += adjust;
 	    }
 
@@ -3909,9 +3899,7 @@
 		  || (flags & SEC_HAS_CONTENTS) != 0)
 		off += sec->_raw_size;
 
-	      if ((flags & SEC_ALLOC) != 0
-		  && ((flags & SEC_LOAD) != 0
-		      || (flags & SEC_THREAD_LOCAL) == 0))
+	      if ((flags & SEC_ALLOC) != 0)
 		voff += sec->_raw_size;
 	    }
 
@@ -3938,9 +3926,6 @@
 	    }
 	  else
 	    {
-	      if ((sec->flags & SEC_LOAD) != 0
-		  || (sec->flags & SEC_THREAD_LOCAL) == 0
-		  || p->p_type == PT_TLS)
 	      p->p_memsz += sec->_raw_size;
 
 	      if ((flags & SEC_LOAD) != 0)
@@ -4584,23 +4569,18 @@
   (start + (segment->p_memsz > segment->p_filesz			\
 	    ? segment->p_memsz : segment->p_filesz))
 
-#define SECTION_SIZE(section, segment)					\
-  (((section->flags & (SEC_HAS_CONTENTS | SEC_THREAD_LOCAL))		\
-    != SEC_THREAD_LOCAL || segment->p_type == PT_TLS)			\
-   ? section->_raw_size : 0)
-
   /* Returns TRUE if the given section is contained within
      the given segment.  VMA addresses are compared.  */
 #define IS_CONTAINED_BY_VMA(section, segment)				\
   (section->vma >= segment->p_vaddr					\
-   && (section->vma + SECTION_SIZE (section, segment)			\
+   && (section->vma + section->_raw_size				\
        <= (SEGMENT_END (segment, segment->p_vaddr))))
 
   /* Returns TRUE if the given section is contained within
      the given segment.  LMA addresses are compared.  */
 #define IS_CONTAINED_BY_LMA(section, segment, base)			\
   (section->lma >= base							\
-   && (section->lma + SECTION_SIZE (section, segment)			\
+   && (section->lma + section->_raw_size				\
        <= SEGMENT_END (segment, base)))
 
   /* Special case: corefile "NOTE" section containing regs, prpsinfo etc.  */
@@ -4632,9 +4612,7 @@
           if that is set for the segment and the VMA otherwise,
        2. It is an allocated segment,
        3. There is an output section associated with it,
-       4. The section has not already been allocated to a previous segment.
-       5. PT_TLS segment includes only SHF_TLS sections.
-       6. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.  */
+       4. The section has not already been allocated to a previous segment.  */
 #define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed)		\
   ((((segment->p_paddr							\
       ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr)	\
@@ -4642,11 +4620,6 @@
      && (section->flags & SEC_ALLOC) != 0)				\
     || IS_COREFILE_NOTE (segment, section))				\
    && section->output_section != NULL					\
-   && (segment->p_type != PT_TLS					\
-       || (section->flags & SEC_THREAD_LOCAL))				\
-   && (segment->p_type == PT_LOAD					\
-       || segment->p_type == PT_TLS					\
-       || (section->flags & SEC_THREAD_LOCAL) == 0)			\
    && ! section->segment_mark)
 
   /* Returns TRUE iff seg1 starts after the end of seg2.  */
@@ -5124,7 +5097,6 @@
 #endif
 
 #undef SEGMENT_END
-#undef SECTION_SIZE
 #undef IS_CONTAINED_BY_VMA
 #undef IS_CONTAINED_BY_LMA
 #undef IS_COREFILE_NOTE
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 2646f3d..f8c88b1 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3416,14 +3416,15 @@
     case R_PARISC_DPREL14R:
     case R_PARISC_DPREL14F:
     /* For all the DP relative relocations, we need to examine the symbol's
-       section.  If it has no section or if it's a code section, then
-       "data pointer relative" makes no sense.  In that case we don't
-       adjust the "value", and for 21 bit addil instructions, we change the
-       source addend register from %dp to %r0.  This situation commonly
-       arises for undefined weak symbols and when a variable's "constness"
+       section.  If it's a code section, then "data pointer relative" makes
+       no sense.  In that case we don't adjust the "value", and for 21 bit
+       addil instructions, we change the source addend register from %dp to
+       %r0.  This situation commonly arises when a variable's "constness"
        is declared differently from the way the variable is defined.  For
        instance: "extern int foo" with foo defined as "const int foo".  */
-      if (sym_sec == NULL || (sym_sec->flags & SEC_CODE) != 0)
+      if (sym_sec == NULL)
+	break;
+      if ((sym_sec->flags & SEC_CODE) != 0)
 	{
 	  if ((insn & ((0x3f << 26) | (0x1f << 21)))
 	      == (((int) OP_ADDIL << 26) | (27 << 21)))
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index cd2b970..dd2bb97f 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1,5 +1,5 @@
 /* Ubicom IP2xxx specific support for 32-bit ELF
-   Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -33,151 +33,143 @@
   Elf_Internal_Sym *   isymbuf;
 };
 
-struct ip2k_opcode
-{
-  unsigned short opcode;
-  unsigned short mask;
-};
-  
 /* Prototypes.  */
 static reloc_howto_type *ip2k_reloc_type_lookup
   PARAMS ((bfd *, bfd_reloc_code_real_type));
-static int ip2k_is_opcode
-  PARAMS ((bfd_byte *, const struct ip2k_opcode *));
+static void ip2k_info_to_howto_rela
+  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+static asection * ip2k_elf_gc_mark_hook
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static bfd_boolean ip2k_elf_gc_sweep_hook
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+	   const Elf_Internal_Rela *));
 static bfd_vma symbol_value
   PARAMS ((bfd *, Elf_Internal_Shdr *, Elf_Internal_Sym *,
 	   Elf_Internal_Rela *));
-static void ip2k_get_mem
-  PARAMS ((bfd *, bfd_byte *, int, bfd_byte *));
-static bfd_vma ip2k_nominal_page_bits
-  PARAMS ((bfd *, asection *, bfd_vma, bfd_byte *));
-static bfd_boolean ip2k_test_page_insn
-  PARAMS ((bfd *, asection *, Elf_Internal_Rela *, struct misc *));
-static bfd_boolean ip2k_delete_page_insn
-  PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_boolean *, struct misc *));
-static int ip2k_is_switch_table_128
-  PARAMS ((bfd *, asection *, bfd_vma, bfd_byte *));
-static bfd_boolean ip2k_relax_switch_table_128
-  PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_boolean *, struct misc *));
-static int ip2k_is_switch_table_256
-  PARAMS ((bfd *, asection *, bfd_vma, bfd_byte *));
-static bfd_boolean ip2k_relax_switch_table_256
-  PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_boolean *, struct misc *));
-static bfd_boolean ip2k_elf_relax_section
-  PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean ip2k_elf_relax_section_page
-  PARAMS ((bfd *, asection *, bfd_boolean *, struct misc *, unsigned long, unsigned long));
 static void adjust_all_relocations
   PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, int, int));
 static bfd_boolean ip2k_elf_relax_delete_bytes
   PARAMS ((bfd *, asection *, bfd_vma, int));
-static void ip2k_info_to_howto_rela
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+static bfd_boolean ip2k_elf_relax_add_bytes
+  PARAMS ((bfd *, asection *, bfd_vma, const bfd_byte *, int, int));
+static bfd_boolean add_page_insn
+  PARAMS ((bfd *, asection *, Elf_Internal_Rela *, struct misc *));
+static bfd_boolean ip2k_elf_relax_section
+  PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+static bfd_boolean relax_switch_dispatch_tables_pass1
+  PARAMS ((bfd *, asection *, bfd_vma, struct misc *));
+static bfd_boolean unrelax_dispatch_table_entries
+  PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, bfd_boolean *, struct misc *));
+static bfd_boolean unrelax_switch_dispatch_tables_passN
+  PARAMS ((bfd *, asection *, bfd_vma, bfd_boolean *, struct misc *));
+static bfd_boolean is_switch_128_dispatch_table_p
+  PARAMS ((bfd *, bfd_vma, bfd_boolean, struct misc *));
+static bfd_boolean is_switch_256_dispatch_table_p
+  PARAMS ((bfd *, bfd_vma, bfd_boolean, struct misc *));
+static bfd_boolean ip2k_elf_relax_section_pass1
+  PARAMS ((bfd *, asection *, bfd_boolean *, struct misc *));
+static bfd_boolean ip2k_elf_relax_section_passN
+  PARAMS ((bfd *, asection *, bfd_boolean *, bfd_boolean *, struct misc *));
 static bfd_reloc_status_type ip2k_final_link_relocate
   PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
 	   Elf_Internal_Rela *, bfd_vma));
 static bfd_boolean ip2k_elf_relocate_section
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
 	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static asection *ip2k_elf_gc_mark_hook
-  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean ip2k_elf_gc_sweep_hook
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-	   const Elf_Internal_Rela *));
 
-static bfd_boolean ip2k_relaxed = FALSE;
+#define IS_OPCODE(CODE0,CODE1,OPCODE) \
+  ((CODE0) == (OPCODE)[0] && (CODE1) == (OPCODE)[1])
 
-static const struct ip2k_opcode ip2k_page_opcode[] =
+#define PAGE_INSN_0		0x00
+#define PAGE_INSN_1		0x10
+
+static const bfd_byte page_opcode[] =
 {
-  {0x0010, 0xFFF8},	/* page */
-  {0x0000, 0x0000},
+   PAGE_INSN_0, PAGE_INSN_1
 };
 
-#define IS_PAGE_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_page_opcode)
+#define IS_PAGE_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, page_opcode)
 
-static const struct ip2k_opcode ip2k_jmp_opcode[] =
+#define JMP_INSN_0		0xE0
+#define JMP_INSN_1		0x00
+
+static const bfd_byte jmp_opcode[] =
 {
-  {0xE000, 0xE000},	/* jmp */
-  {0x0000, 0x0000},
+   JMP_INSN_0, JMP_INSN_1
 };
 
-#define IS_JMP_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_jmp_opcode)
+#define IS_JMP_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, jmp_opcode)
 
-static const struct ip2k_opcode ip2k_call_opcode[] =
+#define CALL_INSN_0		0xC0
+#define CALL_INSN_1		0x00
+
+static const bfd_byte call_opcode[] =
 {
-  {0xC000, 0xE000},	/* call */
-  {0x0000, 0x0000},
+  CALL_INSN_0, CALL_INSN_1
 };
 
-#define IS_CALL_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_call_opcode)
+#define IS_CALL_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, call_opcode)
 
-static const struct ip2k_opcode ip2k_snc_opcode[] =
+#define ADD_PCL_W_INSN_0	0x1E
+#define ADD_PCL_W_INSN_1	0x09
+
+static const bfd_byte add_pcl_w_opcode[] =
 {
-  {0xA00B, 0xFFFF},	/* snc */
-  {0x0000, 0x0000},
+  ADD_PCL_W_INSN_0, ADD_PCL_W_INSN_1
 };
 
-#define IS_SNC_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_snc_opcode)
+#define IS_ADD_PCL_W_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, add_pcl_w_opcode)
 
-static const struct ip2k_opcode ip2k_inc_1sp_opcode[] =
+#define ADD_W_WREG_INSN_0	0x1C
+#define ADD_W_WREG_INSN_1	0x0A
+
+static const bfd_byte add_w_wreg_opcode[] =
 {
-  {0x2B81, 0xFFFF},	/* inc 1(SP) */
-  {0x0000, 0x0000},
+  ADD_W_WREG_INSN_0, ADD_W_WREG_INSN_1
 };
 
-#define IS_INC_1SP_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_inc_1sp_opcode)
+#define IS_ADD_W_WREG_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, add_w_wreg_opcode)
 
-static const struct ip2k_opcode ip2k_add_2sp_w_opcode[] =
+#define SNC_INSN_0		0xA0
+#define SNC_INSN_1		0x0B
+
+static const bfd_byte snc_opcode[] =
 {
-  {0x1F82, 0xFFFF},	/* add 2(SP),w */
-  {0x0000, 0x0000},
+   SNC_INSN_0, SNC_INSN_1
 };
 
-#define IS_ADD_2SP_W_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_add_2sp_w_opcode)
+#define IS_SNC_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, snc_opcode)
 
-static const struct ip2k_opcode ip2k_add_w_wreg_opcode[] =
+#define INC_1_SP_INSN_0		0x2B
+#define INC_1_SP_INSN_1		0x81
+
+static const bfd_byte inc_1_sp_opcode[] =
 {
-  {0x1C0A, 0xFFFF},	/* add w,wreg */
-  {0x1E0A, 0xFFFF},	/* add wreg,w */
-  {0x0000, 0x0000},
+   INC_1_SP_INSN_0, INC_1_SP_INSN_1
 };
 
-#define IS_ADD_W_WREG_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_add_w_wreg_opcode)
+#define IS_INC_1_SP_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, inc_1_sp_opcode)
 
-static const struct ip2k_opcode ip2k_add_pcl_w_opcode[] =
+#define ADD_2_SP_W_INSN_0	0x1F
+#define ADD_2_SP_W_INSN_1	0x82
+
+static const bfd_byte add_2_sp_w_opcode[] =
 {
-  {0x1E09, 0xFFFF},	/* add pcl,w */
-  {0x0000, 0x0000},
+   ADD_2_SP_W_INSN_0, ADD_2_SP_W_INSN_1
 };
 
-#define IS_ADD_PCL_W_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_add_pcl_w_opcode)
+#define IS_ADD_2_SP_W_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, add_2_sp_w_opcode)
 
-static const struct ip2k_opcode ip2k_skip_opcodes[] =
-{
-  {0xB000, 0xF000},	/* sb */
-  {0xA000, 0xF000},	/* snb */
-  {0x7600, 0xFE00},	/* cse/csne #lit */
-  {0x5800, 0xFC00},	/* incsnz */
-  {0x4C00, 0xFC00},	/* decsnz */
-  {0x4000, 0xFC00},	/* cse/csne */
-  {0x3C00, 0xFC00},	/* incsz */
-  {0x2C00, 0xFC00},	/* decsz */
-  {0x0000, 0x0000},
-};
-
-#define IS_SKIP_OPCODE(code) \
-  ip2k_is_opcode (code, ip2k_skip_opcodes)
-
-/* Relocation tables.  */
+/* Relocation tables. */
 static reloc_howto_type ip2k_elf_howto_table [] =
 {
 #define IP2K_HOWTO(t,rs,s,bs,pr,bp,name,sm,dm) \
@@ -195,7 +187,7 @@
           dm,                   /* dst_mask */ \
           pr)                   /* pcrel_offset */
 
-  /* This reloc does nothing.  */
+  /* This reloc does nothing. */
   IP2K_HOWTO (R_IP2K_NONE, 0,2,32, FALSE, 0, "R_IP2K_NONE", 0, 0),
   /* A 16 bit absolute relocation.  */
   IP2K_HOWTO (R_IP2K_16, 0,1,16, FALSE, 0, "R_IP2K_16", 0, 0xffff),
@@ -227,7 +219,7 @@
 };
 
 
-/* Map BFD reloc types to IP2K ELF reloc types.  */
+/* Map BFD reloc types to IP2K ELF reloc types. */
 static reloc_howto_type *
 ip2k_reloc_type_lookup (abfd, code)
      bfd * abfd ATTRIBUTE_UNUSED;
@@ -236,7 +228,7 @@
   /* Note that the ip2k_elf_howto_table is indxed by the R_
      constants.  Thus, the order that the howto records appear in the
      table *must* match the order of the relocation types defined in
-     include/elf/ip2k.h.  */
+     include/elf/ip2k.h. */
 
   switch (code)
     {
@@ -271,42 +263,13 @@
     case BFD_RELOC_IP2K_EX8DATA:
       return &ip2k_elf_howto_table[ (int) R_IP2K_EX8DATA];
     default:
-      /* Pacify gcc -Wall.  */
+      /* Pacify gcc -Wall. */
       return NULL;
     }
   return NULL;
 }
 
-static void
-ip2k_get_mem (abfd, addr, length, ptr)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_byte *addr;
-     int length;
-     bfd_byte *ptr;
-{
-  while (length --)
-    * ptr ++ = bfd_get_8 (abfd, addr ++);
-}
-
-static bfd_boolean
-ip2k_is_opcode (code, opcodes)
-     bfd_byte *code;
-     const struct ip2k_opcode *opcodes;
-{
-  unsigned short insn = (code[0] << 8) | code[1];
-
-  while (opcodes->mask != 0)
-    {
-      if ((insn & opcodes->mask) == opcodes->opcode)
-	return TRUE;
-
-      opcodes ++;
-    }
-
-  return FALSE;
-}
-
-#define PAGENO(ABSADDR) ((ABSADDR) & 0xFFFFC000)
+#define PAGENO(ABSADDR) ((ABSADDR) & 0x1C000)
 #define BASEADDR(SEC)	((SEC)->output_section->vma + (SEC)->output_offset)
 
 #define UNDEFINED_SYMBOL (~(bfd_vma)0)
@@ -354,115 +317,6 @@
     }
 }
 
-/* Returns the expected page state for the given instruction not including
-   the effect of page instructions.  */
-
-static bfd_vma
-ip2k_nominal_page_bits (abfd, sec, addr, contents)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     bfd_vma addr;
-     bfd_byte *contents;
-{
-  bfd_vma page = PAGENO (BASEADDR (sec) + addr);
-
-  /* Check if section flows into this page. If not then the page
-     bits are assumed to match the PC. This will be true unless
-     the user has a page instruction without a call/jump, in which
-     case they are on their own.  */
-  if (PAGENO (BASEADDR (sec)) == page)
-    return page;
-
-  /* Section flows across page boundary. The page bits should match
-     the PC unless there is a possible flow from the previous page,
-     in which case it is not possible to determine the value of the
-     page bits.  */
-  while (PAGENO (BASEADDR (sec) + addr - 2) == page)
-    {
-      bfd_byte code[2];
-
-      addr -= 2;
-      ip2k_get_mem (abfd, contents + addr, 2, code);
-      if (!IS_PAGE_OPCODE (code))
-	continue;
-
-      /* Found a page instruction, check if jump table.  */
-      if (ip2k_is_switch_table_128 (abfd, sec, addr, contents) != -1)
-	/* Jump table => page is conditional.  */
-	continue;
-
-      if (ip2k_is_switch_table_256 (abfd, sec, addr, contents) != -1)
-	/* Jump table => page is conditional.  */
-	continue;
-
-      /* Found a page instruction, check if conditional.  */
-      if (addr >= 2)
-        {
-	  ip2k_get_mem (abfd, contents + addr - 2, 2, code);
-          if (IS_SKIP_OPCODE (code))
-	    /* Page is conditional.  */
-	    continue;
-        }
-
-      /* Unconditional page instruction => page bits should be correct.  */
-      return page;
-    }
-
-  /* Flow from previous page => page bits are impossible to determine.  */
-  return 0;
-}
-
-static bfd_boolean
-ip2k_test_page_insn (abfd, sec, irel, misc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     Elf_Internal_Rela *irel;
-     struct misc *misc;
-{
-  bfd_vma symval;
-
-  /* Get the value of the symbol referred to by the reloc.  */
-  symval = symbol_value (abfd, misc->symtab_hdr, misc->isymbuf, irel);
-  if (symval == UNDEFINED_SYMBOL)
-    /* This appears to be a reference to an undefined
-       symbol.  Just ignore it--it will be caught by the
-       regular reloc processing.  */
-    return FALSE;
-
-  /* Test if we can delete this page instruction.  */
-  if (PAGENO (symval + irel->r_addend) !=
-      ip2k_nominal_page_bits (abfd, sec, irel->r_offset, misc->contents))
-    return FALSE;
-
-  return TRUE;
-}
-
-static bfd_boolean
-ip2k_delete_page_insn (abfd, sec, irel, again, misc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     Elf_Internal_Rela *irel;
-     bfd_boolean *again;
-     struct misc *misc;
-{
-  /* Note that we've changed the relocs, section contents, etc.  */
-  elf_section_data (sec)->relocs = misc->irelbase;
-  elf_section_data (sec)->this_hdr.contents = misc->contents;
-  misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
-
-  /* Fix the relocation's type.  */
-  irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_IP2K_NONE);
-
-  /* Delete the PAGE insn.  */
-  if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 2))
-    return FALSE;
-	
-  /* Modified => will need to iterate relaxation again.  */
-  *again = TRUE;
-  
-  return TRUE;
-}
-
 /* Determine if the instruction sequence matches that for
    the prologue of a switch dispatch table with fewer than
    128 entries.
@@ -492,116 +346,48 @@
  	   ...
           jmp     $nnnN  */
 
-static int
-ip2k_is_switch_table_128 (abfd, sec, addr, contents)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     bfd_vma addr;
-     bfd_byte *contents;
-{
-  bfd_byte code[4];
-  int index = 0;
-  
-  /* Check current page-jmp.  */
-  if (addr + 4 > sec->_cooked_size)
-    return -1;
-
-  ip2k_get_mem (abfd, contents + addr, 4, code);
-
-  if ((! IS_PAGE_OPCODE (code + 0))
-      || (! IS_JMP_OPCODE (code + 2)))
-    return -1;
-  
-  /* Search back.  */
-  while (1)
-    {
-      if (addr < 4)
-	return -1;
-
-      /* Check previous 2 instructions.  */
-      ip2k_get_mem (abfd, contents + addr - 4, 4, code);
-      if ((IS_ADD_W_WREG_OPCODE (code + 0))
-	  && (IS_ADD_PCL_W_OPCODE (code + 2)))
-	return index;
-
-      if ((! IS_PAGE_OPCODE (code + 0))
-	  || (! IS_JMP_OPCODE (code + 2)))
-	return -1;
-
-      index++;
-      addr -= 4;
-    }
-}
-
 static bfd_boolean
-ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc)
+is_switch_128_dispatch_table_p (abfd, addr, relaxed, misc)
      bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     Elf_Internal_Rela *irel;
-     bfd_boolean *again;
+     bfd_vma addr;
+     bfd_boolean relaxed;
      struct misc *misc;
 {
-  Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
-  Elf_Internal_Rela *ireltest = irel;
-  bfd_byte code[4];
-  bfd_vma addr;
-  
-  /* Test all page instructions.  */
-  addr = irel->r_offset;
-  while (1)
-    {
-      if (addr + 4 > sec->_cooked_size)
-	break;
+  bfd_byte code0, code1;
 
-      ip2k_get_mem (abfd, misc->contents + addr, 4, code);
-      if ((! IS_PAGE_OPCODE (code + 0))
-	  || (! IS_JMP_OPCODE (code + 2)))
-	break;
-
-      /* Validate relocation entry (every entry should have a matching
-          relocation entry).  */
-      if (ireltest >= irelend)
-        {
-	  _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
-          return FALSE;
-        }
-
-      if (ireltest->r_offset != addr)
-        {
-	  _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
-          return FALSE;
-        }
-
-      if (! ip2k_test_page_insn (abfd, sec, ireltest, misc))
-	/* Un-removable page insn => nothing can be done.  */
-	return TRUE;
-
-      addr += 4;
-      ireltest += 2;
-    }
-
-  /* Relaxable. Adjust table header.  */
-  ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 4, code);
-  if ((! IS_ADD_W_WREG_OPCODE (code + 0))
-      || (! IS_ADD_PCL_W_OPCODE (code + 2)))
-    {
-      _bfd_error_handler (_("ip2k relaxer: switch table header corrupt."));
-      return FALSE;
-    }
-
-  if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset - 4, 2))
+  if (addr < (3 * 2))
     return FALSE;
 
-  *again = TRUE;
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
 
-  /* Delete all page instructions in table.  */
-  while (irel < ireltest)
+  /* Is it ADD PCL,W */
+  if (! IS_ADD_PCL_W_OPCODE (code0, code1))
+    return FALSE;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 4);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 3);
+
+  if (relaxed)
+    /* Is it ADD W,WREG  */
+    return ! IS_ADD_W_WREG_OPCODE (code0, code1);
+
+  else
     {
-      if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
+      /* Is it ADD W,WREG  */
+      if (! IS_ADD_W_WREG_OPCODE (code0, code1))
 	return FALSE;
-      irel += 2;
+
+      code0 = bfd_get_8 (abfd, misc->contents + addr - 6);
+      code1 = bfd_get_8 (abfd, misc->contents + addr - 5);
+
+      /* Is it JMP $nnnn  */
+      if (! IS_JMP_OPCODE (code0, code1))
+        return FALSE;
     }
 
+  /* It looks like we've found the prologue for
+     a 1-127 entry switch dispatch table.  */
   return TRUE;
 }
 
@@ -645,155 +431,353 @@
           ...
           jmp     $nnnN  */
 
-static int
-ip2k_is_switch_table_256 (abfd, sec, addr, contents)
+static bfd_boolean
+is_switch_256_dispatch_table_p (abfd, addr, relaxed,  misc)
      bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
      bfd_vma addr;
-     bfd_byte *contents;
+     bfd_boolean relaxed;
+     struct misc *misc;
 {
-  bfd_byte code[16];
-  int index = 0;
-  
-  /* Check current page-jmp.  */
-  if (addr + 4 > sec->_cooked_size)
-    return -1;
+  bfd_byte code0, code1;
 
-  ip2k_get_mem (abfd, contents + addr, 4, code);
-  if ((! IS_PAGE_OPCODE (code + 0))
-      || (! IS_JMP_OPCODE (code + 2)))
-    return -1;
-  
-  /* Search back.  */
-  while (1)
+  if (addr < (8 * 2))
+    return FALSE;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+
+  /* Is it INC 1(SP).  */
+  if (! IS_INC_1_SP_OPCODE (code0, code1))
+    return FALSE;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 4);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 3);
+
+  /* Is it SNC.  */
+  if (! IS_SNC_OPCODE (code0, code1))
+    return FALSE;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 6);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 5);
+
+  /* Is it ADD 2(SP),W.  */
+  if (! IS_ADD_2_SP_W_OPCODE (code0, code1))
+    return FALSE;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 8);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 7);
+
+  if (relaxed)
+    /* Is it INC 1(SP).  */
+    return ! IS_INC_1_SP_OPCODE (code0, code1);
+
+  else
     {
-      if (addr < 16)
-	return -1;
+      /* Is it INC 1(SP).  */
+      if (! IS_INC_1_SP_OPCODE (code0, code1))
+	return FALSE;
 
-      /* Check previous 8 instructions.  */
-      ip2k_get_mem (abfd, contents + addr - 16, 16, code);
-      if ((IS_ADD_W_WREG_OPCODE (code + 0))
-	  && (IS_SNC_OPCODE (code + 2))
-	  && (IS_INC_1SP_OPCODE (code + 4))
-	  && (IS_ADD_2SP_W_OPCODE (code + 6))
-	  && (IS_SNC_OPCODE (code + 8))
-	  && (IS_INC_1SP_OPCODE (code + 10))
-	  && (IS_PAGE_OPCODE (code + 12))
-	  && (IS_JMP_OPCODE (code + 14)))
-	return index;
+      code0 = bfd_get_8 (abfd, misc->contents + addr - 10);
+      code1 = bfd_get_8 (abfd, misc->contents + addr - 9);
 
-      if ((IS_ADD_W_WREG_OPCODE (code + 2))
-	  && (IS_SNC_OPCODE (code + 4))
-	  && (IS_INC_1SP_OPCODE (code + 6))
-	  && (IS_ADD_2SP_W_OPCODE (code + 8))
-	  && (IS_SNC_OPCODE (code + 10))
-	  && (IS_INC_1SP_OPCODE (code + 12))
-	  && (IS_JMP_OPCODE (code + 14)))
-	return index;
-      
-      if ((! IS_PAGE_OPCODE (code + 0))
-	  || (! IS_JMP_OPCODE (code + 2)))
-	return -1;
+      /* Is it SNC.  */
+      if (! IS_SNC_OPCODE (code0, code1))
+        return FALSE;
 
-      index++;
-      addr -= 4;
+      code0 = bfd_get_8 (abfd, misc->contents + addr - 12);
+      code1 = bfd_get_8 (abfd, misc->contents + addr - 11);
+
+      /* Is it ADD W,WREG.  */
+      if (! IS_ADD_W_WREG_OPCODE (code0, code1))
+	return FALSE;
     }
+
+  /* It looks like we've found the prologue for
+     a 128-255 entry switch dispatch table.  */
+  return TRUE;
 }
 
 static bfd_boolean
-ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc)
-     bfd *abfd ATTRIBUTE_UNUSED;
+relax_switch_dispatch_tables_pass1 (abfd, sec, addr, misc)
+     bfd *abfd;
      asection *sec;
-     Elf_Internal_Rela *irel;
-     bfd_boolean *again;
+     bfd_vma addr;
      struct misc *misc;
 {
-  Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
-  Elf_Internal_Rela *ireltest = irel;
-  bfd_byte code[12];
-  bfd_vma addr;
-  
-  /* Test all page instructions.  */
-  addr = irel->r_offset;
-
-  while (1)
+  if (addr + 3 < sec->_cooked_size)
     {
-      if (addr + 4 > sec->_cooked_size)
-	break;
+      bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr + 2);
+      bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr + 3);
 
-      ip2k_get_mem (abfd, misc->contents + addr, 4, code);
+      if (IS_JMP_OPCODE (code0, code1)
+	  && is_switch_128_dispatch_table_p (abfd, addr, FALSE, misc))
+	{
+	  /* Delete ADD W,WREG from prologue.  */
+	  ip2k_elf_relax_delete_bytes (abfd, sec, addr - (2 * 2), (1 * 2));
+	  return TRUE;
+	}
 
-      if ((! IS_PAGE_OPCODE (code + 0))
-	  || (! IS_JMP_OPCODE (code + 2)))
-	break;
-
-      /* Validate relocation entry (every entry should have a matching
-          relocation entry).  */
-      if (ireltest >= irelend)
-        {
-          _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
-          return FALSE;
-        }
-
-      if (ireltest->r_offset != addr)
-        {
-          _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information."));
-          return FALSE;
-        }
-
-      if (!ip2k_test_page_insn (abfd, sec, ireltest, misc))
-	/* Un-removable page insn => nothing can be done.  */
-	return TRUE;
-
-      addr += 4;
-      ireltest += 2;
-    }
-
-  /* Relaxable. Adjust table header.  */
-  ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 2, code);
-  if (IS_PAGE_OPCODE (code))
-    addr = irel->r_offset - 16;
-  else
-    addr = irel->r_offset - 14;
-
-  ip2k_get_mem (abfd, misc->contents + addr, 12, code);
-  if ((!IS_ADD_W_WREG_OPCODE (code + 0))
-      || (!IS_SNC_OPCODE (code + 2))
-      || (!IS_INC_1SP_OPCODE (code + 4))
-      || (!IS_ADD_2SP_W_OPCODE (code + 6))
-      || (!IS_SNC_OPCODE (code + 8))
-      || (!IS_INC_1SP_OPCODE (code + 10)))
-    {
-      _bfd_error_handler (_("ip2k relaxer: switch table header corrupt."));
-      return FALSE;
-    }
-
-  /* Delete first 3 opcodes.  */
-  if (!ip2k_elf_relax_delete_bytes (abfd, sec, addr + 0, 6))
-    return FALSE;
-
-  *again = TRUE;
-
-  /* Delete all page instructions in table.  */
-  while (irel < ireltest)
-    {
-      if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
-	return FALSE;
-      irel += 2;
+      if (IS_JMP_OPCODE (code0, code1)
+	  && is_switch_256_dispatch_table_p (abfd, addr, FALSE, misc))
+	{
+	  /* Delete ADD W,WREG; SNC ; INC 1(SP) from prologue.  */
+	  ip2k_elf_relax_delete_bytes (abfd, sec, addr - 6 * 2, 3 * 2);
+	  return TRUE;
+	}
     }
 
   return TRUE;
 }
 
-/* This function handles relaxing for the ip2k.
+static bfd_boolean
+unrelax_dispatch_table_entries (abfd, sec, first, last, changed, misc)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma first;
+     bfd_vma last;
+     bfd_boolean *changed;
+     struct misc *misc;
+{
+  bfd_vma addr = first;
 
-   Principle: Start with the first page and remove page instructions that
-   are not require on this first page. By removing page instructions more
-   code will fit into this page - repeat until nothing more can be achieved
-   for this page. Move on to the next page.
+  while (addr < last)
+    {
+      bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr);
+      bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr + 1);
 
-   Processing the pages one at a time from the lowest page allows a removal
-   only policy to be used - pages can be removed but are never reinserted.  */
+      /* We are only expecting to find PAGE or JMP insns
+         in the dispatch table. If we find anything else
+         something has gone wrong failed the relaxation
+         which will cause the link to be aborted.  */
+
+      if (IS_PAGE_OPCODE (code0, code1))
+	/* Skip the PAGE and JMP insns.  */
+        addr += 4;
+      else if (IS_JMP_OPCODE (code0, code1))
+         {
+            Elf_Internal_Rela * irelend = misc->irelbase
+					  + sec->reloc_count;
+            Elf_Internal_Rela * irel;
+
+            /* Find the relocation entry.  */
+            for (irel = misc->irelbase; irel < irelend; irel++)
+               {
+                  if (irel->r_offset == addr
+                      && ELF32_R_TYPE (irel->r_info) == R_IP2K_ADDR16CJP)
+                    {
+                      if (! add_page_insn (abfd, sec, irel, misc))
+			/* Something has gone wrong.  */
+                        return FALSE;
+
+		      *changed = TRUE;
+		      break;
+                    }
+               }
+
+	    /* If we fell off the end something has gone wrong.  */
+	    if (irel >= irelend)
+	      /* Something has gone wrong.  */
+	      return FALSE;
+
+	    /* Skip the PAGE and JMP isns.  */
+	    addr += 4;
+	    /* Acount for the new PAGE insn.  */
+            last += 2;
+          }
+       else
+	 /* Something has gone wrong.  */
+	 return FALSE;
+    }
+
+  return TRUE;
+}
+
+static bfd_boolean
+unrelax_switch_dispatch_tables_passN (abfd, sec, addr, changed, misc)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     bfd_boolean *changed;
+     struct misc *misc;
+{
+  if (2 <= addr && (addr + 3) < sec->_cooked_size)
+    {
+      bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
+      bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+
+      if (IS_PAGE_OPCODE (code0, code1))
+	{
+	  addr -= 2;
+	  code0 = bfd_get_8 (abfd, misc->contents + addr + 2);
+          code1 = bfd_get_8 (abfd, misc->contents + addr + 3);
+	}
+      else
+	{
+	  code0 = bfd_get_8 (abfd, misc->contents + addr);
+	  code1 = bfd_get_8 (abfd, misc->contents + addr + 1);
+	}
+
+      if (IS_JMP_OPCODE (code0, code1)
+          && is_switch_128_dispatch_table_p (abfd, addr, TRUE, misc))
+        {
+	  bfd_vma first = addr;
+	  bfd_vma last  = first;
+	  bfd_boolean relaxed = TRUE;
+
+	  /* On the final pass we must check if *all* entries in the
+	     dispatch table are relaxed. If *any* are not relaxed
+	     then we must unrelax *all* the entries in the dispach
+	     table and also unrelax the dispatch table prologue.  */
+
+	  /* Find the last entry in the dispach table.  */
+	  while (last < sec->_cooked_size)
+	     {
+	        code0 = bfd_get_8 (abfd, misc->contents + last);
+	        code1 = bfd_get_8 (abfd, misc->contents + last + 1);
+
+		if (IS_PAGE_OPCODE (code0, code1))
+		  relaxed = FALSE;
+		else if (! IS_JMP_OPCODE (code0, code1))
+		    break;
+
+	        last += 2;
+	     }
+
+	  /* We should have found the end of the dispatch table
+	     before reaching the end of the section. If we've have
+	     reached the end then fail the relaxation which will
+	     cause the link to be aborted.  */
+	  if (last >= sec->_cooked_size)
+	    /* Something has gone wrong.  */
+	    return FALSE;
+
+	  /* If we found an unrelaxed entry then
+	     unlrelax all the switch table entries.  */
+	  if (! relaxed )
+	    {
+	      if (! unrelax_dispatch_table_entries (abfd, sec, first,
+						    last, changed, misc))
+		/* Something has gone wrong.  */
+	        return FALSE;
+
+	      if (! is_switch_128_dispatch_table_p (abfd, addr, TRUE, misc))
+		/* Something has gone wrong.  */
+		return FALSE;
+
+              /* Unrelax the prologue.  */
+
+              /* Insert an ADD W,WREG insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+					      addr - 2,
+					      add_w_wreg_opcode,
+					      sizeof (add_w_wreg_opcode),
+					      0))
+		/* Something has gone wrong.  */
+                return FALSE;
+	    }
+
+          return TRUE;
+        }
+
+      if (IS_JMP_OPCODE (code0, code1)
+          && is_switch_256_dispatch_table_p (abfd, addr, TRUE, misc))
+        {
+          bfd_vma first = addr;
+          bfd_vma last;
+          bfd_boolean relaxed = TRUE;
+
+          /* On the final pass we must check if *all* entries in the
+             dispatch table are relaxed. If *any* are not relaxed
+             then we must unrelax *all* the entries in the dispach
+             table and also unrelax the dispatch table prologue.  */
+
+	  /* Note the 1st PAGE/JMP instructions are part of the
+	     prologue and can safely be relaxed.  */
+
+          code0 = bfd_get_8 (abfd, misc->contents + first);
+          code1 = bfd_get_8 (abfd, misc->contents + first + 1);
+
+	  if (IS_PAGE_OPCODE (code0, code1))
+	    {
+	      first += 2;
+              code0 = bfd_get_8 (abfd, misc->contents + first);
+              code1 = bfd_get_8 (abfd, misc->contents + first + 1);
+	    }
+
+          if (! IS_JMP_OPCODE (code0, code1))
+	    /* Something has gone wrong.  */
+	    return FALSE;
+
+          first += 2;
+	  last = first;
+
+          /* Find the last entry in the dispach table.  */
+          while (last < sec->_cooked_size)
+             {
+                code0 = bfd_get_8 (abfd, misc->contents + last);
+                code1 = bfd_get_8 (abfd, misc->contents + last + 1);
+
+                if (IS_PAGE_OPCODE (code0, code1))
+                  relaxed = FALSE;
+                else if (! IS_JMP_OPCODE (code0, code1))
+                    break;
+
+                last += 2;
+             }
+
+          /* We should have found the end of the dispatch table
+             before reaching the end of the section. If we have
+             reached the end of the section then fail the
+	     relaxation.  */
+          if (last >= sec->_cooked_size)
+            return FALSE;
+
+          /* If we found an unrelaxed entry then
+              unrelax all the switch table entries.  */
+          if (! relaxed)
+	    {
+	      if (! unrelax_dispatch_table_entries (abfd, sec, first,
+						    last, changed, misc))
+		return FALSE;
+
+              if (! is_switch_256_dispatch_table_p (abfd, addr, TRUE, misc))
+		return FALSE;
+
+              /* Unrelax the prologue.  */
+
+              /* Insert an INC 1(SP) insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+                                              addr - 6,
+                                              inc_1_sp_opcode,
+                                              sizeof (inc_1_sp_opcode),
+					      0))
+		return FALSE;
+
+              /* Insert an SNC insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+					      addr - 6,
+					      snc_opcode,
+					      sizeof (snc_opcode),
+					      0))
+		return FALSE;
+
+	      /* Insert an ADD W,WREG insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+					     addr - 6,
+				 	     add_w_wreg_opcode,
+					     sizeof (add_w_wreg_opcode),
+					     0))
+		return FALSE;
+	    }
+
+          return TRUE;
+        }
+    }
+
+  return TRUE;
+}
+
+/* This function handles relaxing for the ip2k.  */
 
 static bfd_boolean
 ip2k_elf_relax_section (abfd, sec, link_info, again)
@@ -807,12 +791,10 @@
   bfd_byte *contents = NULL;
   Elf_Internal_Sym *isymbuf = NULL;
   static asection * first_section = NULL;
-  static unsigned long search_addr;
-  static unsigned long page_start = 0;
-  static unsigned long page_end = 0;
-  static unsigned int pass = 0;
-  static bfd_boolean new_pass = FALSE;
+  static asection * last_section = NULL;
   static bfd_boolean changed = FALSE;
+  static bfd_boolean final_pass = FALSE;
+  static unsigned int pass = 0;
   struct misc misc;
   asection *stab;
 
@@ -820,17 +802,21 @@
   *again = FALSE;
 
   if (first_section == NULL)
-    {
-      ip2k_relaxed = TRUE;
-      first_section = sec;
-    }
+    first_section = sec;
 
   if (first_section == sec)
     {
+      changed = FALSE;
       pass++;
-      new_pass = TRUE;
     }
 
+  /* If we make too many passes then it's a sign that
+     something is wrong and we fail the relaxation.
+     Note if everything is working correctly then the
+     relaxation should converge reasonably quickly.  */
+  if (pass == 4096)
+    return FALSE;
+
   /* We don't have to do anything for a relocatable link,
      if this section does not have relocs, or if this is
      not a code section.  */
@@ -840,6 +826,9 @@
       || (sec->flags & SEC_CODE) == 0)
     return TRUE;
 
+  if (pass == 1)
+    last_section = sec;
+
   /* If this is the first time we have been called
       for this section, initialise the cooked size.  */
   if (sec->_cooked_size == 0)
@@ -903,50 +892,58 @@
   misc.contents = contents;
 
   /* This is where all the relaxation actually get done.  */
-  if ((pass == 1) || (new_pass && !changed))
+
+  if (pass == 1)
     {
-      /* On the first pass we simply search for the lowest page that
-         we havn't relaxed yet. Note that the pass count is reset
-         each time a page is complete in order to move on to the next page.
-         If we can't find any more pages then we are finished.  */
-      if (new_pass)
-	{
-	  pass = 1;
-	  new_pass = FALSE;
-	  changed = TRUE; /* Pre-initialize to break out of pass 1.  */
-	  search_addr = 0xFFFFFFFF;
-	}
+      /* On the first pass we remove *all* page instructions and
+         relax the prolog for switch dispatch tables. This gets
+	 us to the starting point for subsequent passes where
+	 we add page instructions back in as needed.  */
 
-      if ((BASEADDR (sec) + sec->_cooked_size < search_addr)
-	  && (BASEADDR (sec) + sec->_cooked_size > page_end))
-	{
-	  if (BASEADDR (sec) <= page_end)
-	    search_addr = page_end + 1;
-	  else
-	    search_addr = BASEADDR (sec);
+      if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, &misc))
+	goto error_return;
 
-	  /* Found a page => more work to do.  */
-	  *again = TRUE;
-	}
+      changed |= *again;
     }
   else
     {
-      if (new_pass)
-	{
-	  new_pass = FALSE;
-	  changed = FALSE;
-	  page_start = PAGENO (search_addr);
-	  page_end = page_start | 0x00003FFF;
-	}
+      /* Add page instructions back in as needed but we ignore
+	 the issue with sections (functions) crossing a page
+	 boundary until we have converged to an approximate
+	 solution (i.e. nothing has changed on this relaxation
+	 pass) and we then know roughly where the page boundaries
+	 will end up.
 
-      /* Only process sections in range.  */
-      if ((BASEADDR (sec) + sec->_cooked_size >= page_start)
-	  && (BASEADDR (sec) <= page_end))
+	 After we have have converged to an approximate solution
+	 we set the final pass flag and continue relaxing. On these
+	 final passes if a section (function) cross page boundary
+	 we will add *all* the page instructions back into such
+	 sections.
+
+	 After adding *all* page instructions back into a section
+	 which crosses a page bounbdary we reset the final pass flag
+	 so the we will again interate until we find a new approximate
+	 solution which is closer to the final solution.  */
+
+      if (! ip2k_elf_relax_section_passN (abfd, sec, again, &final_pass,
+					  &misc))
+	goto error_return;
+
+      changed |= *again;
+
+      /* If nothing has changed on this relaxation
+	  pass restart the final relaxaton pass.  */
+      if (! changed && last_section == sec)
 	{
-          if (!ip2k_elf_relax_section_page (abfd, sec, &changed, &misc, page_start, page_end))
-	    return FALSE;
+	  /* If this was the final pass and we didn't reset
+	     the final pass flag then we are done, otherwise
+	     do another final pass.  */
+	  if (! final_pass)
+	    {
+	      final_pass = TRUE;
+	      *again = TRUE;
+	    }
 	}
-      *again = TRUE;
     }
 
   /* Perform some house keeping after relaxing the section.  */
@@ -991,72 +988,172 @@
   return FALSE;
 }
 
-/* This function handles relaxation of a section in a specific page.  */
+/* This function handles relaxation during the first pass.  */
 
 static bfd_boolean
-ip2k_elf_relax_section_page (abfd, sec, again, misc, page_start, page_end)
+ip2k_elf_relax_section_pass1 (abfd, sec, again, misc)
      bfd *abfd;
      asection *sec;
      bfd_boolean *again;
-     struct misc *misc;
-     unsigned long page_start;
-     unsigned long page_end;
+     struct misc * misc;
 {
   Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
   Elf_Internal_Rela *irel;
-  int switch_table_128;
-  int switch_table_256;
-  
+
   /* Walk thru the section looking for relaxation opertunities.  */
   for (irel = misc->irelbase; irel < irelend; irel++)
     {
-      if (ELF32_R_TYPE (irel->r_info) != (int) R_IP2K_PAGE3)
-	/* Ignore non page instructions.  */
-	continue;
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_PAGE3)
+      {
+	bfd_byte code0 = bfd_get_8 (abfd,
+				    misc->contents + irel->r_offset);
+	bfd_byte code1 = bfd_get_8 (abfd,
+				    misc->contents + irel->r_offset + 1);
 
-      if (BASEADDR (sec) + irel->r_offset < page_start)
-	/* Ignore page instructions on earlier page - they have
-	   already been processed. Remember that there is code flow
-	   that crosses a page boundary.  */
-	continue;
+        /* Verify that this is the PAGE opcode.  */
+        if (IS_PAGE_OPCODE (code0, code1))
+	  {
+	    /* Note that we've changed the relocs, section contents, etc.  */
+	    elf_section_data (sec)->relocs = misc->irelbase;
+	    elf_section_data (sec)->this_hdr.contents = misc->contents;
+	    misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
 
-      if (BASEADDR (sec) + irel->r_offset > page_end)
-	/* Flow beyond end of page => nothing more to do for this page.  */
-	return TRUE;
+	    /* Handle switch dispatch tables/prologues.  */
+	    if (!  relax_switch_dispatch_tables_pass1 (abfd, sec,
+						       irel->r_offset, misc))
+	      return FALSE;
 
-      /* Detect switch tables.  */
-      switch_table_128 = ip2k_is_switch_table_128 (abfd, sec, irel->r_offset, misc->contents);
-      switch_table_256 = ip2k_is_switch_table_256 (abfd, sec, irel->r_offset, misc->contents);
+	    /* Fix the relocation's type.  */
+	    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+				         R_IP2K_NONE);
 
-      if ((switch_table_128 > 0) || (switch_table_256 > 0))
-	/* If the index is greater than 0 then it has already been processed.  */
-	continue;
+	    /* Delete the PAGE insn.  */
+	    if (! ip2k_elf_relax_delete_bytes (abfd, sec,
+					       irel->r_offset,
+					       sizeof (page_opcode)))
+	      return FALSE;
 
-      if (switch_table_128 == 0)
+	    /* That will change things, so, we should relax again.
+	       Note that this is not required, and it may be slow.  */
+	    *again = TRUE;
+	  }
+      }
+    }
+
+  return TRUE;
+}
+
+/* This function handles relaxation for 2nd and subsequent passes.  */
+
+static bfd_boolean
+ip2k_elf_relax_section_passN (abfd, sec, again, final_pass, misc)
+     bfd *abfd;
+     asection *sec;
+     bfd_boolean *again;
+     bfd_boolean *final_pass;
+     struct misc * misc;
+{
+  Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
+  Elf_Internal_Rela *irel;
+  bfd_boolean add_all;
+
+  /* If we are on the final relaxation pass and the section crosses
+     then set a flag to indicate that *all* page instructions need
+     to be added back into this section.  */
+  if (*final_pass)
+    {
+      add_all = (PAGENO (BASEADDR (sec))
+	         != PAGENO (BASEADDR (sec) + sec->_cooked_size));
+
+      /* If this section crosses a page boundary set the crossed
+	 page boundary flag.  */
+      if (add_all)
+	sec->userdata = sec;
+      else
 	{
-	  if (!ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc))
-	    return FALSE;
-
-	  continue;
-	}
-
-      if (switch_table_256 == 0)
-	{
-	  if (!ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc))
-	    return FALSE;
-
-	  continue;
-	}
-
-      /* Simple relax.  */
-      if (ip2k_test_page_insn (abfd, sec, irel, misc))
-	{
-	  if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc))
-	    return FALSE;
-
-	  continue;
+	  /* If the section had previously crossed a page boundary
+	     but on this pass does not then reset crossed page
+	     boundary flag and rerun the 1st relaxation pass on
+	     this section.  */
+	  if (sec->userdata)
+	    {
+	      sec->userdata = NULL;
+	      if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, misc))
+		return FALSE;
+	    }
 	}
     }
+  else
+    add_all = FALSE;
+
+  /* Walk thru the section looking for call/jmp
+      instructions which need a page instruction.  */
+  for (irel = misc->irelbase; irel < irelend; irel++)
+    {
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_ADDR16CJP)
+      {
+        /* Get the value of the symbol referred to by the reloc.  */
+        bfd_vma symval = symbol_value (abfd, misc->symtab_hdr, misc->isymbuf,
+				       irel);
+	bfd_byte code0, code1;
+
+        if (symval == UNDEFINED_SYMBOL)
+	  {
+	    /* This appears to be a reference to an undefined
+	       symbol.  Just ignore it--it will be caught by the
+	       regular reloc processing.  */
+	    continue;
+	  }
+
+        /* For simplicity of coding, we are going to modify the section
+	   contents, the section relocs, and the BFD symbol table.  We
+	   must tell the rest of the code not to free up this
+	   information.  It would be possible to instead create a table
+	   of changes which have to be made, as is done in coff-mips.c;
+	   that would be more work, but would require less memory when
+	   the linker is run.  */
+
+	/* Get the opcode.  */
+	code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset);
+	code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset + 1);
+
+	if (IS_JMP_OPCODE (code0, code1) || IS_CALL_OPCODE (code0, code1))
+	  {
+	    if (*final_pass)
+	      {
+		if (! unrelax_switch_dispatch_tables_passN (abfd, sec,
+						            irel->r_offset,
+                                                            again, misc))
+		  return FALSE;
+
+                if (*again)
+		  add_all = FALSE;
+	      }
+
+	    code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset - 2);
+	    code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset - 1);
+
+	    if (! IS_PAGE_OPCODE (code0, code1))
+	      {
+		bfd_vma value = symval + irel->r_addend;
+		bfd_vma addr  = BASEADDR (sec) + irel->r_offset;
+
+		if (add_all || PAGENO (addr) != PAGENO (value))
+		  {
+		    if (! add_page_insn (abfd, sec, irel, misc))
+		      return FALSE;
+
+		    /* That will have changed things, so,  we must relax again.  */
+		    *again = TRUE;
+		  }
+	       }
+	   }
+        }
+    }
+
+  /* If anything changed reset the final pass flag.  */
+  if (*again)
+    *final_pass = FALSE;
 
   return TRUE;
 }
@@ -1089,7 +1186,6 @@
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
-  asection *stab;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
@@ -1132,132 +1228,6 @@
         irel->r_offset += count;
     }
 
-  /* Now fix the stab relocations.  */
-  stab = bfd_get_section_by_name (abfd, ".stab");
-  if (stab)
-    {
-      bfd_byte *stabcontents, *stabend, *stabp;
-
-      irelbase = elf_section_data (stab)->relocs;
-      irelend = irelbase + stab->reloc_count;
-
-      /* Pull out the contents of the stab section.  */
-      if (elf_section_data (stab)->this_hdr.contents != NULL)
-	stabcontents = elf_section_data (stab)->this_hdr.contents;
-      else
-	{
-	  stabcontents = (bfd_byte *) bfd_alloc (abfd, stab->_raw_size);
-	  if (stabcontents == NULL)
-	    return;
-
-	  if (! bfd_get_section_contents (abfd, stab, stabcontents,
-					  (file_ptr) 0, stab->_raw_size))
-	    return;
-
-	  /* We need to remember this.  */
-	  elf_section_data (stab)->this_hdr.contents = stabcontents;
-	}
-
-      stabend = stabcontents + stab->_raw_size;
-
-      for (irel = irelbase; irel < irelend; irel++)
-	{
-	  if (ELF32_R_TYPE (irel->r_info) != R_IP2K_NONE)
-	    {
-	      /* Get the value of the symbol referred to by the reloc.  */
-	      if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
-		{
-		  asection *sym_sec;
-		  
-		  /* A local symbol.  */
-		  isym = isymbuf + ELF32_R_SYM (irel->r_info);
-		  sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
-		  
-		  if (sym_sec == sec)
-		    {
-		      const char *name;
-		      unsigned long strx;
-		      unsigned char type, other;
-		      unsigned short desc;
-		      bfd_vma value;
-		      bfd_vma baseaddr = BASEADDR (sec);
-		      bfd_vma symval = BASEADDR (sym_sec) + isym->st_value
-			+ irel->r_addend;
-		      
-		      if ((baseaddr + addr) <= symval
-			  && symval <= (baseaddr + endaddr))
-			irel->r_addend += count;
-
-		      /* Go hunt up a function and fix its line info if needed.  */
-		      stabp = stabcontents + irel->r_offset - 8; 
-
-		      /* Go pullout the stab entry.  */
-		      strx  = bfd_h_get_32 (abfd, stabp + STRDXOFF);
-		      type  = bfd_h_get_8 (abfd, stabp + TYPEOFF);
-		      other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
-		      desc  = bfd_h_get_16 (abfd, stabp + DESCOFF);
-		      value = bfd_h_get_32 (abfd, stabp + VALOFF);
-		      
-		      name = bfd_get_stab_name (type);
-		      
-		      if (strcmp (name, "FUN") == 0)
-			{
-			  int function_adjusted = 0;
-
-			  if (symval > (baseaddr + addr))
-			    /* Not in this function.  */
-			    continue;
-
-			  /* Hey we got a function hit.  */
-			  stabp += STABSIZE;
-			  for (;stabp < stabend; stabp += STABSIZE)
-			    {
-			      /* Go pullout the stab entry.  */
-			      strx  = bfd_h_get_32 (abfd, stabp + STRDXOFF);
-			      type  = bfd_h_get_8 (abfd, stabp + TYPEOFF);
-			      other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
-			      desc  = bfd_h_get_16 (abfd, stabp + DESCOFF);
-			      value = bfd_h_get_32 (abfd, stabp + VALOFF);
-
-			      name = bfd_get_stab_name (type);
-
-			      if (strcmp (name, "FUN") == 0)
-				{
-				  /* Hit another function entry.  */
-				  if (function_adjusted)
-				    {
-				      /* Adjust the value.  */
-				      value += count;
-				  
-				      /* We need to put it back.  */
-				      bfd_h_put_32 (abfd, value,stabp + VALOFF);
-				    }
-
-				  /* And then bale out.  */
-				  break;
-				}
-
-			      if (strcmp (name, "SLINE") == 0)
-				{
-				  /* Got a line entry.  */
-				  if ((baseaddr + addr) <= (symval + value))
-				    {
-				      /* Adjust the line entry.  */
-				      value += count;
-
-				      /* We need to put it back.  */
-				      bfd_h_put_32 (abfd, value,stabp + VALOFF);
-				      function_adjusted = 1;
-				    }
-				}
-			    }
-			}
-		    }
-		}
-	    }
-	}
-    }
-
   /* When adding an instruction back it is sometimes necessary to move any
      global or local symbol that was referencing the first instruction of
      the moved block to refer to the first instruction of the inserted block.
@@ -1284,20 +1254,103 @@
   for (; sym_hashes < end_hashes; sym_hashes++)
     {
       struct elf_link_hash_entry *sym_hash = *sym_hashes;
-
       if ((sym_hash->root.type == bfd_link_hash_defined
 	   || sym_hash->root.type == bfd_link_hash_defweak)
 	  && sym_hash->root.u.def.section == sec)
 	{
           if (addr <= sym_hash->root.u.def.value
               && sym_hash->root.u.def.value < endaddr)
-	    sym_hash->root.u.def.value += count;
+            {
+	      sym_hash->root.u.def.value += count;
+            }
 	}
     }
 
   return;
 }
 
+static bfd_boolean
+add_page_insn (abfd, sec, irel, misc)
+      bfd *abfd;
+      asection *sec;
+      Elf_Internal_Rela *irel;
+      struct misc *misc;
+{
+  /* Note that we've changed the relocs, section contents, etc.  */
+  elf_section_data (sec)->relocs = misc->irelbase;
+  elf_section_data (sec)->this_hdr.contents = misc->contents;
+  misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
+
+  /* Add the PAGE insn.  */
+  if (! ip2k_elf_relax_add_bytes (abfd, sec, irel->r_offset,
+                                  page_opcode,
+                                  sizeof (page_opcode),
+				  sizeof (page_opcode)))
+    return FALSE;
+  else
+    {
+       Elf_Internal_Rela * jrel = irel - 1;
+
+       /* Add relocation for PAGE insn added.  */
+       if (ELF32_R_TYPE (jrel->r_info) != R_IP2K_NONE)
+	 {
+	   bfd_byte code0, code1;
+	   char *msg = NULL;
+
+	   /* Get the opcode.  */
+	   code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset);
+	   code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset + 1);
+
+	   if (IS_JMP_OPCODE (code0, code1))
+	     msg = "\tJMP instruction missing a preceeding PAGE instruction in %s\n\n";
+
+	   else if (IS_CALL_OPCODE (code0, code1))
+	     msg = "\tCALL instruction missing a preceeding PAGE instruction in %s\n\n";
+
+	   if (msg)
+	     {
+	       fprintf (stderr, "\n\t *** LINKER RELAXATION failure ***\n");
+	       fprintf (stderr, msg, sec->owner->filename);
+	     }
+
+	   return FALSE;
+	 }
+
+       jrel->r_addend = irel->r_addend;
+       jrel->r_offset = irel->r_offset - sizeof (page_opcode);
+       jrel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                    R_IP2K_PAGE3);
+     }
+
+   return TRUE;
+}
+
+/* Insert bytes into a section while relaxing.  */
+
+static bfd_boolean
+ip2k_elf_relax_add_bytes (abfd, sec, addr, bytes, count, noadj)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     const bfd_byte *bytes;
+     int count;
+     int noadj;
+{
+  bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
+  bfd_vma endaddr = sec->_cooked_size;
+
+  /* Make room to insert the bytes.  */
+  memmove (contents + addr + count, contents + addr, endaddr - addr);
+
+  /* Insert the bytes into the section.  */
+  memcpy  (contents + addr, bytes, count);
+
+  sec->_cooked_size += count;
+
+  adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj);
+  return TRUE;
+}
+
 /* Delete some bytes from a section while relaxing.  */
 
 static bfd_boolean
@@ -1357,9 +1410,8 @@
      Elf_Internal_Rela * rel;
      bfd_vma             relocation;
 {
-  static bfd_vma page_addr = 0;
-
   bfd_reloc_status_type r = bfd_reloc_ok;
+
   switch (howto->type)
     {
       /* Handle data space relocations.  */
@@ -1377,45 +1429,8 @@
       break;
 
       /* Handle insn space relocations.  */
-    case R_IP2K_PAGE3:
-      page_addr = BASEADDR (input_section) + rel->r_offset;
-      if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
-	relocation &= ~IP2K_INSN_MASK;
-      else
-	r = bfd_reloc_notsupported;
-      break;
-
     case R_IP2K_ADDR16CJP:
-      if (BASEADDR (input_section) + rel->r_offset != page_addr + 2)
-	{
-	  /* No preceeding page instruction, verify that it isn't needed.  */
-	  if (PAGENO (relocation + rel->r_addend) !=
-	      ip2k_nominal_page_bits (input_bfd, input_section,
-	      			      rel->r_offset, contents))
-	    _bfd_error_handler (_("ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."),
-				BASEADDR (input_section) + rel->r_offset,
-				relocation + rel->r_addend);
-        }
-      else if (ip2k_relaxed)
-        {
-          /* Preceeding page instruction. Verify that the page instruction is
-             really needed. One reason for the relaxation to miss a page is if
-             the section is not marked as executable.  */
-	  if (!ip2k_is_switch_table_128 (input_bfd, input_section, rel->r_offset - 2, contents) &&
-	      !ip2k_is_switch_table_256 (input_bfd, input_section, rel->r_offset - 2, contents) &&
-	      (PAGENO (relocation + rel->r_addend) ==
-	       ip2k_nominal_page_bits (input_bfd, input_section,
-	      			      rel->r_offset - 2, contents)))
-	    _bfd_error_handler (_("ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."),
-				page_addr,
-				relocation + rel->r_addend);
-        }
-      if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
-	relocation &= ~IP2K_INSN_MASK;
-      else
-	r = bfd_reloc_notsupported;
-      break;
-
+    case R_IP2K_PAGE3:
     case R_IP2K_LO8INSN:
     case R_IP2K_HI8INSN:
     case R_IP2K_PC_SKIP:
@@ -1546,10 +1561,10 @@
 	      sec = h->root.u.def.section;
 	      relocation = h->root.u.def.value + BASEADDR (sec);
 	    }
-
 	  else if (h->root.type == bfd_link_hash_undefweak)
-	    relocation = 0;
-
+	    {
+	      relocation = 0;
+	    }
 	  else
 	    {
 	      if (! ((*info->callbacks->undefined_symbol)
@@ -1653,7 +1668,9 @@
 	     && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
 	   && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
 		 && sym->st_shndx != SHN_COMMON))
-	 return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+          {
+            return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+          }
       }
   return NULL;
 }
@@ -1665,17 +1682,21 @@
      asection *sec ATTRIBUTE_UNUSED;
      const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
 {
-  /* We don't use got and plt entries for ip2k.  */
+  /* we don't use got and plt entries for ip2k */
   return TRUE;
 }
 
+
+/* -------------------------------------------------------------------- */
+
+
 #define TARGET_BIG_SYM	 bfd_elf32_ip2k_vec
 #define TARGET_BIG_NAME  "elf32-ip2k"
 
 #define ELF_ARCH	 bfd_arch_ip2k
 #define ELF_MACHINE_CODE EM_IP2K
 #define ELF_MACHINE_ALT1 EM_IP2K_OLD
-#define ELF_MAXPAGESIZE  1 /* No pages on the IP2K.  */
+#define ELF_MAXPAGESIZE  1 /* No pages on the IP2K */
 
 #define elf_info_to_howto_rel			NULL
 #define elf_info_to_howto			ip2k_info_to_howto_rela
@@ -1684,10 +1705,12 @@
 #define elf_backend_rela_normal			1
 #define elf_backend_gc_mark_hook                ip2k_elf_gc_mark_hook
 #define elf_backend_gc_sweep_hook               ip2k_elf_gc_sweep_hook
+
 #define elf_backend_relocate_section		ip2k_elf_relocate_section
 
 #define elf_symbol_leading_char			'_'
 #define bfd_elf32_bfd_reloc_type_lookup		ip2k_reloc_type_lookup
 #define bfd_elf32_bfd_relax_section		ip2k_elf_relax_section
 
+
 #include "elf32-target.h"
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
deleted file mode 100644
index c4261bf..0000000
--- a/bfd/elf32-iq2000.c
+++ /dev/null
@@ -1,974 +0,0 @@
-/* IQ2000-specific support for 32-bit ELF.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-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.  */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-#include "elf/iq2000.h"
-
-/* Forward declarations.  */
-
-/* Private relocation functions.  */
-static bfd_reloc_status_type iq2000_elf_relocate_hi16	       PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-static reloc_howto_type *    iq2000_reloc_type_lookup	       PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void		     iq2000_info_to_howto_rela	       PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean	     iq2000_elf_relocate_section       PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_reloc_status_type iq2000_final_link_relocate	       PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma));
-static bfd_boolean	     iq2000_elf_gc_sweep_hook	       PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
-static asection *	     iq2000_elf_gc_mark_hook	       PARAMS ((asection *sec, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static reloc_howto_type *    iq2000_reloc_type_lookup	       PARAMS ((bfd *, bfd_reloc_code_real_type));
-static int		     elf32_iq2000_machine	       PARAMS ((bfd *));
-static bfd_boolean	     iq2000_elf_object_p	       PARAMS ((bfd *));
-static bfd_boolean	     iq2000_elf_set_private_flags      PARAMS ((bfd *, flagword));
-static bfd_boolean	     iq2000_elf_copy_private_bfd_data  PARAMS ((bfd *, bfd *));
-static bfd_boolean	     iq2000_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
-static bfd_boolean	     iq2000_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
-static bfd_boolean	     iq2000_elf_check_relocs	       PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
-static bfd_reloc_status_type iq2000_elf_howto_hi16_reloc       PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-
-
-static reloc_howto_type iq2000_elf_howto_table [] =
-{
-  /* This reloc does nothing.  */
-
-  HOWTO (R_IQ2000_NONE,		     /* type */
-	 0,			     /* rightshift */
-	 2,			     /* size (0 = byte, 1 = short, 2 = long) */
-	 32,			     /* bitsize */
-	 FALSE,			     /* pc_relative */
-	 0,			     /* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	     /* special_function */
-	 "R_IQ2000_NONE",	     /* name */
-	 FALSE,			     /* partial_inplace */
-	 0,			     /* src_mask */
-	 0,			     /* dst_mask */
-	 FALSE),		     /* pcrel_offset */
-
-  /* A 16 bit absolute relocation.  */
-  HOWTO (R_IQ2000_16,		     /* type */
-	 0,			     /* rightshift */
-	 1,			     /* size (0 = byte, 1 = short, 2 = long) */
-	 16,			     /* bitsize */
-	 FALSE,			     /* pc_relative */
-	 0,			     /* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	     /* special_function */
-	 "R_IQ2000_16",		     /* name */
-	 FALSE,			     /* partial_inplace */
-	 0x0000,		     /* src_mask */
-	 0xffff,		     /* dst_mask */
-	 FALSE),		     /* pcrel_offset */
-
-  /* A 32 bit absolute relocation.  */
-  HOWTO (R_IQ2000_32,		     /* type */
-	 0,			     /* rightshift */
-	 2,			     /* size (0 = byte, 1 = short, 2 = long) */
-	 31,			     /* bitsize */
-	 FALSE,			     /* pc_relative */
-	 0,			     /* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	     /* special_function */
-	 "R_IQ2000_32",		     /* name */
-	 FALSE,			     /* partial_inplace */
-	 0x00000000,		     /* src_mask */
-	 0x7fffffff,		     /* dst_mask */
-	 FALSE),		     /* pcrel_offset */
-
-  /* 26 bit branch address.  */
-  HOWTO (R_IQ2000_26,		/* type */
-	 2,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 26,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-				/* This needs complex overflow
-				   detection, because the upper four
-				   bits must match the PC.  */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_IQ2000_26",		/* name */
-	 FALSE,			/* partial_inplace */
-	 0x00000000,		/* src_mask */
-	 0x03ffffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* 16 bit PC relative reference.  */
-  HOWTO (R_IQ2000_PC16,		/* type */
-	 2,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 TRUE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_IQ2000_PC16",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0x0000,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 TRUE),			/* pcrel_offset */
-
-  /* high 16 bits of symbol value.  */
-  HOWTO (R_IQ2000_HI16,		/* type */
-	 16,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 15,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 iq2000_elf_howto_hi16_reloc,	/* special_function */
-	 "R_IQ2000_HI16",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0x0000,		/* src_mask */
-	 0x7fff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* Low 16 bits of symbol value.  */
-  HOWTO (R_IQ2000_LO16,		/* type */
-	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_IQ2000_LO16",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0x0000,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* 16-bit jump offset.  */
-  HOWTO (R_IQ2000_OFFSET_16,	/* type */
-	 2,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_IQ2000_OFFSET_16",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0x0000,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* 21-bit jump offset.  */
-  HOWTO (R_IQ2000_OFFSET_21,	/* type */
-	 2,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 21,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_IQ2000_OFFSET_21",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0x000000,		/* src_mask */
-	 0x1fffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* unsigned high 16 bits of value.  */
-  HOWTO (R_IQ2000_OFFSET_21,	/* type */
-	 16,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_IQ2000_UHI16",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0x0000,		/* src_mask */
-	 0x7fff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* A 32 bit absolute debug relocation.  */
-  HOWTO (R_IQ2000_32_DEBUG,	     /* type */
-	 0,			     /* rightshift */
-	 2,			     /* size (0 = byte, 1 = short, 2 = long) */
-	 32,			     /* bitsize */
-	 FALSE,			     /* pc_relative */
-	 0,			     /* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	     /* special_function */
-	 "R_IQ2000_32",		     /* name */
-	 FALSE,			     /* partial_inplace */
-	 0x00000000,		     /* src_mask */
-	 0xffffffff,		     /* dst_mask */
-	 FALSE),		     /* pcrel_offset */
-
-};
-
-/* GNU extension to record C++ vtable hierarchy.  */
-static reloc_howto_type iq2000_elf_vtinherit_howto =
-  HOWTO (R_IQ2000_GNU_VTINHERIT,    /* type */
-	 0,			   /* rightshift */
-	 2,			   /* size (0 = byte, 1 = short, 2 = long) */
-	 0,			   /* bitsize */
-	 FALSE,			   /* pc_relative */
-	 0,			   /* bitpos */
-	 complain_overflow_dont,   /* complain_on_overflow */
-	 NULL,			   /* special_function */
-	 "R_IQ2000_GNU_VTINHERIT",  /* name */
-	 FALSE,			   /* partial_inplace */
-	 0,			   /* src_mask */
-	 0,			   /* dst_mask */
-	 FALSE);		   /* pcrel_offset */
-
-/* GNU extension to record C++ vtable member usage.  */
-static reloc_howto_type iq2000_elf_vtentry_howto =
-  HOWTO (R_IQ2000_GNU_VTENTRY,	   /* type */
-	 0,			   /* rightshift */
-	 2,			   /* size (0 = byte, 1 = short, 2 = long) */
-	 0,			   /* bitsize */
-	 FALSE,			   /* pc_relative */
-	 0,			   /* bitpos */
-	 complain_overflow_dont,   /* complain_on_overflow */
-	 NULL,			   /* special_function */
-	 "R_IQ2000_GNU_VTENTRY",    /* name */
-	 FALSE,			   /* partial_inplace */
-	 0,			   /* src_mask */
-	 0,			   /* dst_mask */
-	 FALSE);		   /* pcrel_offset */
-
-
-/* Map BFD reloc types to IQ2000 ELF reloc types.  */
-
-struct iq2000_reloc_map
-{
-  bfd_reloc_code_real_type bfd_reloc_val;
-  unsigned int iq2000_reloc_val;
-};
-
-static const struct iq2000_reloc_map iq2000_reloc_map [] =
-{
-  { BFD_RELOC_NONE,	       R_IQ2000_NONE },
-  { BFD_RELOC_16,	       R_IQ2000_16 },
-  { BFD_RELOC_32,	       R_IQ2000_32 },
-  { BFD_RELOC_MIPS_JMP,	       R_IQ2000_26 },
-  { BFD_RELOC_16_PCREL_S2,     R_IQ2000_PC16 },
-  { BFD_RELOC_HI16,	       R_IQ2000_HI16 },
-  { BFD_RELOC_LO16,	       R_IQ2000_LO16 },
-  { BFD_RELOC_IQ2000_OFFSET_16,R_IQ2000_OFFSET_16 },
-  { BFD_RELOC_IQ2000_OFFSET_21,R_IQ2000_OFFSET_21 },
-  { BFD_RELOC_IQ2000_UHI16,    R_IQ2000_UHI16 },
-  { BFD_RELOC_VTABLE_INHERIT,  R_IQ2000_GNU_VTINHERIT },
-  { BFD_RELOC_VTABLE_ENTRY,    R_IQ2000_GNU_VTENTRY },
-};
-
-static bfd_reloc_status_type
-iq2000_elf_howto_hi16_reloc (abfd,
-		     reloc_entry,
-		     symbol,
-		     data,
-		     input_section,
-		     output_bfd,
-		     error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
-{
-  bfd_reloc_status_type ret;
-  bfd_vma relocation;
-
-  /* If we're relocating, and this an external symbol, we don't want
-     to change anything.  */
-  if (output_bfd != (bfd *) NULL
-      && (symbol->flags & BSF_SECTION_SYM) == 0
-      && reloc_entry->addend == 0)
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
-
-  if (bfd_is_com_section (symbol->section))
-    relocation = 0;
-  else
-    relocation = symbol->value;
-
-  relocation += symbol->section->output_section->vma;
-  relocation += symbol->section->output_offset;
-  relocation += reloc_entry->addend;
-
-  /* if %lo will have sign-extension, compensate by add 0x10000 to hi portion */
-  if (relocation & 0x8000)
-    reloc_entry->addend += 0x10000;
-
-  /* Now do the reloc in the usual way.	 */
-  ret = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
-				input_section, output_bfd, error_message);
-
-  /* put it back the way it was */
-  if (relocation & 0x8000)
-    reloc_entry->addend -= 0x10000;
-
-  return ret;
-}
-
-static bfd_reloc_status_type
-iq2000_elf_relocate_hi16 (input_bfd, relhi, contents, value)
-     bfd *input_bfd;
-     Elf_Internal_Rela *relhi;
-     bfd_byte *contents;
-     bfd_vma value;
-{
-  bfd_vma insn;
-
-  insn = bfd_get_32 (input_bfd, contents + relhi->r_offset);
-  
-  value += relhi->r_addend;
-  value &= 0x7fffffff; /* mask off top-bit which is Harvard mask bit */
-
-  /* if top-bit of %lo value is on, this means that %lo will
-     sign-propagate and so we compensate by adding 1 to %hi value */
-  if (value & 0x8000)
-    value += 0x10000;
-
-  value >>= 16; 
-  insn = ((insn & ~0xFFFF) | value);
-
-  bfd_put_32 (input_bfd, insn, contents + relhi->r_offset);
-  return bfd_reloc_ok;
-}
-
-static reloc_howto_type *
-iq2000_reloc_type_lookup (abfd, code)
-     bfd * abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
-{
-  /* Note that the iq2000_elf_howto_table is indxed by the R_
-     constants.	 Thus, the order that the howto records appear in the
-     table *must* match the order of the relocation types defined in
-     include/elf/iq2000.h.  */
-
-  switch (code)
-    {
-    case BFD_RELOC_NONE:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_NONE];
-    case BFD_RELOC_16:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_16];
-    case BFD_RELOC_32:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_32];
-    case BFD_RELOC_MIPS_JMP:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_26];
-    case BFD_RELOC_IQ2000_OFFSET_16:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_OFFSET_16];
-    case BFD_RELOC_IQ2000_OFFSET_21:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_OFFSET_21];
-    case BFD_RELOC_16_PCREL_S2:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_PC16];
-    case BFD_RELOC_HI16:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_HI16];
-    case BFD_RELOC_IQ2000_UHI16:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_UHI16];
-    case BFD_RELOC_LO16:
-      return &iq2000_elf_howto_table[ (int) R_IQ2000_LO16];
-    case BFD_RELOC_VTABLE_INHERIT:
-      return &iq2000_elf_vtinherit_howto;
-    case BFD_RELOC_VTABLE_ENTRY:
-      return &iq2000_elf_vtentry_howto;
-    default:
-      /* Pacify gcc -Wall.  */
-      return NULL;
-    }
-  return NULL;
-}
-
-
-/* Perform a single relocation.	 By default we use the standard BFD
-   routines.  */
-
-static bfd_reloc_status_type
-iq2000_final_link_relocate (howto, input_bfd, input_section, contents, rel, relocation)
-     reloc_howto_type *	 howto;
-     bfd *		 input_bfd;
-     asection *		 input_section;
-     bfd_byte *		 contents;
-     Elf_Internal_Rela * rel;
-     bfd_vma		 relocation;
-{
-  return _bfd_final_link_relocate (howto, input_bfd, input_section,
-				   contents, rel->r_offset,
-				   relocation, rel->r_addend);
-}
-
-/* Set the howto pointer for a IQ2000 ELF reloc.  */
-
-static void
-iq2000_info_to_howto_rela (abfd, cache_ptr, dst)
-     bfd * abfd ATTRIBUTE_UNUSED;
-     arelent * cache_ptr;
-     Elf_Internal_Rela * dst;
-{
-  unsigned int r_type;
-
-  r_type = ELF32_R_TYPE (dst->r_info);
-  switch (r_type)
-    {
-    case R_IQ2000_GNU_VTINHERIT:
-      cache_ptr->howto = & iq2000_elf_vtinherit_howto;
-      break;
-
-    case R_IQ2000_GNU_VTENTRY:
-      cache_ptr->howto = & iq2000_elf_vtentry_howto;
-      break;
-
-    default:
-      cache_ptr->howto = & iq2000_elf_howto_table [r_type];
-      break;
-    }
-}
-
-/* Look through the relocs for a section during the first phase.
-   Since we don't do .gots or .plts, we just need to consider the
-   virtual table relocs for gc.	 */
- 
-static bfd_boolean
-iq2000_elf_check_relocs (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
-{
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
-  Elf_Internal_Rela *rel;
-  Elf_Internal_Rela *rel_end;
-  
-  if (info->relocateable)
-    return TRUE;
-  
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
-  
-  rel_end = relocs + sec->reloc_count;
-  for (rel = relocs; rel < rel_end; rel++)
-    {
-      struct elf_link_hash_entry *h;
-      unsigned long r_symndx;
-      
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      if (r_symndx < symtab_hdr->sh_info)
-	h = NULL;
-      else
-	h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-      
-      switch (ELF32_R_TYPE (rel->r_info))
-	{
-	  /* This relocation describes the C++ object vtable hierarchy.
-	     Reconstruct it for later use during GC.  */
-	case R_IQ2000_GNU_VTINHERIT:
-	  if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
-	    return FALSE;
-	  break;
-	  
-	  /* This relocation describes which C++ vtable entries are actually
-	     used.  Record for later use during GC.  */
-	case R_IQ2000_GNU_VTENTRY:
-	  if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
-	    return FALSE;
-	  break;
-
-	case R_IQ2000_32:
-	  /* For debug section, change to special harvard-aware relocations */
-	  if (memcmp (sec->name, ".debug", 6) == 0
-	      || memcmp (sec->name, ".stab", 5) == 0
-	      || memcmp (sec->name, ".eh_frame", 9) == 0)
-	    rel->r_info = ELF32_R_INFO (ELF32_R_SYM (rel->r_info), R_IQ2000_32_DEBUG);
-	  break;
-	}
-    }
-  return TRUE;
-}
-
-
-/* Relocate a IQ2000 ELF section.
-   There is some attempt to make this function usable for many architectures,
-   both USE_REL and USE_RELA ['twould be nice if such a critter existed],
-   if only to serve as a learning tool.
-
-   The RELOCATE_SECTION function is called by the new ELF backend linker
-   to handle the relocations for a section.
-
-   The relocs are always passed as Rela structures; if the section
-   actually uses Rel structures, the r_addend field will always be
-   zero.
-
-   This function is responsible for adjusting the section contents as
-   necessary, and (if using Rela relocs and generating a relocateable
-   output file) adjusting the reloc addend as necessary.
-
-   This function does not have to worry about setting the reloc
-   address or the reloc symbol index.
-
-   LOCAL_SYMS is a pointer to the swapped in local symbols.
-
-   LOCAL_SECTIONS is an array giving the section in the input file
-   corresponding to the st_shndx field of each local symbol.
-
-   The global hash table entry for the global symbols can be found
-   via elf_sym_hashes (input_bfd).
-
-   When generating relocateable output, this function must handle
-   STB_LOCAL/STT_SECTION symbols specially.  The output symbol is
-   going to be the section symbol corresponding to the output
-   section, which means that the addend must be adjusted
-   accordingly.	 */
-
-static bfd_boolean
-iq2000_elf_relocate_section (output_bfd, info, input_bfd, input_section,
-			   contents, relocs, local_syms, local_sections)
-     bfd *		     output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *  info;
-     bfd *		     input_bfd;
-     asection *		     input_section;
-     bfd_byte *		     contents;
-     Elf_Internal_Rela *     relocs;
-     Elf_Internal_Sym *	     local_syms;
-     asection **	     local_sections;
-{
-  Elf_Internal_Shdr *		symtab_hdr;
-  struct elf_link_hash_entry ** sym_hashes;
-  Elf_Internal_Rela *		rel;
-  Elf_Internal_Rela *		relend;
-
-  symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (input_bfd);
-  relend     = relocs + input_section->reloc_count;
-
-  for (rel = relocs; rel < relend; rel ++)
-    {
-      reloc_howto_type *	   howto;
-      unsigned long		   r_symndx;
-      Elf_Internal_Sym *	   sym;
-      asection *		   sec;
-      struct elf_link_hash_entry * h;
-      bfd_vma			   relocation;
-      bfd_reloc_status_type	   r;
-      const char *		   name = NULL;
-      int			   r_type;
-      
-      r_type = ELF32_R_TYPE (rel->r_info);
-      
-      if (   r_type == R_IQ2000_GNU_VTINHERIT
-	  || r_type == R_IQ2000_GNU_VTENTRY)
-	continue;
-      
-      r_symndx = ELF32_R_SYM (rel->r_info);
-
-      /* This is a final link.	*/
-      howto  = iq2000_elf_howto_table + ELF32_R_TYPE (rel->r_info);
-      h	     = NULL;
-      sym    = NULL;
-      sec    = NULL;
-      
-      if (r_symndx < symtab_hdr->sh_info)
-	{
-	  sym = local_syms + r_symndx;
-	  sec = local_sections [r_symndx];
-	  relocation = (sec->output_section->vma
-			+ sec->output_offset
-			+ sym->st_value);
-	  
-	  name = bfd_elf_string_from_elf_section
-	    (input_bfd, symtab_hdr->sh_link, sym->st_name);
-	  name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
-#ifdef DEBUG
-	  fprintf (stderr, "local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n",
-		   sec->name, name, sym->st_name,
-		   sec->output_section->vma, sec->output_offset,
-		   sym->st_value, rel->r_addend);
-#endif
-	}
-      else
-	{
-	  h = sym_hashes [r_symndx];
-	  
-	  while (h->root.type == bfd_link_hash_indirect
-		 || h->root.type == bfd_link_hash_warning)
-	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-	  name = h->root.root.string;
-	  
-	  if (h->root.type == bfd_link_hash_defined
-	      || h->root.type == bfd_link_hash_defweak)
-	    {
-	      sec = h->root.u.def.section;
-	      relocation = (h->root.u.def.value
-			    + sec->output_section->vma
-			    + sec->output_offset);
-#ifdef DEBUG
-	      fprintf (stderr,
-		       "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n",
-		       sec->name, name, h->root.u.def.value,
-		       sec->output_section->vma, sec->output_offset, relocation);
-#endif
-	    }
-	  else if (h->root.type == bfd_link_hash_undefweak)
-	    {
-#ifdef DEBUG
-	      fprintf (stderr, "undefined: sec: %s, name: %s\n",
-		       sec->name, name);
-#endif
-	      relocation = 0;
-	    }
-	  else
-	    {
-	      if (! ((*info->callbacks->undefined_symbol)
-		     (info, h->root.root.string, input_bfd,
-		      input_section, rel->r_offset,
-		     (!info->shared || info->no_undefined))))
-		return FALSE;
-#ifdef DEBUG
-	      fprintf (stderr, "unknown: name: %s\n", name);
-#endif
-	      relocation = 0;
-	    }
-	}
-
-      switch (r_type)
-	{
-	case R_IQ2000_HI16:
-	  r = iq2000_elf_relocate_hi16 (input_bfd, rel, contents, relocation);
-	  break;
-
-	case R_IQ2000_PC16:
-	  rel->r_addend -= 4;
-	  /* Fall through.  */
-
-	default:
-	  r = iq2000_final_link_relocate (howto, input_bfd, input_section,
-					 contents, rel, relocation);
-	  break;
-	}
-
-      if (r != bfd_reloc_ok)
-	{
-	  const char * msg = (const char *) NULL;
-
-	  switch (r)
-	    {
-	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
-		(info, name, howto->name, (bfd_vma) 0,
-		 input_bfd, input_section, rel->r_offset);
-	      break;
-	      
-	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		(info, name, input_bfd, input_section, rel->r_offset, TRUE);
-	      break;
-	      
-	    case bfd_reloc_outofrange:
-	      msg = _("internal error: out of range error");
-	      break;
-
-	    case bfd_reloc_notsupported:
-	      msg = _("internal error: unsupported relocation error");
-	      break;
-
-	    case bfd_reloc_dangerous:
-	      msg = _("internal error: dangerous relocation");
-	      break;
-
-	    default:
-	      msg = _("internal error: unknown error");
-	      break;
-	    }
-
-	  if (msg)
-	    r = info->callbacks->warning
-	      (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (! r)
-	    return FALSE;
-	}
-    }
-
-  return TRUE;
-}
-
-
-/* Update the got entry reference counts for the section being
-   removed.  */
-
-static bfd_boolean
-iq2000_elf_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *		       abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *    info ATTRIBUTE_UNUSED;
-     asection *		       sec ATTRIBUTE_UNUSED;
-     const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED;
-{
-  return TRUE;
-}
-
-/* Return the section that should be marked against GC for a given
-   relocation.	*/
-
-static asection *
-iq2000_elf_gc_mark_hook (sec, info, rel, h, sym)
-     asection *			  sec;
-     struct bfd_link_info *	  info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *	  rel;
-     struct elf_link_hash_entry * h;
-     Elf_Internal_Sym *		  sym;
-{
-  if (h != NULL)
-    {
-      switch (ELF32_R_TYPE (rel->r_info))
-	{
-	case R_IQ2000_GNU_VTINHERIT:
-	case R_IQ2000_GNU_VTENTRY:
-	  break;
-	  
-	default:
-	  switch (h->root.type)
-	    {
-	    case bfd_link_hash_defined:
-	    case bfd_link_hash_defweak:
-	      return h->root.u.def.section;
-	      
-	    case bfd_link_hash_common:
-	      return h->root.u.c.p->section;
-	      
-	    default:
-	      break;
-	    }
-	}
-    }
-  else
-    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
-  return NULL;
-}
-
-
-/* Return the MACH for an e_flags value.  */
-
-static int
-elf32_iq2000_machine (abfd)
-     bfd *abfd;
-{
-  switch (elf_elfheader (abfd)->e_flags & EF_IQ2000_CPU_MASK)
-    {
-    case EF_IQ2000_CPU_IQ2000:	return bfd_mach_iq2000;
-    case EF_IQ2000_CPU_IQ10:  return bfd_mach_iq10;
-    }
-
-  return bfd_mach_iq2000;
-}
-
-
-/* Function to set the ELF flag bits.  */
-
-static bfd_boolean
-iq2000_elf_set_private_flags (abfd, flags)
-     bfd *abfd;
-     flagword flags;
-{
-  elf_elfheader (abfd)->e_flags = flags;
-  elf_flags_init (abfd) = TRUE;
-  return TRUE;
-}
-
-/* Copy backend specific data from one object module to another.  */
-
-static bfd_boolean
-iq2000_elf_copy_private_bfd_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
-{
-  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
-      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
-    return TRUE;
-
-  BFD_ASSERT (!elf_flags_init (obfd)
-	      || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags);
-
-  elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
-  elf_flags_init (obfd) = TRUE;
-  return TRUE;
-}
-
-/* Merge backend specific data from an object file to the output
-   object file when linking.  */
-
-static bfd_boolean
-iq2000_elf_merge_private_bfd_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
-{
-  flagword old_flags, old_partial;
-  flagword new_flags, new_partial;
-  bfd_boolean error = FALSE;
-  char new_opt[80];
-  char old_opt[80];
-
-  new_opt[0] = old_opt[0] = '\0';
-  new_flags = elf_elfheader (ibfd)->e_flags;
-  old_flags = elf_elfheader (obfd)->e_flags;
-
-#ifdef DEBUG
-  (*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
-			 old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
-			 bfd_get_filename (ibfd));
-#endif
-
-  if (!elf_flags_init (obfd))
-    {
-      /* First call, no flags set.  */
-      elf_flags_init (obfd) = TRUE;
-      elf_elfheader (obfd)->e_flags = new_flags;
-    }
-
-  else if (new_flags == old_flags)
-    /* Compatible flags are ok.	 */
-    ;
-
-  else		/* Possibly incompatible flags.	 */
-    {
-      /* Warn if different cpu is used (allow a specific cpu to override
-	 the generic cpu).  */
-      new_partial = (new_flags & EF_IQ2000_CPU_MASK);
-      old_partial = (old_flags & EF_IQ2000_CPU_MASK);
-      if (new_partial == old_partial)
-	;
-
-      else
-	{
-	  switch (new_partial)
-	    {
-	    default:		  strcat (new_opt, " -m2000");	break;
-	    case EF_IQ2000_CPU_IQ2000:	strcat (new_opt, " -m2000");  break;
-	    case EF_IQ2000_CPU_IQ10:  strcat (new_opt, " -m10");  break;
-	    }
-
-	  switch (old_partial)
-	    {
-	    default:		  strcat (old_opt, " -m2000");	break;
-	    case EF_IQ2000_CPU_IQ2000:	strcat (old_opt, " -m2000");  break;
-	    case EF_IQ2000_CPU_IQ10:  strcat (old_opt, " -m10");  break;
-	    }
-	}
-      
-      /* Print out any mismatches from above.  */
-      if (new_opt[0])
-	{
-	  error = TRUE;
-	  (*_bfd_error_handler)
-	    (_("%s: compiled with %s and linked with modules compiled with %s"),
-	     bfd_get_filename (ibfd), new_opt, old_opt);
-	}
-
-      new_flags &= ~ EF_IQ2000_ALL_FLAGS;
-      old_flags &= ~ EF_IQ2000_ALL_FLAGS;
-
-      /* Warn about any other mismatches.  */
-      if (new_flags != old_flags)
-	{
-	  error = TRUE;
-	  (*_bfd_error_handler)
-	    (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-	     bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
-	}
-    }
-
-  if (error)
-    bfd_set_error (bfd_error_bad_value);
-
-  return !error;
-}
-
-
-static bfd_boolean
-iq2000_elf_print_private_bfd_data (abfd, ptr)
-     bfd *abfd;
-     PTR ptr;
-{
-  FILE *file = (FILE *) ptr;
-  flagword flags;
-
-  BFD_ASSERT (abfd != NULL && ptr != NULL);
-
-  /* Print normal ELF private data.  */
-  _bfd_elf_print_private_bfd_data (abfd, ptr);
-
-  flags = elf_elfheader (abfd)->e_flags;
-  fprintf (file, _("private flags = 0x%lx:"), (long)flags);
-
-  switch (flags & EF_IQ2000_CPU_MASK)
-    {
-    default:							break;
-    case EF_IQ2000_CPU_IQ2000:	fprintf (file, " -m2000");	break;
-    case EF_IQ2000_CPU_IQ10:  fprintf (file, " -m10");	break;
-    }
-
-  fputc ('\n', file);
-}
-
-static
-bfd_boolean
-iq2000_elf_object_p (abfd)
-     bfd *abfd;
-{
-  /* Irix 5 and 6 is broken.  Object file symbol tables are not always
-     sorted correctly such that local symbols precede global symbols,
-     and the sh_info field in the symbol table is not always right.  */
-  elf_bad_symtab (abfd) = TRUE;
-
-  bfd_default_set_arch_mach (abfd, bfd_arch_iq2000,
-			     elf32_iq2000_machine (abfd));
-  return TRUE;
-}
-
-
-#define ELF_ARCH		bfd_arch_iq2000
-#define ELF_MACHINE_CODE	EM_IQ2000
-#define ELF_MAXPAGESIZE		0x1000
-
-#define TARGET_BIG_SYM		bfd_elf32_iq2000_vec
-#define TARGET_BIG_NAME		"elf32-iq2000"
-
-#define elf_info_to_howto_rel			NULL
-#define elf_info_to_howto			iq2000_info_to_howto_rela
-#define elf_backend_relocate_section		iq2000_elf_relocate_section
-#define elf_backend_gc_mark_hook		iq2000_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook		iq2000_elf_gc_sweep_hook
-#define elf_backend_check_relocs		iq2000_elf_check_relocs
-#define elf_backend_object_p			iq2000_elf_object_p
-#define elf_backend_rela_normal			1
-
-#define elf_backend_can_gc_sections		1
-
-#define bfd_elf32_bfd_reloc_type_lookup		iq2000_reloc_type_lookup
-#define bfd_elf32_bfd_set_private_flags		iq2000_elf_set_private_flags
-#define bfd_elf32_bfd_copy_private_bfd_data	iq2000_elf_copy_private_bfd_data
-#define bfd_elf32_bfd_merge_private_bfd_data	iq2000_elf_merge_private_bfd_data
-#define bfd_elf32_bfd_print_private_bfd_data	iq2000_elf_print_private_bfd_data
-
-#include "elf32-target.h"
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 2f49dad..0875d88 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1,5 +1,5 @@
 /* Motorola 68k series support for 32-bit ELF
-   Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -689,15 +689,9 @@
 			  || !bfd_set_section_alignment (dynobj, sreloc, 2))
 			return FALSE;
 		    }
-		}
-
-	      if (sec->flags & SEC_READONLY
-		  /* Don't set DF_TEXTREL yet for PC relative
-		     relocations, they might be discarded later.  */
-		  && !(ELF32_R_TYPE (rel->r_info) == R_68K_PC8
-		       || ELF32_R_TYPE (rel->r_info) == R_68K_PC16
-		       || ELF32_R_TYPE (rel->r_info) == R_68K_PC32))
+		  if (sec->flags & SEC_READONLY)
 		    info->flags |= DF_TEXTREL;
+		}
 
 	      sreloc->_raw_size += sizeof (Elf32_External_Rela);
 
@@ -1291,15 +1285,11 @@
 /* This function is called via elf_m68k_link_hash_traverse if we are
    creating a shared object.  In the -Bsymbolic case it discards the
    space allocated to copy PC relative relocs against symbols which
-   are defined in regular objects.  For the normal shared case, it
+   are defined in regular objects.  For the normal shared case, if
    discards space for pc-relative relocs that have become local due to
    symbol visibility changes.  We allocated space for them in the
    check_relocs routine, but we won't fill them in in the
-   relocate_section routine.
-
-   We also check whether any of the remaining relocations apply
-   against a readonly section, and set the DF_TEXTREL flag in this
-   case.  */
+   relocate_section routine.  */
 
 static bfd_boolean
 elf_m68k_discard_copies (h, inf)
@@ -1315,19 +1305,7 @@
   if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
       || (!info->symbolic
 	  && (h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0))
-    {
-      if ((info->flags & DF_TEXTREL) == 0)
-	{
-	  /* Look for relocations against read-only sections.  */
-	  for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
-	    if ((s->section->flags & SEC_READONLY) != 0)
-	      {
-		info->flags |= DF_TEXTREL;
-		break;
-	      }
-	}
-      return TRUE;
-    }
+    return TRUE;
 
   for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
     s->section->_raw_size -= s->count * sizeof (Elf32_External_Rela);
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
deleted file mode 100644
index 694a30f..0000000
--- a/bfd/elf32-msp430.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/*  MSP430-specific support for 32-bit ELF
-    Copyright (C) 2002 Free Software Foundation, Inc.
-    Contributed by Dmitry Diky <diwil@mail.ru>
-
-    This file is part of BFD, the Binary File Descriptor library.
-
-    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.  */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "libiberty.h"
-#include "libbfd.h"
-#include "elf-bfd.h"
-#include "elf/msp430.h"
-
-static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-static void msp430_info_to_howto_rela
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static asection *elf32_msp430_gc_mark_hook
-  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
-
-static bfd_boolean elf32_msp430_gc_sweep_hook
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-	   const Elf_Internal_Rela *));
-
-static bfd_boolean elf32_msp430_check_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-	   const Elf_Internal_Rela *));
-
-static bfd_reloc_status_type msp430_final_link_relocate
-  PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
-	   Elf_Internal_Rela *, bfd_vma));
-
-static bfd_boolean elf32_msp430_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
-static void bfd_elf_msp430_final_write_processing
-  PARAMS ((bfd *, bfd_boolean));
-
-static bfd_boolean elf32_msp430_object_p
-  PARAMS ((bfd *));
-
-static void elf32_msp430_post_process_headers
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-/* Use RELA instead of REL.  */
-#undef USE_REL
-
-static reloc_howto_type elf_msp430_howto_table[] =
-{
-  HOWTO (R_MSP430_NONE,		/* type */
-	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 32,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_bitfield,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_NONE",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0,			/* src_mask */
-	 0,			/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  HOWTO (R_MSP430_32,		/* type */
-	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 32,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_bitfield,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_32",		/* name */
-	 FALSE,			/* partial_inplace */
-	 0xffffffff,		/* src_mask */
-	 0xffffffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* A 13 bit PC relative relocation.  */
-  HOWTO (R_MSP430_10_PCREL,	/* type */
-	 1,			/* rightshift */
-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
-	 10,			/* bitsize */
-	 TRUE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_bitfield,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_13_PCREL",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0xfff,			/* src_mask */
-	 0xfff,			/* dst_mask */
-	 TRUE),			/* pcrel_offset */
-
-  /* A 16 bit absolute relocation.  */
-  HOWTO (R_MSP430_16,		/* type */
-	 0,			/* rightshift */
-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont,/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_16",		/* name */
-	 FALSE,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* A 16 bit absolute relocation for command address.  */
-  HOWTO (R_MSP430_16_PCREL,	/* type */
-	 1,			/* rightshift */
-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 TRUE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont,/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_16_PCREL",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 TRUE),			/* pcrel_offset */
-
-  /* A 16 bit absolute relocation, byte operations.  */
-  HOWTO (R_MSP430_16_BYTE,	/* type */
-	 0,			/* rightshift */
-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 FALSE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont,/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_16_BYTE",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 FALSE),		/* pcrel_offset */
-
-  /* A 16 bit absolute relocation for command address.  */
-  HOWTO (R_MSP430_16_PCREL_BYTE,/* type */
-	 1,			/* rightshift */
-	 1,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 TRUE,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont,/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_MSP430_16_PCREL_BYTE",	/* name */
-	 FALSE,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
-	 TRUE)			/* pcrel_offset */
-};
-
-/* Map BFD reloc types to MSP430 ELF reloc types.  */
-
-struct msp430_reloc_map
-{
-  bfd_reloc_code_real_type bfd_reloc_val;
-  unsigned int elf_reloc_val;
-};
-
-static const struct msp430_reloc_map msp430_reloc_map[] =
-  {
-    {BFD_RELOC_NONE, R_MSP430_NONE},
-    {BFD_RELOC_32, R_MSP430_32},
-    {BFD_RELOC_MSP430_10_PCREL, R_MSP430_10_PCREL},
-    {BFD_RELOC_16, R_MSP430_16_BYTE},
-    {BFD_RELOC_MSP430_16_PCREL, R_MSP430_16_PCREL},
-    {BFD_RELOC_MSP430_16, R_MSP430_16},
-    {BFD_RELOC_MSP430_16_PCREL_BYTE, R_MSP430_16_PCREL_BYTE},
-    {BFD_RELOC_MSP430_16_BYTE, R_MSP430_16_BYTE}
-  };
-
-static reloc_howto_type *
-bfd_elf32_bfd_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
-{
-  unsigned int i;
-
-  for (i = 0; i < ARRAY_SIZE (msp430_reloc_map); i++)
-    if (msp430_reloc_map[i].bfd_reloc_val == code)
-      return &elf_msp430_howto_table[msp430_reloc_map[i].elf_reloc_val];
-
-  return NULL;
-}
-
-/* Set the howto pointer for an MSP430 ELF reloc.  */
-
-static void
-msp430_info_to_howto_rela (abfd, cache_ptr, dst)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *cache_ptr;
-     Elf_Internal_Rela *dst;
-{
-  unsigned int r_type;
-
-  r_type = ELF32_R_TYPE (dst->r_info);
-  BFD_ASSERT (r_type < (unsigned int) R_MSP430_max);
-  cache_ptr->howto = &elf_msp430_howto_table[r_type];
-}
-
-static asection *
-elf32_msp430_gc_mark_hook (sec, info, rel, h, sym)
-     asection *sec;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *rel;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
-{
-  if (h != NULL)
-    {
-      switch (ELF32_R_TYPE (rel->r_info))
-	{
-	default:
-	  switch (h->root.type)
-	    {
-	    case bfd_link_hash_defined:
-	    case bfd_link_hash_defweak:
-	      return h->root.u.def.section;
-
-	    case bfd_link_hash_common:
-	      return h->root.u.c.p->section;
-
-	    default:
-	      break;
-	    }
-	}
-    }
-  else
-    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
-  return NULL;
-}
-
-static bfd_boolean
-elf32_msp430_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     asection *sec ATTRIBUTE_UNUSED;
-     const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
-{
-  /* We don't use got and plt entries for msp430.  */
-  return TRUE;
-}
-
-/* Look through the relocs for a section during the first phase.
-   Since we don't do .gots or .plts, we just need to consider the
-   virtual table relocs for gc.  */
-
-static bfd_boolean
-elf32_msp430_check_relocs (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
-{
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
-  const Elf_Internal_Rela *rel;
-  const Elf_Internal_Rela *rel_end;
-
-  if (info->relocateable)
-    return TRUE;
-
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (abfd);
-  sym_hashes_end =
-      sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
-
-  rel_end = relocs + sec->reloc_count;
-  for (rel = relocs; rel < rel_end; rel++)
-    {
-      struct elf_link_hash_entry *h;
-      unsigned long r_symndx;
-
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      if (r_symndx < symtab_hdr->sh_info)
-	h = NULL;
-      else
-	h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-    }
-
-  return TRUE;
-}
-
-/* Perform a single relocation.  By default we use the standard BFD
-   routines, but a few relocs, we have to do them ourselves.  */
-
-static bfd_reloc_status_type
-msp430_final_link_relocate (howto, input_bfd, input_section,
-			    contents, rel, relocation)
-     reloc_howto_type *howto;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *rel;
-     bfd_vma relocation;
-{
-  bfd_reloc_status_type r = bfd_reloc_ok;
-  bfd_vma x;
-  bfd_signed_vma srel;
-
-  switch (howto->type)
-    {
-    case R_MSP430_10_PCREL:
-      contents += rel->r_offset;
-      srel = (bfd_signed_vma) relocation;
-      srel += rel->r_addend;
-      srel -= rel->r_offset;
-      srel -= 2;		/* Branch instructions add 2 to the PC...  */
-      srel -= (input_section->output_section->vma +
-	       input_section->output_offset);
-
-      if (srel & 1)
-	return bfd_reloc_outofrange;
-
-      /* MSP430 addresses commands as words.  */
-      srel >>= 1;
-
-      /* Check for an overflow.  */
-      if (srel < -512 || srel > 511)
-	return bfd_reloc_overflow;
-
-      x = bfd_get_16 (input_bfd, contents);
-      x = (x & 0xfc00) | (srel & 0x3ff);
-      bfd_put_16 (input_bfd, x, contents);
-      break;
-
-    case R_MSP430_16_PCREL:
-      contents += rel->r_offset;
-      srel = (bfd_signed_vma) relocation;
-      srel += rel->r_addend;
-      srel -= rel->r_offset;
-      /* Only branch instructions add 2 to the PC...  */
-      srel -= (input_section->output_section->vma +
-	       input_section->output_offset);
-
-      if (srel & 1)
-	return bfd_reloc_outofrange;
-
-      bfd_put_16 (input_bfd, srel & 0xffff, contents);
-      break;
-
-    case R_MSP430_16_PCREL_BYTE:
-      contents += rel->r_offset;
-      srel = (bfd_signed_vma) relocation;
-      srel += rel->r_addend;
-      srel -= rel->r_offset;
-      /* Only branch instructions add 2 to the PC...  */
-      srel -= (input_section->output_section->vma +
-	       input_section->output_offset);
-
-      bfd_put_16 (input_bfd, srel & 0xffff, contents);
-      break;
-
-    case R_MSP430_16_BYTE:
-      contents += rel->r_offset;
-      srel = (bfd_signed_vma) relocation;
-      srel += rel->r_addend;
-      bfd_put_16 (input_bfd, srel & 0xffff, contents);
-      break;
-
-    case R_MSP430_16:
-      contents += rel->r_offset;
-      srel = (bfd_signed_vma) relocation;
-      srel += rel->r_addend;
-
-      if (srel & 1)
-	return bfd_reloc_notsupported;
-
-      bfd_put_16 (input_bfd, srel & 0xffff, contents);
-      break;
-
-    default:
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section,
-				    contents, rel->r_offset,
-				    relocation, rel->r_addend);
-    }
-
-  return r;
-}
-
-/* Relocate an MSP430 ELF section.  */
-
-static bfd_boolean
-elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
-			       contents, relocs, local_syms, local_sections)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
-{
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes;
-  Elf_Internal_Rela *rel;
-  Elf_Internal_Rela *relend;
-
-  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (input_bfd);
-  relend = relocs + input_section->reloc_count;
-
-  for (rel = relocs; rel < relend; rel++)
-    {
-      reloc_howto_type *howto;
-      unsigned long r_symndx;
-      Elf_Internal_Sym *sym;
-      asection *sec;
-      struct elf_link_hash_entry *h;
-      bfd_vma relocation;
-      bfd_reloc_status_type r;
-      const char *name = NULL;
-      int r_type;
-
-      /* This is a final link.  */
-
-      r_type = ELF32_R_TYPE (rel->r_info);
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      howto = elf_msp430_howto_table + ELF32_R_TYPE (rel->r_info);
-      h = NULL;
-      sym = NULL;
-      sec = NULL;
-
-      if (r_symndx < symtab_hdr->sh_info)
-	{
-	  sym = local_syms + r_symndx;
-	  sec = local_sections[r_symndx];
-	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
-
-	  name = bfd_elf_string_from_elf_section
-	      (input_bfd, symtab_hdr->sh_link, sym->st_name);
-	  name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
-	}
-      else
-	{
-	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
-	  while (h->root.type == bfd_link_hash_indirect
-		 || h->root.type == bfd_link_hash_warning)
-	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-	  name = h->root.root.string;
-
-	  if (h->root.type == bfd_link_hash_defined
-	      || h->root.type == bfd_link_hash_defweak)
-	    {
-	      sec = h->root.u.def.section;
-	      relocation = (h->root.u.def.value
-			    + sec->output_section->vma + sec->output_offset);
-	    }
-	  else if (h->root.type == bfd_link_hash_undefweak)
-	    {
-	      relocation = 0;
-	    }
-	  else
-	    {
-	      if (!((*info->callbacks->undefined_symbol)
-		    (info, h->root.root.string, input_bfd,
-		     input_section, rel->r_offset, TRUE)))
-		return FALSE;
-	      relocation = 0;
-	    }
-	}
-
-      r = msp430_final_link_relocate (howto, input_bfd, input_section,
-				      contents, rel, relocation);
-
-      if (r != bfd_reloc_ok)
-	{
-	  const char *msg = (const char *) NULL;
-
-	  switch (r)
-	    {
-	    case bfd_reloc_overflow:
-	      r = info->callbacks->reloc_overflow
-		  (info, name, howto->name, (bfd_vma) 0,
-		   input_bfd, input_section, rel->r_offset);
-	      break;
-
-	    case bfd_reloc_undefined:
-	      r = info->callbacks->undefined_symbol
-		  (info, name, input_bfd, input_section, rel->r_offset, TRUE);
-	      break;
-
-	    case bfd_reloc_outofrange:
-	      msg = _("internal error: out of range error");
-	      break;
-
-	    case bfd_reloc_notsupported:
-	      msg = _("internal error: unsupported relocation error");
-	      break;
-
-	    case bfd_reloc_dangerous:
-	      msg = _("internal error: dangerous relocation");
-	      break;
-
-	    default:
-	      msg = _("internal error: unknown error");
-	      break;
-	    }
-
-	  if (msg)
-	    r = info->callbacks->warning
-		(info, msg, name, input_bfd, input_section, rel->r_offset);
-
-	  if (!r)
-	    return FALSE;
-	}
-
-    }
-
-  return TRUE;
-}
-
-/* The final processing done just before writing out a MSP430 ELF object
-   file.  This gets the MSP430 architecture right based on the machine
-   number.  */
-
-static void
-bfd_elf_msp430_final_write_processing (abfd, linker)
-     bfd *abfd;
-     bfd_boolean linker ATTRIBUTE_UNUSED;
-{
-  unsigned long val;
-
-  switch (bfd_get_mach (abfd))
-    {
-    default:
-    case bfd_mach_msp12:
-      val = E_MSP430_MACH_MSP430x12;
-      break;
-
-    case bfd_mach_msp110:
-      val = E_MSP430_MACH_MSP430x11x1;
-      break;
-
-    case bfd_mach_msp11:
-      val = E_MSP430_MACH_MSP430x11;
-      break;
-
-    case bfd_mach_msp13:
-      val = E_MSP430_MACH_MSP430x13;
-      break;
-
-    case bfd_mach_msp14:
-      val = E_MSP430_MACH_MSP430x14;
-      break;
-
-    case bfd_mach_msp41:
-      val = E_MSP430_MACH_MSP430x41;
-      break;
-
-    case bfd_mach_msp43:
-      val = E_MSP430_MACH_MSP430x43;
-      break;
-
-    case bfd_mach_msp44:
-      val = E_MSP430_MACH_MSP430x44;
-      break;
-
-    case bfd_mach_msp31:
-      val = E_MSP430_MACH_MSP430x31;
-      break;
-
-    case bfd_mach_msp32:
-      val = E_MSP430_MACH_MSP430x32;
-      break;
-
-    case bfd_mach_msp33:
-      val = E_MSP430_MACH_MSP430x33;
-      break;
-
-    case bfd_mach_msp15:
-      val = E_MSP430_MACH_MSP430x15;
-      break;
-
-    case bfd_mach_msp16:
-      val = E_MSP430_MACH_MSP430x16;
-      break;
-    }
-
-  elf_elfheader (abfd)->e_machine = EM_MSP430;
-  elf_elfheader (abfd)->e_flags &= ~EF_MSP430_MACH;
-  elf_elfheader (abfd)->e_flags |= val;
-}
-
-/* Set the right machine number.  */
-
-static bfd_boolean
-elf32_msp430_object_p (abfd)
-     bfd *abfd;
-{
-  int e_set = bfd_mach_msp14;
-
-  if (elf_elfheader (abfd)->e_machine == EM_MSP430
-      || elf_elfheader (abfd)->e_machine == EM_MSP430_OLD)
-    {
-      int e_mach = elf_elfheader (abfd)->e_flags & EF_MSP430_MACH;
-
-      switch (e_mach)
-	{
-	default:
-	case E_MSP430_MACH_MSP430x12:
-	  e_set = bfd_mach_msp12;
-	  break;
-
-	case E_MSP430_MACH_MSP430x11:
-	  e_set = bfd_mach_msp11;
-	  break;
-
-	case E_MSP430_MACH_MSP430x11x1:
-	  e_set = bfd_mach_msp110;
-	  break;
-
-	case E_MSP430_MACH_MSP430x13:
-	  e_set = bfd_mach_msp13;
-	  break;
-
-	case E_MSP430_MACH_MSP430x14:
-	  e_set = bfd_mach_msp14;
-	  break;
-
-	case E_MSP430_MACH_MSP430x41:
-	  e_set = bfd_mach_msp41;
-	  break;
-
-	case E_MSP430_MACH_MSP430x31:
-	  e_set = bfd_mach_msp31;
-	  break;
-
-	case E_MSP430_MACH_MSP430x32:
-	  e_set = bfd_mach_msp32;
-	  break;
-
-	case E_MSP430_MACH_MSP430x33:
-	  e_set = bfd_mach_msp33;
-	  break;
-
-	case E_MSP430_MACH_MSP430x43:
-	  e_set = bfd_mach_msp43;
-	  break;
-
-	case E_MSP430_MACH_MSP430x44:
-	  e_set = bfd_mach_msp44;
-	  break;
-
-	case E_MSP430_MACH_MSP430x15:
-	  e_set = bfd_mach_msp15;
-	  break;
-
-	case E_MSP430_MACH_MSP430x16:
-	  e_set = bfd_mach_msp16;
-	  break;
-	}
-    }
-
-  return bfd_default_set_arch_mach (abfd, bfd_arch_msp430, e_set);
-}
-
-static void
-elf32_msp430_post_process_headers (abfd, link_info)
-     bfd *abfd;
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-{
-  Elf_Internal_Ehdr *i_ehdrp;	/* ELF file header, internal form.  */
-
-  i_ehdrp = elf_elfheader (abfd);
-
-#ifndef ELFOSABI_STANDALONE
-#define ELFOSABI_STANDALONE	255
-#endif
-
-  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_STANDALONE;
-}
-
-
-#define ELF_ARCH		bfd_arch_msp430
-#define ELF_MACHINE_CODE	EM_MSP430
-#define ELF_MACHINE_ALT1	EM_MSP430_OLD
-#define ELF_MAXPAGESIZE		1
-
-#define TARGET_LITTLE_SYM       bfd_elf32_msp430_vec
-#define TARGET_LITTLE_NAME	"elf32-msp430"
-
-#define elf_info_to_howto	             msp430_info_to_howto_rela
-#define elf_info_to_howto_rel	             NULL
-#define elf_backend_relocate_section         elf32_msp430_relocate_section
-#define elf_backend_gc_mark_hook             elf32_msp430_gc_mark_hook
-#define elf_backend_gc_sweep_hook            elf32_msp430_gc_sweep_hook
-#define elf_backend_check_relocs             elf32_msp430_check_relocs
-#define elf_backend_can_gc_sections          1
-#define elf_backend_final_write_processing   bfd_elf_msp430_final_write_processing
-#define elf_backend_object_p		     elf32_msp430_object_p
-#define elf_backend_post_process_headers     elf32_msp430_post_process_headers
-
-#include "elf32-target.h"
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index c09e9de..df0d7ca 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -174,7 +174,7 @@
 	 complain_overflow_signed, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_XSTORMY16_REL_12",	/* name */
-	 FALSE,			/* partial_inplace */
+	 TRUE,			/* partial_inplace */
 	 0,			/* src_mask */
 	 0x0fff,		/* dst_mask */
 	 TRUE),			/* pcrel_offset */
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index bce2668..ac9822a 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -5137,7 +5137,8 @@
 	  bfd_put_64 (output_bfd, (bfd_vma) 0, splt->contents + 16);
 	  bfd_put_64 (output_bfd, (bfd_vma) 0, splt->contents + 24);
 
-	  elf_section_data (splt->output_section)->this_hdr.sh_entsize = 0;
+	  elf_section_data (splt->output_section)->this_hdr.sh_entsize =
+	    PLT_HEADER_SIZE;
 	}
     }
 
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 269c98c..144a9da 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -1,6 +1,6 @@
 /* MIPS-specific support for 32-bit ELF
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003  Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Free Software Foundation, Inc.
 
    Most of the information added by Ian Lance Taylor, Cygnus Support,
    <ian@cygnus.com>.
@@ -96,7 +96,6 @@
 extern const bfd_target bfd_elf32_nbigmips_vec;
 extern const bfd_target bfd_elf32_nlittlemips_vec;
 
-static asection *prev_reloc_section = NULL;
 static bfd_vma prev_reloc_address = -1;
 static bfd_vma prev_reloc_addend = 0;
 
@@ -1208,31 +1207,29 @@
 {									\
   /* If we're relocating, and this is an external symbol, we don't	\
      want to change anything.  */					\
-    if ((obfd) != (bfd *) NULL						\
-	&& ((sym)->flags & BSF_SECTION_SYM) == 0			\
-	&& (! (entry)->howto->partial_inplace				\
-	    || (entry)->addend == 0))					\
+    if (obfd != (bfd *) NULL						\
+	&& (sym->flags & BSF_SECTION_SYM) == 0				\
+	&& (! entry->howto->partial_inplace				\
+	    || entry->addend == 0))					\
       {									\
-        (entry)->address += (sec)->output_offset;			\
+        entry->address += sec->output_offset;				\
         return bfd_reloc_ok;						\
       }									\
 									\
     /* The addend of combined relocs is remembered and left for		\
        subsequent relocs.  */						\
-    if (prev_reloc_address != (entry)->address				\
-	|| prev_reloc_section != (sec))					\
+    if (prev_reloc_address != reloc_entry->address)			\
       {									\
-	prev_reloc_section = (sec);					\
-        prev_reloc_address = (entry)->address;				\
-        prev_reloc_addend = (entry)->addend;				\
+        prev_reloc_address = reloc_entry->address;			\
+        prev_reloc_addend = reloc_entry->addend;			\
       }									\
     else								\
-      (entry)->addend = prev_reloc_addend;				\
+      reloc_entry->addend = prev_reloc_addend;				\
 }
 
 #define SET_RELOC_ADDEND(entry)						\
 {									\
-  prev_reloc_addend = (entry)->addend;					\
+  prev_reloc_addend = entry->addend;					\
 }
 
 static bfd_reloc_status_type
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3164a2e..80a583b 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -1,6 +1,6 @@
 /* MIPS-specific support for ELF
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Free Software Foundation, Inc.
 
    Most of the information added by Ian Lance Taylor, Cygnus Support,
    <ian@cygnus.com>.
@@ -30,7 +30,6 @@
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
-#include "libiberty.h"
 #include "elf-bfd.h"
 #include "elfxx-mips.h"
 #include "elf/mips.h"
@@ -383,12 +382,11 @@
   PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
 	   struct mips_elf_link_hash_entry *, asection *,
 	   bfd_vma, bfd_vma *, asection *));
-static void mips_set_isa_flags PARAMS ((bfd *));
+static INLINE int elf_mips_isa PARAMS ((flagword));
 static INLINE char* elf_mips_abi_name PARAMS ((bfd *));
 static void mips_elf_irix6_finish_dynamic_symbol
   PARAMS ((bfd *, const char *, Elf_Internal_Sym *));
-static bfd_boolean mips_mach_extends_p PARAMS ((unsigned long, unsigned long));
-static bfd_boolean mips_32bit_flags_p PARAMS ((flagword));
+static bfd_boolean _bfd_mips_elf_mach_extends_p PARAMS ((flagword, flagword));
 static hashval_t mips_elf_got_entry_hash PARAMS ((const PTR));
 static int mips_elf_got_entry_eq PARAMS ((const PTR, const PTR));
 
@@ -3082,6 +3080,32 @@
   return TRUE;
 }
 
+/* Return the ISA for a MIPS e_flags value.  */
+
+static INLINE int
+elf_mips_isa (flags)
+     flagword flags;
+{
+  switch (flags & EF_MIPS_ARCH)
+    {
+    case E_MIPS_ARCH_1:
+      return 1;
+    case E_MIPS_ARCH_2:
+      return 2;
+    case E_MIPS_ARCH_3:
+      return 3;
+    case E_MIPS_ARCH_4:
+      return 4;
+    case E_MIPS_ARCH_5:
+      return 5;
+    case E_MIPS_ARCH_32:
+      return 32;
+    case E_MIPS_ARCH_64:
+      return 64;
+    }
+  return 4;
+}
+
 /* Return the MACH for a MIPS e_flags value.  */
 
 unsigned long
@@ -3148,10 +3172,6 @@
 	case E_MIPS_ARCH_64:
 	  return bfd_mach_mipsisa64;
 	  break;
-
-	case E_MIPS_ARCH_32R2:
-	  return bfd_mach_mipsisa32r2;
-	  break;
 	}
     }
 
@@ -5941,14 +5961,20 @@
   return TRUE;
 }
 
+/* The final processing done just before writing out a MIPS ELF object
+   file.  This gets the MIPS architecture right based on the machine
+   number.  This is used by both the 32-bit and the 64-bit ABI.  */
 
-/* Set ABFD's EF_MIPS_ARCH and EF_MIPS_MACH flags.  */
-
-static void
-mips_set_isa_flags (abfd)
+void
+_bfd_mips_elf_final_write_processing (abfd, linker)
      bfd *abfd;
+     bfd_boolean linker ATTRIBUTE_UNUSED;
 {
-  flagword val;
+  unsigned long val;
+  unsigned int i;
+  Elf_Internal_Shdr **hdrpp;
+  const char *name;
+  asection *sec;
 
   switch (bfd_get_mach (abfd))
     {
@@ -6021,38 +6047,11 @@
 
     case bfd_mach_mipsisa64:
       val = E_MIPS_ARCH_64;
-      break;
-
-    case bfd_mach_mipsisa32r2:
-      val = E_MIPS_ARCH_32R2;
-      break;
     }
+
   elf_elfheader (abfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
   elf_elfheader (abfd)->e_flags |= val;
 
-}
-
-
-/* The final processing done just before writing out a MIPS ELF object
-   file.  This gets the MIPS architecture right based on the machine
-   number.  This is used by both the 32-bit and the 64-bit ABI.  */
-
-void
-_bfd_mips_elf_final_write_processing (abfd, linker)
-     bfd *abfd;
-     bfd_boolean linker ATTRIBUTE_UNUSED;
-{
-  unsigned int i;
-  Elf_Internal_Shdr **hdrpp;
-  const char *name;
-  asection *sec;
-
-  /* Keep the existing EF_MIPS_MACH and EF_MIPS_ARCH flags if the former
-     is nonzero.  This is for compatibility with old objects, which used
-     a combination of a 32-bit EF_MIPS_ARCH and a 64-bit EF_MIPS_MACH.  */
-  if ((elf_elfheader (abfd)->e_flags & EF_MIPS_MACH) == 0)
-    mips_set_isa_flags (abfd);
-
   /* Set the sh_info field for .gptab sections and other appropriate
      info for each special section.  */
   for (i = 1, hdrpp = elf_elfsections (abfd) + 1;
@@ -7721,97 +7720,26 @@
   return TRUE;
 }
 
-/* Structure for saying that BFD machine EXTENSION extends BASE.  */
-
-struct mips_mach_extension {
-  unsigned long extension, base;
-};
-
-
-/* An array describing how BFD machines relate to one another.  The entries
-   are ordered topologically with MIPS I extensions listed last.  */
-
-static const struct mips_mach_extension mips_mach_extensions[] = {
-  /* MIPS64 extensions.  */
-  { bfd_mach_mips_sb1, bfd_mach_mipsisa64 },
-
-  /* MIPS V extensions.  */
-  { bfd_mach_mipsisa64, bfd_mach_mips5 },
-
-  /* R10000 extensions.  */
-  { bfd_mach_mips12000, bfd_mach_mips10000 },
-
-  /* R5000 extensions.  Note: the vr5500 ISA is an extension of the core
-     vr5400 ISA, but doesn't include the multimedia stuff.  It seems
-     better to allow vr5400 and vr5500 code to be merged anyway, since
-     many libraries will just use the core ISA.  Perhaps we could add
-     some sort of ASE flag if this ever proves a problem.  */
-  { bfd_mach_mips5500, bfd_mach_mips5400 },
-  { bfd_mach_mips5400, bfd_mach_mips5000 },
-
-  /* MIPS IV extensions.  */
-  { bfd_mach_mips5, bfd_mach_mips8000 },
-  { bfd_mach_mips10000, bfd_mach_mips8000 },
-  { bfd_mach_mips5000, bfd_mach_mips8000 },
-
-  /* VR4100 extensions.  */
-  { bfd_mach_mips4120, bfd_mach_mips4100 },
-  { bfd_mach_mips4111, bfd_mach_mips4100 },
-
-  /* MIPS III extensions.  */
-  { bfd_mach_mips8000, bfd_mach_mips4000 },
-  { bfd_mach_mips4650, bfd_mach_mips4000 },
-  { bfd_mach_mips4600, bfd_mach_mips4000 },
-  { bfd_mach_mips4400, bfd_mach_mips4000 },
-  { bfd_mach_mips4300, bfd_mach_mips4000 },
-  { bfd_mach_mips4100, bfd_mach_mips4000 },
-  { bfd_mach_mips4010, bfd_mach_mips4000 },
-
-  /* MIPS32 extensions.  */
-  { bfd_mach_mipsisa32r2, bfd_mach_mipsisa32 },
-
-  /* MIPS II extensions.  */
-  { bfd_mach_mips4000, bfd_mach_mips6000 },
-  { bfd_mach_mipsisa32, bfd_mach_mips6000 },
-
-  /* MIPS I extensions.  */
-  { bfd_mach_mips6000, bfd_mach_mips3000 },
-  { bfd_mach_mips3900, bfd_mach_mips3000 }
-};
-
-
-/* Return true if bfd machine EXTENSION is an extension of machine BASE.  */
+/* Return TRUE if machine EXTENSION is an extension of machine BASE,
+   meaning that it should be safe to link code for the two machines
+   and set the output machine to EXTENSION.  EXTENSION and BASE are
+   both submasks of EF_MIPS_MACH.  */
 
 static bfd_boolean
-mips_mach_extends_p (base, extension)
-     unsigned long base, extension;
+_bfd_mips_elf_mach_extends_p (base, extension)
+     flagword base, extension;
 {
-  size_t i;
-
-  for (i = 0; extension != base && i < ARRAY_SIZE (mips_mach_extensions); i++)
-    if (extension == mips_mach_extensions[i].extension)
-      extension = mips_mach_extensions[i].base;
-
-  return extension == base;
+  /* The vr5500 ISA is an extension of the core vr5400 ISA, but doesn't
+     include the multimedia stuff.  It seems better to allow vr5400
+     and vr5500 code to be merged anyway, since many libraries will
+     just use the core ISA.  Perhaps we could add some sort of ASE
+     flag if this ever proves a problem.  */
+  return (base == 0
+	  || (base == E_MIPS_MACH_5400 && extension == E_MIPS_MACH_5500)
+	  || (base == E_MIPS_MACH_4100 && extension == E_MIPS_MACH_4111)
+	  || (base == E_MIPS_MACH_4100 && extension == E_MIPS_MACH_4120));
 }
 
-
-/* Return true if the given ELF header flags describe a 32-bit binary.  */
-
-static bfd_boolean
-mips_32bit_flags_p (flags)
-     flagword flags;
-{
-  return ((flags & EF_MIPS_32BITMODE) != 0
-	  || (flags & EF_MIPS_ABI) == E_MIPS_ABI_O32
-	  || (flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI32
-	  || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_1
-	  || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2
-	  || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32
-	  || (flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R2);
-}
-
-
 /* Merge backend specific data from an object file to the output
    object file when linking.  */
 
@@ -7907,50 +7835,66 @@
       ok = FALSE;
     }
 
-  /* Compare the ISAs.  */
-  if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
+  /* Compare the ISA's.  */
+  if ((new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH))
+      != (old_flags & (EF_MIPS_ARCH | EF_MIPS_MACH)))
     {
-      (*_bfd_error_handler)
-	(_("%s: linking 32-bit code with 64-bit code"),
-	 bfd_archive_filename (ibfd));
-      ok = FALSE;
-    }
-  else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd)))
-    {
-      /* OBFD's ISA isn't the same as, or an extension of, IBFD's.  */
-      if (mips_mach_extends_p (bfd_get_mach (obfd), bfd_get_mach (ibfd)))
-	{
-	  /* Copy the architecture info from IBFD to OBFD.  Also copy
-	     the 32-bit flag (if set) so that we continue to recognise
-	     OBFD as a 32-bit binary.  */
-	  bfd_set_arch_info (obfd, bfd_get_arch_info (ibfd));
-	  elf_elfheader (obfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
-	  elf_elfheader (obfd)->e_flags
-	    |= new_flags & (EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
+      int new_mach = new_flags & EF_MIPS_MACH;
+      int old_mach = old_flags & EF_MIPS_MACH;
+      int new_isa = elf_mips_isa (new_flags);
+      int old_isa = elf_mips_isa (old_flags);
 
-	  /* Copy across the ABI flags if OBFD doesn't use them
-	     and if that was what caused us to treat IBFD as 32-bit.  */
-	  if ((old_flags & EF_MIPS_ABI) == 0
-	      && mips_32bit_flags_p (new_flags)
-	      && !mips_32bit_flags_p (new_flags & ~EF_MIPS_ABI))
-	    elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ABI;
+      /* If either has no machine specified, just compare the general isa's.
+	 Some combinations of machines are ok, if the isa's match.  */
+      if (new_mach == old_mach
+	  || _bfd_mips_elf_mach_extends_p (new_mach, old_mach)
+	  || _bfd_mips_elf_mach_extends_p (old_mach, new_mach))
+	{
+	  /* Don't warn about mixing code using 32-bit ISAs, or mixing code
+	     using 64-bit ISAs.  They will normally use the same data sizes
+	     and calling conventions.  */
+
+	  if ((  (new_isa == 1 || new_isa == 2 || new_isa == 32)
+	       ^ (old_isa == 1 || old_isa == 2 || old_isa == 32)) != 0)
+	    {
+	      (*_bfd_error_handler)
+	       (_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
+		bfd_archive_filename (ibfd), new_isa, old_isa);
+	      ok = FALSE;
+	    }
+	  else
+	    {
+	      /* Do we need to update the mach field?  */
+	      if (_bfd_mips_elf_mach_extends_p (old_mach, new_mach))
+		{
+		  elf_elfheader (obfd)->e_flags &= ~EF_MIPS_MACH;
+		  elf_elfheader (obfd)->e_flags |= new_mach;
+		}
+
+	      /* Do we need to update the ISA field?  */
+	      if (new_isa > old_isa)
+		{
+		  elf_elfheader (obfd)->e_flags &= ~EF_MIPS_ARCH;
+		  elf_elfheader (obfd)->e_flags
+		    |= new_flags & EF_MIPS_ARCH;
+		}
+	    }
 	}
       else
 	{
-	  /* The ISAs aren't compatible.  */
 	  (*_bfd_error_handler)
-	    (_("%s: linking %s module with previous %s modules"),
+	    (_("%s: ISA mismatch (%d) with previous modules (%d)"),
 	     bfd_archive_filename (ibfd),
-	     bfd_printable_name (ibfd),
-	     bfd_printable_name (obfd));
+	     _bfd_elf_mips_mach (new_flags),
+	     _bfd_elf_mips_mach (old_flags));
 	  ok = FALSE;
 	}
+
+      new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
+      old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
     }
 
-  new_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
-  old_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH | EF_MIPS_32BITMODE);
-
-  /* Compare ABIs.  The 64-bit ABI does not use EF_MIPS_ABI.  But, it
+  /* Compare ABI's.  The 64-bit ABI does not use EF_MIPS_ABI.  But, it
      does set EI_CLASS differently from any 32-bit ABI.  */
   if ((new_flags & EF_MIPS_ABI) != (old_flags & EF_MIPS_ABI)
       || (elf_elfheader (ibfd)->e_ident[EI_CLASS]
@@ -8061,8 +8005,6 @@
     fprintf (file, _(" [mips32]"));
   else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64)
     fprintf (file, _(" [mips64]"));
-  else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R2)
-    fprintf (file, _(" [mips32r2]"));
   else
     fprintf (file, _(" [unknown ISA]"));
 
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 98f06a8..8f3cf58 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1373,14 +1373,6 @@
   "BFD_RELOC_VAX_GLOB_DAT",
   "BFD_RELOC_VAX_JMP_SLOT",
   "BFD_RELOC_VAX_RELATIVE",
-  "BFD_RELOC_MSP430_10_PCREL",
-  "BFD_RELOC_MSP430_16_PCREL",
-  "BFD_RELOC_MSP430_16",
-  "BFD_RELOC_MSP430_16_PCREL_BYTE",
-  "BFD_RELOC_MSP430_16_BYTE",
-  "BFD_RELOC_IQ2000_OFFSET_16",
-  "BFD_RELOC_IQ2000_OFFSET_21",
-  "BFD_RELOC_IQ2000_UHI16",
  "@@overflow: BFD_RELOC_UNUSED@@",
 };
 #endif
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 661ac4a..23224f3 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -1,6 +1,6 @@
 /* BFD support for handling relocation entries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -3613,28 +3613,6 @@
   BFD_RELOC_VAX_RELATIVE
 ENUMDOC
   Relocations used by VAX ELF.
-  
-ENUM
-  BFD_RELOC_MSP430_10_PCREL
-ENUMX
-  BFD_RELOC_MSP430_16_PCREL
-ENUMX
-  BFD_RELOC_MSP430_16
-ENUMX
-  BFD_RELOC_MSP430_16_PCREL_BYTE
-ENUMX
-  BFD_RELOC_MSP430_16_BYTE
-ENUMDOC
-  msp430 specific relocation codes
-
-ENUM
-  BFD_RELOC_IQ2000_OFFSET_16
-ENUMX
-  BFD_RELOC_IQ2000_OFFSET_21
-ENUMX
-  BFD_RELOC_IQ2000_UHI16
-ENUMDOC
-  IQ2000 Relocations.
 
 ENDSENUM
   BFD_RELOC_UNUSED
diff --git a/bfd/targets.c b/bfd/targets.c
index c541c11..998327d 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -1,6 +1,6 @@
 /* Generic target-file-type support for the BFD library.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -533,7 +533,6 @@
 extern const bfd_target bfd_elf32_ia64_big_vec;
 extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
 extern const bfd_target bfd_elf32_ip2k_vec;
-extern const bfd_target bfd_elf32_iq2000_vec;
 extern const bfd_target bfd_elf32_little_generic_vec;
 extern const bfd_target bfd_elf32_littlearc_vec;
 extern const bfd_target bfd_elf32_littlearm_oabi_vec;
@@ -548,7 +547,6 @@
 extern const bfd_target bfd_elf32_mcore_little_vec;
 extern const bfd_target bfd_elf32_mn10200_vec;
 extern const bfd_target bfd_elf32_mn10300_vec;
-extern const bfd_target bfd_elf32_msp430_vec;
 extern const bfd_target bfd_elf32_nbigmips_vec;
 extern const bfd_target bfd_elf32_nlittlemips_vec;
 extern const bfd_target bfd_elf32_ntradbigmips_vec;
@@ -821,7 +819,6 @@
 #endif
 	&bfd_elf32_ia64_hpux_big_vec,
 	&bfd_elf32_ip2k_vec,
-	&bfd_elf32_iq2000_vec,
 	&bfd_elf32_little_generic_vec,
 	&bfd_elf32_littlearc_vec,
 	&bfd_elf32_littlearm_oabi_vec,
@@ -836,7 +833,6 @@
 	&bfd_elf32_mcore_little_vec,
 	&bfd_elf32_mn10200_vec,
 	&bfd_elf32_mn10300_vec,
-	&bfd_elf32_msp430_vec,
 #ifdef BFD64
 	&bfd_elf32_nbigmips_vec,
 	&bfd_elf32_nlittlemips_vec,
diff --git a/bfd/version.h b/bfd/version.h
index 1da7b80..41b8bc4 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030109
+#define BFD_VERSION_DATE 20021223
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING @bfd_version_string@
diff --git a/config.guess b/config.guess
index ca12b79..181f0a2 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2003-01-03'
+timestamp='2002-09-12'
 
 # 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
@@ -98,31 +98,30 @@
 # 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.
+# This shell variable is my proudest work .. or something. --bje
 
-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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
 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
+	  if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
+	rm -f $files ;
 	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 ;'
+esac ;
+unset files'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -179,18 +178,7 @@
 		;;
 	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
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -235,9 +223,6 @@
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    *:MicroBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
-	exit 0 ;;
     alpha:OSF1:*:*)
 	if test $UNAME_RELEASE = "V4.0"; then
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -272,7 +257,7 @@
 	jsr \$26,exit
 	.end main
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 	if test "$?" = 0 ; then
 		case `$dummy` in
 			0-0)
@@ -301,6 +286,7 @@
 				;;
 		esac
 	fi
+	rm -f $dummy.s $dummy && rmdir $tmpdir
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
@@ -451,9 +437,10 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
+	$CC_FOR_BUILD $dummy.c -o $dummy \
 	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Motorola:PowerMAX_OS:*:*)
@@ -462,7 +449,7 @@
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
 	exit 0 ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+    Night_Hawk:*:*:PowerMAX_OS)
 	echo powerpc-harris-powermax
 	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
@@ -537,7 +524,8 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+		rm -f $dummy.c $dummy && rmdir $tmpdir
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -635,21 +623,11 @@
                   exit (0);
               }
 EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
+		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+		    rm -f $dummy.c $dummy && rmdir $tmpdir
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
     ia64:HP-UX:*:*)
@@ -683,7 +661,8 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -741,15 +720,15 @@
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
-    *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
-	exit 0 ;;
     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/\///'`
@@ -777,6 +756,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c && rmdir $tmpdir
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
 	exit 0 ;;
     i*:CYGWIN*:*)
@@ -789,16 +769,13 @@
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit 0 ;;
     x86:Interix*:3*)
-	echo i586-pc-interix3
-	exit 0 ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
+	echo i386-pc-interix3
 	exit 0 ;;
     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
+	echo i386-pc-interix
 	exit 0 ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
@@ -841,26 +818,8 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    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 | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	rm -f $dummy.c && rmdir $tmpdir
+	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
@@ -955,6 +914,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c && rmdir $tmpdir
 	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
@@ -972,23 +932,6 @@
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit 0 ;;
-    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 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
     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
@@ -1023,6 +966,9 @@
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
 	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -1049,12 +995,9 @@
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
 	exit 0 ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*: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)
+    3[34]??:*: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)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1071,6 +1014,9 @@
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
@@ -1188,6 +1134,11 @@
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
 	exit 0 ;;
+    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 0 ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
 	exit 0 ;;
@@ -1206,6 +1157,12 @@
     *:ITS:*:*)
 	echo pdp10-unknown-its
 	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1326,7 +1283,8 @@
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+rm -f $dummy.c $dummy && rmdir $tmpdir
 
 # Apollos put the system type in the environment.
 
diff --git a/config.sub b/config.sub
index 04baf3d..2a55e05 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2003-01-03'
+timestamp='2002-09-12'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@
 # 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -245,13 +245,11 @@
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
 	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
-	| msp430 \
 	| ns16k | ns32k \
 	| openrisc | or32 \
 	| pdp10 | pdp11 | pj | pjl \
@@ -317,13 +315,11 @@
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
 	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| mipstx39 | mipstx39el \
+	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -720,10 +716,6 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -909,6 +901,10 @@
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	t3d)
+		basic_machine=alpha-cray
+		os=-unicos
+		;;
 	t3e)
 		basic_machine=alphaev5-cray
 		os=-unicos
@@ -981,6 +977,10 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	windows32)
+		basic_machine=i386-pc
+		os=-windows32-msvcrt
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1113,12 +1113,11 @@
 	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -interix* | -uwin* | -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* | -microbsd*)
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1130,10 +1129,8 @@
 			;;
 		esac
 		;;
-	-nto-qnx*)
-		;;
 	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		os=-nto-qnx
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
diff --git a/config/ChangeLog b/config/ChangeLog
index 15c7c3e..c183693 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,20 +1,3 @@
-2002-12-28  Alexandre Oliva  <aoliva@redhat.com>
-
-	* acx.m4: Name cache variables properly.
-	(NCN_STRICT_CHECK_TOOL): If program is not found and 
-	value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2,
-	depending on whether build != host or not.
-	(NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix.
-
-2002-12-28  Nathanael Nerode  <neroden@gcc.gnu.org>
-
-	* acx.m4: New.
-	* mh-a68bsd, mh-aix386, mh-apollo68, mh-delta88, mh-hp300,
-	mh-hpux, mh-hpux8, mh-irix5, mh-irix6, mh-ncrsvr43, mh-openedition,
-	mh-riscos, mh-sysv: Delete.
-	* mh-cxux, mh-dgux386, mh-interix, mh-lynxrs6k, mh-ncr3000,
-	mh-necv4, mh-sco, mh-solaris, mh-sysv4, mh-sysv5, mt-v810: Simplify.
-
 2002-12-16  Christopher Faylor  <cgf@redhat.com>
 
 	* mh-cygwin: Don't build libtermcap if it doesn't exist.
diff --git a/config/acx.m4 b/config/acx.m4
deleted file mode 100644
index 4e16bcd..0000000
--- a/config/acx.m4
+++ /dev/null
@@ -1,81 +0,0 @@
-# Autoconf M4 include file defining utility macros for complex Canadian
-# cross builds.
-
-####
-# _NCN_TOOL_PREFIXES:  Some stuff that oughtta be done in AC_CANONICAL_SYSTEM 
-# or AC_INIT.
-# These demand that AC_CANONICAL_SYSTEM be called beforehand.
-AC_DEFUN([_NCN_TOOL_PREFIXES],
-[ncn_tool_prefix=
-test -n "$host_alias" && ncn_tool_prefix=$host_alias-
-ncn_target_tool_prefix=
-test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
-]) []dnl # _NCN_TOOL_PREFIXES
-
-####
-# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
-# Code is pretty much lifted from autoconf2.53.
-
-AC_DEFUN([NCN_CHECK_TARGET_TOOL],
-[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
-if test -n "$ncn_target_tool_prefix"; then
-  AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], 
-                [${ncn_target_tool_prefix}$2], , [$4])
-fi
-if test -z "$ac_cv_prog_$1" ; then
-  ncn_cv_$1=$$1
-  AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [$3], [$4])
-  $1=$ncn_cv_$1
-else
-  $1="$ac_cv_prog_$1"
-fi
-]) []dnl # NCN_CHECK_TARGET_TOOL
-
-
-####
-# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
-
-AC_DEFUN([NCN_STRICT_CHECK_TOOL],
-[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
-if test -n "$ncn_tool_prefix"; then
-  AC_CHECK_PROG([$1], [${ncn_tool_prefix}$2], 
-                [${ncn_tool_prefix}$2], , [$4])
-fi
-if test -z "$ac_cv_prog_$1" ; then
-  if test $build = $host ; then
-    ncn_cv_$1=$$1
-    AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) 
-    $1=$ncn_cv_$1
-  else
-    $1="ifelse([$3],[],[${ncn_tool_prefix}$2],[$3])"
-  fi
-else
-  $1="$ac_cv_prog_$1"
-fi
-]) []dnl # NCN_STRICT_CHECK_TOOL
-
-
-####
-# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
-
-AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOL],
-[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl
-if test -n "$ncn_target_tool_prefix"; then
-  AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], 
-                [${ncn_target_tool_prefix}$2], , [$4])
-fi
-if test -z "$ac_cv_prog_$1" ; then
-  if test $build = $target ; then
-    ncn_cv_$1=$$1
-    AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) 
-    $1=$ncn_cv_$1
-  else
-    $1="ifelse([$3],[],[${ncn_target_tool_prefix}$2],[$3])"
-  fi
-else
-  $1="$ac_cv_prog_$1"
-fi
-]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL
diff --git a/config/mh-a68bsd b/config/mh-a68bsd
new file mode 100644
index 0000000..2fe28d0
--- /dev/null
+++ b/config/mh-a68bsd
@@ -0,0 +1,2 @@
+RANLIB=true
+BISON=yacc
diff --git a/config/mh-aix386 b/config/mh-aix386
new file mode 100644
index 0000000..4accd1c
--- /dev/null
+++ b/config/mh-aix386
@@ -0,0 +1 @@
+RANLIB = @:
diff --git a/config/mh-apollo68 b/config/mh-apollo68
new file mode 100644
index 0000000..eb102d5
--- /dev/null
+++ b/config/mh-apollo68
@@ -0,0 +1 @@
+RANLIB=true
diff --git a/config/mh-cxux b/config/mh-cxux
index 8680654..0a98f11 100644
--- a/config/mh-cxux
+++ b/config/mh-cxux
@@ -1,5 +1,7 @@
 # Configuration for Harris CX/UX 7 (and maybe 6), based on sysv4 configuration.
 
+RANLIB = true
+
 # The l flag generates a warning from the SVR4 archiver, remove it.
 AR_FLAGS = cq
 
diff --git a/config/mh-delta88 b/config/mh-delta88
new file mode 100644
index 0000000..bc9c453
--- /dev/null
+++ b/config/mh-delta88
@@ -0,0 +1,4 @@
+RANLIB = true
+
+
+
diff --git a/config/mh-dgux386 b/config/mh-dgux386
index b2d2a05..2fcd4bf 100644
--- a/config/mh-dgux386
+++ b/config/mh-dgux386
@@ -1,3 +1,6 @@
+# from mh-sysv4
+RANLIB = true
+
 # The l flag generates a warning from the SVR4 archiver, remove it.
 AR_FLAGS = cr
 
diff --git a/config/mh-hp300 b/config/mh-hp300
new file mode 100644
index 0000000..17a69a6
--- /dev/null
+++ b/config/mh-hp300
@@ -0,0 +1,3 @@
+# If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
+# If it's HP/UX ar, this should be harmless.
+RANLIB = ar ts
diff --git a/config/mh-hpux b/config/mh-hpux
new file mode 100644
index 0000000..4003002
--- /dev/null
+++ b/config/mh-hpux
@@ -0,0 +1 @@
+RANLIB = true
diff --git a/config/mh-hpux8 b/config/mh-hpux8
new file mode 100644
index 0000000..4003002
--- /dev/null
+++ b/config/mh-hpux8
@@ -0,0 +1 @@
+RANLIB = true
diff --git a/config/mh-interix b/config/mh-interix
index 67dff5c..1693006 100644
--- a/config/mh-interix
+++ b/config/mh-interix
@@ -1,5 +1,6 @@
 # The shell may not be in /bin. 
 SHELL = sh
+RANLIB = true
 
 # We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be
 # built without debugging information
diff --git a/config/mh-irix5 b/config/mh-irix5
new file mode 100644
index 0000000..0019ee4
--- /dev/null
+++ b/config/mh-irix5
@@ -0,0 +1,2 @@
+# Makefile changes for SGI's running IRIX-5.x.
+RANLIB = true
diff --git a/config/mh-irix6 b/config/mh-irix6
new file mode 100644
index 0000000..bf6d8dc
--- /dev/null
+++ b/config/mh-irix6
@@ -0,0 +1,2 @@
+# Makefile changes for SGI's running IRIX-6.x.
+RANLIB = true
diff --git a/config/mh-lynxrs6k b/config/mh-lynxrs6k
index fac1b97..3ee7639 100644
--- a/config/mh-lynxrs6k
+++ b/config/mh-lynxrs6k
@@ -1,2 +1,5 @@
+# LynxOS running on the rs6000 doesn't have ranlib
+RANLIB = true
+
 # /bin/sh is too buggy, so use /bin/bash instead.
 SHELL = /bin/bash
diff --git a/config/mh-ncr3000 b/config/mh-ncr3000
index 7c6ee12..ead6cce 100644
--- a/config/mh-ncr3000
+++ b/config/mh-ncr3000
@@ -1,4 +1,6 @@
 # Host configuration file for an NCR 3000 (i486/SVR4) system.
 
+RANLIB = true
+
 # The l flag generates a warning from the SVR4 archiver, remove it.
 AR_FLAGS = cq
diff --git a/config/mh-ncrsvr43 b/config/mh-ncrsvr43
new file mode 100644
index 0000000..5446d77
--- /dev/null
+++ b/config/mh-ncrsvr43
@@ -0,0 +1,3 @@
+# Host configuration file for an NCR 3000 (i486/SVR43) system.
+
+RANLIB = true
diff --git a/config/mh-necv4 b/config/mh-necv4
index d71805e..6845f3c 100644
--- a/config/mh-necv4
+++ b/config/mh-necv4
@@ -1,4 +1,6 @@
 # Host Makefile fragment for NEC MIPS SVR4.
 
+RANLIB = true
+
 # NEC -lX11 needs some other libraries.
 X11_EXTRA_LIBS = -lsocket -lnsl
diff --git a/config/mh-openedition b/config/mh-openedition
new file mode 100644
index 0000000..4003002
--- /dev/null
+++ b/config/mh-openedition
@@ -0,0 +1 @@
+RANLIB = true
diff --git a/config/mh-riscos b/config/mh-riscos
new file mode 100644
index 0000000..07588c7
--- /dev/null
+++ b/config/mh-riscos
@@ -0,0 +1,3 @@
+# This is for a MIPS running RISC/os 4.52C.
+
+RANLIB = true
diff --git a/config/mh-sco b/config/mh-sco
index bf5a807..574b92a 100644
--- a/config/mh-sco
+++ b/config/mh-sco
@@ -1,3 +1,4 @@
+RANLIB = true
 # You may need this if you don't have bison.
 # BISON = yacc -Sm10400
 
diff --git a/config/mh-solaris b/config/mh-solaris
index 6e8f296..16553c5 100644
--- a/config/mh-solaris
+++ b/config/mh-solaris
@@ -1,2 +1,5 @@
 # Makefile changes for Suns running Solaris 2
+
+RANLIB = true
+
 X11_EXTRA_LIBS = -lnsl -lsocket
diff --git a/config/mh-sysv b/config/mh-sysv
new file mode 100644
index 0000000..4003002
--- /dev/null
+++ b/config/mh-sysv
@@ -0,0 +1 @@
+RANLIB = true
diff --git a/config/mh-sysv4 b/config/mh-sysv4
index 2e9374c..3634950 100644
--- a/config/mh-sysv4
+++ b/config/mh-sysv4
@@ -1,3 +1,5 @@
+RANLIB = true
+
 # The l flag generates a warning from the SVR4 archiver, remove it.
 AR_FLAGS = cr
 
diff --git a/config/mh-sysv5 b/config/mh-sysv5
index 2e9374c..3634950 100644
--- a/config/mh-sysv5
+++ b/config/mh-sysv5
@@ -1,3 +1,5 @@
+RANLIB = true
+
 # The l flag generates a warning from the SVR4 archiver, remove it.
 AR_FLAGS = cr
 
diff --git a/config/mt-aix43 b/config/mt-aix43
new file mode 100644
index 0000000..0c6627f
--- /dev/null
+++ b/config/mt-aix43
@@ -0,0 +1,4 @@
+# AIX 4.3 and above requires -X32_64 flag to all ar and nm commands
+# to handle both 32-bit and 64-bit objects.
+AR_FOR_TARGET=ar -X32_64
+NM_FOR_TARGET=nm -B -X32_64
diff --git a/config/mt-v810 b/config/mt-v810
index f5714f8..97da6c2 100644
--- a/config/mt-v810
+++ b/config/mt-v810
@@ -1,3 +1,4 @@
 CC_FOR_TARGET = ca732 -ansi
 AS_FOR_TARGET = as732
 AR_FOR_TARGET = ar732
+RANLIB_FOR_TARGET = true
diff --git a/configure b/configure
index f85cbce..6b4d9b4 100755
--- a/configure
+++ b/configure
@@ -1,43 +1,94 @@
-#! /bin/sh
+#!/bin/sh
 
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
+
+# Configuration script
+# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001,
+# 2002 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 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.
+
+# This file was originally written by K. Richard Pixley.
+
 #
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
+# Shell script to create proper links to machine-dependent files in
+# preparation for compilation.
+#
+# If configure succeeds, it leaves its status in config.status.
+# If configure fails after disturbing the status quo, 
+#       config.status is removed.
+#
 
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --disable-serial-[{host,target,build}-]configure
-                          Don't force sequential configuration of
-                          sub-packages for the host, target or build
-			  machine, or of any sub-packages at all"
+export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
 
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
+remove=rm
+hard_link=ln
+symbolic_link='ln -s'
+
+#for Test
+#remove="echo rm"
+#hard_link="echo ln"
+#symbolic_link="echo ln -s"
+
+# clear some things potentially inherited from environment.
+
+Makefile=Makefile
+Makefile_in=Makefile.in
+arguments=
+build_alias=
+cache_file=config.cache
+cache_file_option=
+configdirs=
+extraconfigdirs=
+diroptions=
+enable_threads=no
+enable_shared=no
+enable_libstdcxx_v3=yes
+exec_prefix=
+exec_prefixoption=
+fatal=
+floating_point=default
+gas=default
+gcc_version=
+gcc_version_trigger=
+host_alias=NOHOST
+host_makefile_frag=
+moveifchange=
+norecursion=
+other_options=
+package_makefile_frag=
+package_makefile_rules_frag=
+prefix=/usr/local
+progname=
+program_prefix=
+program_prefixoption=
+program_suffix=
+program_suffixoption=
+program_transform_name=
+program_transform_nameoption=
+redirect=
 site=
+site_makefile_frag=
+site_option=
 srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
+srctrigger=
+target_alias=NOTARGET
+target_makefile_frag=
+undefs=NOUNDEFS
+version="$Revision$"
+x11=default
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
@@ -51,656 +102,17 @@
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -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 ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$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" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    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)
-    # 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 << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --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
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$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" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    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)
-    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" ;;
-
-  -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 ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=move-if-change
-
-# 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 its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  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
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-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
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:578: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:599: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:617: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-if test "$program_transform_name" = s,x,x,; then
-  program_transform_name=
-else
-  # Double any \ or $.  echo might interpret backslashes.
-  cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-  rm -f conftestsed
-fi
-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"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-
-# Autoconf M4 include file defining utility macros for complex Canadian
-# cross builds.
-
-####
-# _NCN_TOOL_PREFIXES:  Some stuff that oughtta be done in AC_CANONICAL_SYSTEM 
-# or AC_INIT.
-# These demand that AC_CANONICAL_SYSTEM be called beforehand.
- 
-####
-# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
-# Code is pretty much lifted from autoconf2.53.
-
- 
-
-####
-# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
-
- 
-
-####
-# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
-# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
-
- 
-
-# clear some things potentially inherited from environment.
-
-enable_threads=no
-enable_shared=no
-enable_libstdcxx_v3=yes
-floating_point=default
-gas=default
-x11=default
-
 ### we might need to use some other shell than /bin/sh for running subshells
+
 ### If we are on Windows, search for the shell.  This will permit people
 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
 ### without also having to set CONFIG_SHELL.  This code will work when
 ### using bash, which sets OSTYPE.
 case "${OSTYPE}" in
 *win32*)
-  if test x${CONFIG_SHELL} = x ; then
-    if test ! -f /bin/sh ; then
-      if test x${SHELL} != x && test -f ${SHELL} ; then
+  if [ x${CONFIG_SHELL} = x ]; then
+    if [ ! -f /bin/sh ]; then
+      if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
 	CONFIG_SHELL=${SHELL}
 	export CONFIG_SHELL
       else
@@ -725,1246 +137,679 @@
 
 config_shell=${CONFIG_SHELL-/bin/sh}
 
+NO_EDIT="This file was generated automatically by configure.  Do not edit."
+
 ## this is a little touchy and won't always work, but...
 ##
-## if the argv[[0]] starts with a slash then it is an absolute name that can (and
+## if the argv[0] starts with a slash then it is an absolute name that can (and
 ## must) be used as is.
 ##
-## otherwise, if argv[[0]] has no slash in it, we can assume that it is on the
+## otherwise, if argv[0] has no slash in it, we can assume that it is on the
 ## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
 ##
 
 progname=$0
 # if PWD already has a value, it is probably wrong.
-if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
+if [ -n "$PWD" ]; then PWD=`${PWDCMD-pwd}`; fi
+
+case "${progname}" in
+/* | [A-Za-z]:[\\/]* ) ;;
+*/*) ;;
+*)
+        PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
+        ;;
+esac
 
 # Export original configure arguments for use by sub-configures.
 TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
 export TOPLEVEL_CONFIGURE_ARGUMENTS
 
-moveifchange=${srcdir}/move-if-change
+# Loop over all args
 
-# Set srcdir to "." if that's what it is.
-# This is important for multilib support.
-pwd=`${PWDCMD-pwd}`
-srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
-if test "${pwd}" = "${srcpwd}" ; then
-  srcdir=.
-fi
+while :
+do
 
-topsrcdir=$srcpwd
+# Break out if there are no more args
+	case $# in
+	0)
+		break
+		;;
+	esac
 
-extra_host_args=
-# Define the trigger file to make sure configure will re-run whenever
-# the gcc version number changes.
-if test "${with_gcc_version_trigger+set}" = set ; then
-  gcc_version_trigger="$with_gcc_version_trigger"
-  gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
-else
-  # If gcc's sources are available, define the trigger file.
-  if test -f ${topsrcdir}/gcc/version.c ; then
-    gcc_version_trigger=${topsrcdir}/gcc/version.c
-    gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
-    case "$ac_configure_args" in
-      *--with-gcc-version-trigger=$gcc_version_trigger* )
-        ;;
-      * )
-        # Add to all subconfigure arguments: build, host, and target.
-        ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
-        ;;
-    esac
-  fi
-fi
+# Get the first arg, and shuffle
+	option=$1
+	shift
 
-### To add a new directory to the tree, first choose whether it is a target
-### or a host dependent tool.  Then put it into the appropriate list
-### (library or tools, host or target), doing a dependency sort.
+# Make all options have two hyphens
+	orig_option=$option	# Save original for error messages
+	case $option in
+	--*) ;;
+	-*) option=-$option ;;
+	esac
+		
+# Split out the argument for options that take them
+	case $option in
+	--*=*)
+		optarg=`echo $option | sed -e 's/^[^=]*=//'`
+		arguments="$arguments $option"
+		;;
+# These options have mandatory values.  Since we didn't find an = sign,
+# the value must be in the next argument
+	--bu* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-* | --bi* | --sb* | --li* | --da* | --sy* | --sh* | --lo* | --in* | --ol* | --ma*)
+		optarg=$1
+		shift
+		arguments="$arguments $option=$optarg"
+		;;
+	--v)
+		arguments="$arguments -v"
+		;;
+	--*)
+		arguments="$arguments $option"
+		;;
+	esac
 
-# Subdirs will be configured in the order listed in build_configdirs, 
-# configdirs, or target_configdirs; see the serialization section below.
+# Now, process the options
+	case $option in
 
-# Dependency sorting is only needed when *configuration* must be done in 
-# a particular order.  In all cases a dependency should be specified in 
-# the Makefile, whether or not it's implicitly specified here.
+	--bi*)
+		bindir=$optarg
+		diroptions="$diroptions --bindir=$optarg"
+		;;
+	--build* | --bu*)
+		case "$build_alias" in
+		"") build_alias=$optarg ;;
+		*) echo '***' Can only configure for one build machine at a time.  1>&2
+		   fatal=yes
+		   ;;
+		esac
+		;;
+	--cache*)
+		cache_file=$optarg
+		;;
+	--da*)
+		datadir=$optarg
+		diroptions="$diroptions --datadir=$optarg"
+		;;
+	--disable-*)
+		enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
+		eval $enableopt=no
+		disableoptions="$disableoptions $option"
+		;;
+	--enable-*)
+		case "$option" in
+		*=*)	;;
+		*)	optarg=yes ;;
+		esac
 
-# Double entries in build_configdirs, configdirs, or target_configdirs may
-# cause circular dependencies and break everything horribly.
+		enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
+		eval "$enableopt=\$optarg"
+		enableoptions="$enableoptions '$option'"
+		;;
+	--exec-prefix* | --ex*)
+		exec_prefix=$optarg
+		exec_prefixoption="--exec-prefix=$optarg"
+		;;
+	--gas | --g*)
+		gas=yes
+		;;
+	--help | --he*)
+		fatal=yes
+		;;
+	--host* | --ho*)
+		case $host_alias in
+		NOHOST) host_alias=$optarg ;;
+		*) echo '***' Can only configure for one host at a time.  1>&2
+		   fatal=yes
+		   ;;
+		esac
+		;;
+	--inc*)
+		includedir=$optarg
+		diroptions="$diroptions --includedir=$optarg"
+		;;
+	--inf*)
+		infodir=$optarg
+		diroptions="$diroptions --infodir=$optarg"
+		;;
+	--libd*)
+		libdir=$optarg
+		diroptions="$diroptions --libdir=$optarg"
+		;;
+	--libe*)
+		libexecdir=$optarg
+		diroptions="$diroptions --libexecdir=$optarg"
+		;;
+	--lo*)
+		localstatedir=$optarg
+		diroptions="$diroptions --localstatedir=$optarg"
+		;;
+	--ma*)
+		mandir=$optarg
+		diroptions="$diroptions --mandir=$optarg"
+		;;
+	--nfp | --nf*)
+		floating_point=no
+		floating_pointoption="--nfp"
+		;;
+	--norecursion | --no*)
+		norecursion=yes
+		;;
+	--ol*)
+		oldincludedir=$optarg
+		diroptions="$diroptions --oldincludedir=$optarg"
+		;;
+	--prefix* | --pre*)
+		prefix=$optarg
+		prefixoption="--prefix=$optarg"
+		;;
+	--program-prefix* | --program-p*)
+		program_prefix=$optarg
+		program_prefixoption="--program-prefix=$optarg"
+		;;
+	--program-suffix* | --program-s*)
+		program_suffix=$optarg
+		program_suffixoption="--program-suffix=$optarg"
+		;;
+	--program-transform-name* | --program-t*)
+		# Double any backslashes or dollar signs in the argument
+		program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
+		program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
+		;;
+	--sb*)
+		sbindir=$optarg
+		diroptions="$diroptions --sbindir=$optarg"
+		;;
+	--sh*)
+		sharedstatedir=$optarg
+		diroptions="$diroptions --sharedstatedir=$optarg"
+		;;
+	--silent | --sil* | --quiet | --q*)
+		redirect=">/dev/null"
+		verbose=--silent
+		;;
+	--site* | --sit*)
+		site=$optarg
+		site_option="--site=$optarg"
+		;;
+	--srcdir*/ | --sr*/)
+                # Remove trailing slashes.  Otherwise, when the file name gets
+                # bolted into an object file as debug info, it has two slashes
+                # in it.  Ordinarily this is ok, but emacs takes double slash
+                # to mean "forget the first part".
+		srcdir=`echo $optarg | sed -e 's:/$::'`
+		;;
+	--srcdir* | --sr*)
+		srcdir=$optarg
+		;;
+	--sy*)
+		sysconfdir=$optarg
+		diroptions="$diroptions --sysconfdir=$optarg"
+		;;
+	--target* | --ta*)
+		case $target_alias in
+		NOTARGET) target_alias=$optarg ;;
+		*) echo '***' Can only configure for one target at a time.  1>&2
+		   fatal=yes
+		   ;;
+		esac
+		;;
+	--tmpdir* | --tm*)
+		TMPDIR=$optarg
+		tmpdiroption="--tmpdir=$optarg"
+		;;
+	--verbose | --v | --verb*)
+		redirect=
+		verbose=--verbose
+		;;
+	--version | --V | --vers*)
+		echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
+		exit 0
+		;;
+	--with-*)
+		case "$option" in
+		*=*)	;;
+		*)	optarg=yes ;;
+		esac
 
-# these libraries are used by various programs built for the host environment
-#
-host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk itcl tix libgui zlib"
-
-libstdcxx_version="target-libstdc++-v3"
-
-# these tools are built for the host environment
-# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
-# know that we are building the simulator.
-# binutils, gas and ld appear in that order because it makes sense to run
-# "make check" in that particular order.
-host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator gettext zip fastjar"
-
-# libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
-	target-boehm-gc \
-	target-zlib \
-	target-qthreads \
-	target-libjava"
-
-# these libraries are built for the target environment, and are built after
-# the host libraries and the host tools (which may be a cross compiler)
-#
-target_libs="target-libiberty \
-		target-libgloss \
-		target-newlib \
-		${libstdcxx_version} \
-		target-libf2c \
-		${libgcj}
-		target-libobjc"
-
-# these tools are built using the target libs, and are intended to run only
-# in the target environment
-#
-# note: any program that *uses* libraries that are in the "target_libs"
-# list belongs in this list.  those programs are also very likely
-# candidates for the "native_only" list which follows
-#
-target_tools="target-examples target-groff target-gperf target-rda"
-
-################################################################################
-
-## All tools belong in one of the four categories, and are assigned above
-## We assign ${configdirs} this way to remove all embedded newlines.  This
-## is important because configure will choke if they ever get through.
-## ${configdirs} is directories we build using the host tools.
-## ${target_configdirs} is directories we build using the target tools.
-#
-configdirs=`echo ${host_libs} ${host_tools}`
-target_configdirs=`echo ${target_libs} ${target_tools}`
-
-################################################################################
-
-srcname="gnu development package"
-
-# This gets set non-empty for some net releases of packages.
-appdirs=""
-
-# Define is_cross_compiler to save on calls to 'test'.
-is_cross_compiler=
-if test x"${host}" = x"${target}" ; then
-  is_cross_compiler=no
-else
-  is_cross_compiler=yes
-fi	
-
-# We always want to use the same name for this directory, so that dejagnu
-# can reliably find it.
-target_subdir=${target_alias}
-
-if test ! -d ${target_subdir} ; then
-  if mkdir ${target_subdir} ; then true
-  else
-    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
-    exit 1
-  fi
-fi
-
-build_prefix=build-
-build_subdir=${build_prefix}${build_alias}
-
-if test x"${build_alias}" != x"${host}" ; then
-  if test ! -d ${build_subdir} ; then
-    if mkdir ${build_subdir} ; then true
-    else
-      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
-      exit 1
-    fi
-  fi
-fi
-
-# Skipdirs are removed silently.
-skipdirs=
-# Noconfigdirs are removed loudly.
-noconfigdirs=""
-
-use_gnu_ld=
-# Make sure we don't let GNU ld be added if we didn't want it.
-if test x$with_gnu_ld = xno ; then
-  use_gnu_ld=no
-  noconfigdirs="$noconfigdirs ld"
-fi
-
-use_gnu_as=
-# Make sure we don't let GNU as be added if we didn't want it.
-if test x$with_gnu_as = xno ; then
-  use_gnu_as=no
-  noconfigdirs="$noconfigdirs gas"
-fi
-
-# some tools are so dependent upon X11 that if we're not building with X, 
-# it's not even worth trying to configure, much less build, that tool.
-
-case ${with_x} in
-  yes | "") ;; # the default value for this tree is that X11 is available
-  no)
-    skipdirs="${skipdirs} tk tix itcl libgui"
-    # We won't be able to build gdbtk without X.
-    enable_gdbtk=no 
-    ;;
-  *)  echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
-esac
-
-# Some tools are only suitable for building in a "native" situation.
-# Remove these if host!=target.  
-native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
-
-# Similarly, some are only suitable for cross toolchains.
-# Remove these if host=target.
-cross_only="target-libgloss target-newlib target-opcodes"
-
-case $is_cross_compiler in
-  no) skipdirs="${skipdirs} ${cross_only}" ;;
-  yes) skipdirs="${skipdirs} ${native_only}" ;;
-esac
-
-# If both --with-headers and --with-libs are specified, default to
-# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
-  if test x"${with_newlib}" = x ; then
-    with_newlib=no
-  fi
-fi
-
-# Recognize --with-newlib/--without-newlib.
-case ${with_newlib} in
-  no) skipdirs="${skipdirs} target-newlib" ;;
-  yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
-esac
-
-# Configure extra directories which are host specific
-
-case "${host}" in
-  *-cygwin*)
-    configdirs="$configdirs libtermcap" ;;
-esac
-
-# Remove more programs from consideration, based on the host or 
-# target this usually means that a port of the program doesn't
-# exist yet.
-
-case "${host}" in
-  hppa*64*-*-*)
-    noconfigdirs="$noconfigdirs byacc"
-    ;;
-  i[3456]86-*-vsta)
-    noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
-    ;;
-  i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
-    noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
-	;;
-  i[3456]86-*-mingw32*)
-    # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
-     noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
-	;;
-  i[3456]86-*-beos*)
-     noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
-     ;;
-  *-*-cygwin*)
-     noconfigdirs="autoconf automake send-pr rcs guile perl"
-    ;;
-  *-*-netbsd*)
-    noconfigdirs="rcs"
-    ;;
-  ppc*-*-pe)
-     noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
-    ;;
-  powerpc-*-beos*)
-    noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
-    ;;
-  *-*-darwin*)
-    noconfigdirs="$noconfigdirs tk itcl tix libgui"
-    ;;
-esac
-
-# Save it here so that, even in case of --enable-libgcj, if the Java
-# front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
-case $enable_libgcj in
-yes)
-  # If we reset it here, it won't get added to noconfigdirs in the
-  # target-specific build rules, so it will be forcibly enabled
-  # (unless the Java language itself isn't enabled).
-  libgcj=
-  ;;
-no)
-  # Make sure we get it printed in the list of not supported target libs.
-  noconfigdirs="$noconfigdirs ${libgcj}"
-  ;;
-esac
-
-case "${target}" in
-  *-*-chorusos)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    ;;
-  *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    ;;
-  *-*-netbsd*)
-    # Skip some stuff on all NetBSD configurations.
-    noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
-
-    # Skip some stuff that's unsupported on some NetBSD configurations.
-    case "${target}" in
-      i*86-*-netbsdelf*) ;;
-      *)
-	noconfigdirs="$noconfigdirs ${libgcj}"
-	;;
-    esac
-    ;;
-  *-*-netware)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
-    ;;
-  *-*-rtems*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    case ${target} in
-	h8300*-*-* | h8500-*-*)
-	  noconfigdirs="$noconfigdirs target-libf2c"
-          ;;
-        *) ;;
-    esac
-    ;;
-  *-*-vxworks*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    ;;
-  alpha*-dec-osf*)
-    # ld works, but does not support shared libraries.
-    # newlib is not 64 bit ready.  I'm not sure about fileutils.
-    # gas doesn't generate exception information.
-    noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
-    ;;
-  alpha*-*-*vms*)
-    noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
-    ;;
-  alpha*-*-linux*)
-    # newlib is not 64 bit ready
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    ;;
-  alpha*-*-freebsd*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    ;;
-  alpha*-*-*)
-    # newlib is not 64 bit ready
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    ;;
-  sh-*-linux*)
-    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
-    ;;    
-  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    noconfigdirs="$noconfigdirs target-examples"
-    noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
-    noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
-    noconfigdirs="$noconfigdirs expect dejagnu"
-    # the C++ libraries don't build on top of CE's C libraries
-    noconfigdirs="$noconfigdirs ${libstdcxx_version}"
-    noconfigdirs="$noconfigdirs target-newlib"
-    case "${host}" in
-      *-*-cygwin*) ;; # keep gdb and readline
-      *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
-	 ;;
-    esac
-    ;;
-  arc-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  arm-*-coff | strongarm-*-coff | xscale-*-coff)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
-    noconfigdirs="$noconfigdirs target-libffi target-qthreads"
-    ;;
-  arm-*-pe*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  arm-*-oabi*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  thumb-*-coff)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  thumb-*-elf)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  thumb-*-oabi)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  thumb-*-pe)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  arm-*-riscix*)
-    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
-    ;;
-  avr-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
-    ;;
-  c4x-*-* | tic4x-*-*)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
-    ;;
-  c54x*-*-* | tic54x-*-*)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
-    ;;
-  cris-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  d10v-*-*)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
-    ;;
-  d30v-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  fr30-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  frv-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  h8300*-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss"
-    ;;
-  h8500-*-*)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
-    ;;
-  hppa*64*-*-linux* | parisc*64*-*-linux*)
-    # In this case, it's because the hppa64-linux target is for
-    # the kernel only at this point and has no libc, and thus no
-    # headers, crt*.o, etc., all of which are needed by these.
-    noconfigdirs="$noconfigdirs target-zlib"
-    ;;
-  hppa*-*-*elf* | \
-  parisc*-*-linux* | hppa*-*-linux* | \
-  hppa*-*-lites* | \
-  hppa*-*-openbsd* | \
-  hppa*64*-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    # Do configure ld/binutils/gas for this case.
-    ;;
-  hppa*-*-*)
-    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
-    # build on HP-UX 10.20.
-    noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
-    ;;
-  ia64*-*-elf*)
-    # No gdb support yet.
-    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
-    ;;
-  ia64*-**-hpux*)
-    # No gdb or ld support yet.
-    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
-    ;;
-  i[3456]86-*-coff | i[3456]86-*-elf)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  i[34567]86-*-freebsd*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    ;;
-  i[3456]86-*-linux*)
-    # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
-    # not build java stuff by default.
-    case "${target}" in
-      *-*-*libc1*)
-	noconfigdirs="$noconfigdirs ${libgcj}";;
-    esac
-
-    # This section makes it possible to build newlib natively on linux.
-    # If we are using a cross compiler then don't configure newlib.
-    if test x${is_cross_compiler} != xno ; then
-         noconfigdirs="$noconfigdirs target-newlib"
-    fi
-    noconfigdirs="$noconfigdirs target-libgloss"
-    # If we are not using a cross compiler, do configure newlib.
-    # Note however, that newlib will only be configured in this situation
-    # if the --with-newlib option has been given, because otherwise
-    # 'target-newlib' will appear in skipdirs.
-    ;;
-  i[3456]86-*-mingw32*)
-    target_configdirs="$target_configdirs target-mingw"
-    noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
-
-    # Can't build gdb for mingw32 if not native.
-    case "${host}" in
-      i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
-      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
-         ;;
-    esac
-    ;;    
-  *-*-cygwin*)
-    target_configdirs="$target_configdirs target-libtermcap target-winsup"
-    noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
-    # always build newlib.
-    skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
-
-    # Can't build gdb for Cygwin if not native.
-    case "${host}" in
-      *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
-      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
-         ;;
-    esac
-    ;;    
-  i[3456]86-*-pe)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
-    ;;
-  i[3456]86-*-sco3.2v5*)
-    # The linker does not yet know about weak symbols in COFF,
-    # and is not configured to handle mixed ELF and COFF.
-    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
-    ;;
-  i[3456]86-*-sco*)
-    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
-    ;;
-  i[3456]86-*-solaris2*)
-    noconfigdirs="$noconfigdirs target-libgloss"
-    ;;
-  i[3456]86-*-sysv4*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  i[3456]86-*-beos*)
-     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
-     ;;
-  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
-    ;;
-  m68k-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  m68k-*-coff*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  mcore-*-pe*)
-  # The EPOC C++ environment does not support exceptions or rtti,
-  # and so building libstdc++-v3 tends not to always work.
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  mmix-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
-    ;;
-  mn10200-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  mn10300-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  powerpc-*-aix*)
-    # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
-    ;;
-  powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
-    target_configdirs="$target_configdirs target-winsup"
-    noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv ${libgcj}"
-    # always build newlib.
-    skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
-    ;;
-    # This is temporary until we can link against shared libraries
-  powerpcle-*-solaris*)
-    noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv ${libgcj}"
-    ;;
-  powerpc-*-beos*)
-    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
-    ;;
-  powerpc-*-darwin*)
-    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}"
-    ;;
-  powerpc-*-eabi)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  powerpc64*-*-linux*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    # not yet ported.
-    noconfigdirs="$noconfigdirs target-libffi"
-    ;;
-  rs6000-*-lynxos*)
-    noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
-    ;;
-  rs6000-*-aix*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"
-    ;;
-  rs6000-*-*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"
-    ;;
-  m68k-apollo-*)
-    noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
-    ;;
-  mips*-*-irix5*)
-    # The GNU linker does not support shared libraries.
-    noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
-    ;;
-  mips*-*-irix6*)
-    # The GNU assembler does not support IRIX 6.
-    # Linking libjava exceeds command-line length limits on at least
-    # IRIX 6.2, but not on IRIX 6.5.
-    # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
-    # <oldham@codesourcery.com>
-    noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}"
-    ;;
-  mips*-dec-bsd*)
-    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
-    ;;
-  mips*-*-bsd*)
-    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
-    ;;
-  mipstx39-*-*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"   # same as generic mips
-   ;;
-  mips*-*-linux*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    ;;
-  mips*-*-*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"
-    ;;
-  romp-*-*)
-    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
-    ;;
-  sh-*-*)
-    case "${host}" in
-      i[3456]86-*-vsta) ;; # don't add gprof back in
-      i[3456]86-*-go32*) ;; # don't add gprof back in
-      i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
-      *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
-    esac
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  sh64-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  sparc-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sparc64-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sparclite-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sparc-*-sunos4*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-           noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
-    else
-           use_gnu_ld=no
-    fi
-    ;;
-  sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
-    ;;
-  v810-*-*)
-    noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss ${libgcj}"
-    ;;
-  v850-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  v850e-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  v850ea-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    ;;
-  vax-*-vms)
-    noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
-    ;;
-  vax-*-*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    ;;
-  ip2k-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
-    ;;
-  *-*-linux*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    ;;
-  *-*-lynxos*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    ;; 
-  *-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-esac
-
-# If we aren't building newlib, then don't build libgloss, since libgloss
-# depends upon some newlib header files.
-case "${noconfigdirs}" in
-  *target-libgloss*) ;;
-  *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
-esac
-
-# Figure out what language subdirectories are present.
-# Look if the user specified --enable-languages="..."; if not, use
-# the environment variable $LANGUAGES if defined. $LANGUAGES might
-# go away some day.
-# NB:  embedded tabs in this IF block -- do not untabify
-if test x"${enable_languages+set}" != xset; then
-	if test x"${LANGUAGES+set}" = xset; then
-		enable_languages="${LANGUAGES}"
-		echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
-	else
-		enable_languages=all
-	fi
-else
-	if test x"${enable_languages}" = x ||
-	   test x"${enable_languages}" = xyes;
-	then
-		echo configure.in: --enable-languages needs at least one language argument 1>&2
+		withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
+		eval $withopt="\$optarg"
+		withoptions="$withoptions $option"
+		;;
+	--without-*)
+		withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
+		eval $withopt=no
+		withoutoptions="$withoutoptions $option"
+		;;
+	--x)	with_x=yes
+		withoptions="$withoptions --with-x"
+		;;
+	--x-i* | --x-l*) other_options="$other_options $orig_option"
+		;;
+	--*)
+		echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
 		exit 1
-	fi
-fi
-enable_languages=`echo "${enable_languages}" | sed -e 's/[ 	,][ 	,]*/,/g' -e 's/,$//'`
-
-# First scan to see if an enabled language requires some other language.
-# We assume that a given config-lang.in will list all the language
-# front ends it requires, even if some are required indirectly.
-for lang in ${srcdir}/gcc/*/config-lang.in ..
-do
-   case $lang in
-    ..)
-       ;;
-    # The odd quoting in the next line works around
-    # an apparent bug in bash 1.12 on linux.
-    ${srcdir}/gcc/[*]/config-lang.in)
-       ;;
-    *)
-       lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ 	]*\).*$,\1,p' $lang`
-       this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ 	]*\).*$,\1,p' $lang`
-       for other in $this_lang_requires
-       do
-	  case ,${enable_languages}, in
-	   *,$other,*)
-	      ;;
-	   *,all,*)
-	      ;;
-	   *,$lang_alias,*)
-	      echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
-	      enable_languages="$enable_languages,$other"
-	      ;;
-	  esac
-       done
-       ;;
-   esac
-done
-
-subdirs=
-for lang in ${srcdir}/gcc/*/config-lang.in ..
-do
-	case $lang in
-	..) ;;
-	# The odd quoting in the next line works around
-	# an apparent bug in bash 1.12 on linux.
-	${srcdir}/gcc/[*]/config-lang.in) ;;
+		;;
 	*)
-	  lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ 	]*\).*$,\1,p' $lang`
-	  this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ 	]*\).*$,\1,p' $lang`
-	  this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ 	]*\).*$,\1,p' $lang`
-	  build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ 	]*\).*$,\1,p' $lang`
-	  if test "x$lang_alias" = x
-	  then
-		echo "$lang doesn't set \$language." 1>&2
-		exit 1
-	  fi
-	  case ${build_by_default},${enable_languages}, in
-	  *,$lang_alias,*) add_this_lang=yes ;;
-	  no,*) add_this_lang=no ;;
-	  *,all,*) add_this_lang=yes ;;
-	  *) add_this_lang=no ;;
-	  esac
-	  if test x"${add_this_lang}" = xyes; then
-	      eval target_libs='"$target_libs "'\"$this_lang_libs\"
-	  else
-	      eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
-	  fi
-	  ;;
+		case $undefs in
+		NOUNDEFS) undefs=$option ;;
+		*) echo '***' Can only configure for one host and one target at a time.  1>&2
+		   fatal=yes
+		   ;;
+		esac
+		;;
 	esac
 done
 
-# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
-# $target_configdirs.
-# If we have the source for $noconfigdirs entries, add them to $notsupp.
+# process host and target
 
-notsupp=""
-for dir in . $skipdirs $noconfigdirs ; do
-  dirname=`echo $dir | sed -e s/target-//g`
-  if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
-    configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
-    if test -r $srcdir/$dirname/configure ; then
-      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
-	true
-      else
-	notsupp="$notsupp $dir"
-      fi
-    fi
-  fi
-  if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
-    target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
-    if test -r $srcdir/$dirname/configure ; then
-      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
-	true
-      else
-	notsupp="$notsupp $dir"
-      fi
-    fi
-  fi
-done
-
-# Sometimes the tools are distributed with libiberty but with no other
-# libraries.  In that case, we don't want to build target-libiberty.
-if test -n "${target_configdirs}" ; then
-  others=
-  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
-    if test "$i" != "libiberty" ; then
-      if test -r $srcdir/$i/configure ; then
-	others=yes;
-	break;
-      fi
-    fi
-  done
-  if test -z "${others}" ; then
-    target_configdirs=
-  fi
-fi
-
-# Quietly strip out all directories which aren't configurable in this tree.
-# This relies on all configurable subdirectories being autoconfiscated, which
-# is now the case.
-configdirs_all="$configdirs"
-configdirs=
-for i in ${configdirs_all} ; do
-  if test -f ${srcdir}/$i/configure ; then
-    configdirs="${configdirs} $i"
-  fi
-done
-target_configdirs_all="$target_configdirs"
-target_configdirs=
-for i in ${target_configdirs_all} ; do
-  j=`echo $i | sed -e s/target-//g` 
-  if test -f ${srcdir}/$j/configure ; then
-    target_configdirs="${target_configdirs} $i"
-  fi
-done
-
-# Produce a warning message for the subdirs we can't configure.
-# This isn't especially interesting in the Cygnus tree, but in the individual
-# FSF releases, it's important to let people know when their machine isn't
-# supported by the one or two programs in a package.
-
-if test -n "${notsupp}" && test -z "${norecursion}" ; then
-  # If $appdirs is non-empty, at least one of those directories must still
-  # be configured, or we error out.  (E.g., if the gas release supports a
-  # specified target in some subdirs but not the gas subdir, we shouldn't
-  # pretend that all is well.)
-  if test -n "$appdirs" ; then
-    for dir in $appdirs ; do
-      if test -r $dir/Makefile.in ; then
-	if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
-	  appdirs=""
-	  break
-	fi
-	if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
-	  appdirs=""
-	  break
-	fi
-      fi
-    done
-    if test -n "$appdirs" ; then
-      echo "*** This configuration is not supported by this package." 1>&2
-      exit 1
-    fi
-  fi
-  # Okay, some application will build, or we don't care to check.  Still
-  # notify of subdirs not getting built.
-  echo "*** This configuration is not supported in the following subdirectories:" 1>&2
-  echo "    ${notsupp}" 1>&2
-  echo "    (Any other directories should still work fine.)" 1>&2
-fi
-
-case "$host" in
-  *msdosdjgpp*)
-    enable_gdbtk=no ;;
-esac
-
-copy_dirs=
-
-# Handle --with-headers=XXX.  If the value is not "yes", the contents of
-# the named directory are copied to $(tooldir)/sys-include.
-if test x"${with_headers}" != x ; then
-  if test x${is_cross_compiler} = xno ; then
-    echo 1>&2 '***' --with-headers is only supported when cross compiling
-    exit 1
-  fi
-  if test x"${with_headers}" != xyes ; then
-    case "${exec_prefixoption}" in
-    "") x=${prefix} ;;
-    *) x=${exec_prefix} ;;
-    esac
-    copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
-  fi
-fi
-
-# Handle --with-libs=XXX.  If the value is not "yes", the contents of
-# the name directories are copied to $(tooldir)/lib.  Multiple directories
-# are permitted.
-if test x"${with_libs}" != x ; then
-  if test x${is_cross_compiler} = xno ; then
-    echo 1>&2 '***' --with-libs is only supported when cross compiling
-    exit 1
-  fi
-  if test x"${with_libs}" != xyes ; then
-    # Copy the libraries in reverse order, so that files in the first named
-    # library override files in subsequent libraries.
-    case "${exec_prefixoption}" in
-    "") x=${prefix} ;;
-    *) x=${exec_prefix} ;;
-    esac
-    for l in ${with_libs}; do
-      copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
-    done
-  fi
-fi
-
-# Handle ${copy_dirs}
-set fnord ${copy_dirs}
-shift
-while test $# != 0 ; do
-  if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
-    :
-  else
-    echo Copying $1 to $2
-
-    # Use the install script to create the directory and all required
-    # parent directories.
-    if test -d $2 ; then
-      :
-    else
-      echo >config.temp
-      ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
-    fi
-
-    # Copy the directory, assuming we have tar.
-    # FIXME: Should we use B in the second tar?  Not all systems support it.
-    (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
-
-    # It is the responsibility of the user to correctly adjust all
-    # symlinks.  If somebody can figure out how to handle them correctly
-    # here, feel free to add the code.
-
-    echo $1 > $2/COPIED
-  fi
-  shift; shift
-done
-
-# Work in distributions that contain no compiler tools, like Autoconf.
-tentative_cc=""
-host_makefile_frag=/dev/null
-if test -d ${srcdir}/config ; then
-case "${host}" in
-  m68k-hp-hpux*)
-    # Avoid "too much defining" errors from HPUX compiler.
-    tentative_cc="cc -Wp,-H256000"
-    # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
-    # If it's HP/UX ar, this should be harmless.
-    RANLIB="ar ts"
-    ;;
-  m68k-apollo-sysv*)
-    tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
-    ;;
-  m68k-apollo-bsd*)
-    #None of the Apollo compilers can compile gas or binutils.  The preprocessor
-    # chokes on bfd, the compiler won't let you assign integers to enums, and
-    # other problems.  Defining CC to gcc is a questionable way to say "don't use
-    # the apollo compiler" (the preferred version of GCC could be called cc,
-    # or whatever), but I'm not sure leaving CC as cc is any better...
-    #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
-    # Used to have BISON=yacc.
-    tentative_cc=gcc
-    ;;
-  m88k-dg-dgux*)
-    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
-    host_makefile_frag="config/mh-dgux"
-    ;;
-  m88k-harris-cxux*)
-    # Under CX/UX, we want to tell the compiler to use ANSI mode.
-    tentative_cc="cc -Xa"
-    host_makefile_frag="config/mh-cxux"
-    ;;
-  m88k-motorola-sysv*)
-    ;;
-  mips*-dec-ultrix*)
-    tentative_cc="cc -Wf,-XNg1000"
-    host_makefile_frag="config/mh-decstation"
-    ;;
-  mips*-nec-sysv4*)
-    # The C compiler on NEC MIPS SVR4 needs bigger tables.
-    tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
-    host_makefile_frag="config/mh-necv4"
-    ;;
-  mips*-sgi-irix4*)
-    # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
-    # environment.  Also bump switch table size so that cp-parse will
-    # compile.  Bump string length limit so linker builds.
-    tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
-    ;;
-  mips*-*-sysv4*)
-    host_makefile_frag="config/mh-sysv4"
-    ;;
-  mips*-*-sysv*)
-    # This is for a MIPS running RISC/os 4.52C.
-
-    # This is needed for GDB, but needs to be in the top-level make because
-    # if a library is compiled with the bsd headers and gets linked with the
-    # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
-    # a different size).
-    # ptrace(2) apparently has problems in the BSD environment.  No workaround is
-    # known except to select the sysv environment.  Could we use /proc instead?
-    # These "sysv environments" and "bsd environments" often end up being a pain.
-    #
-    # This is not part of CFLAGS because perhaps not all C compilers have this
-    # option.
-    tentative_cc="cc -systype sysv"
-    ;;
-  i370-ibm-opened*)
-    tentative_cc="c89"
-    ;;
-  i[3456]86-*-sysv5*)
-    host_makefile_frag="config/mh-sysv5"
-    ;;
-  i[3456]86-*-dgux*)
-    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
-    host_makefile_frag="config/mh-dgux386"
-    ;;
-  i[3456]86-ncr-sysv4.3*)
-    # The MetaWare compiler will generate a copyright message unless you
-    # turn it off by adding the -Hnocopyr flag.
-    tentative_cc="cc -Hnocopyr"
-    ;;
-  i[3456]86-ncr-sysv4*)
-    # for an NCR 3000 (i486/SVR4) system.
-    # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
-    # This compiler not only emits obnoxious copyright messages every time
-    # you run it, but it chokes and dies on a whole bunch of GNU source
-    # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
-    tentative_cc="/usr/ccs/ATT/cc"
-    host_makefile_frag="config/mh-ncr3000"
-    ;;
-  i[3456]86-*-sco3.2v5*)
-    ;;
-  i[3456]86-*-sco*)
-    # The native C compiler botches some simple uses of const.  Unfortunately,
-    # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
-    tentative_cc="cc -Dconst="
-    host_makefile_frag="config/mh-sco"
-    ;;
-  i[3456]86-*-udk*)
-    host_makefile_frag="config/mh-sysv5"
-    ;;
-  i[3456]86-*-solaris2*)
-    host_makefile_frag="config/mh-sysv4"
-    ;;
-  i[3456]86-*-msdosdjgpp*)
-    host_makefile_frag="config/mh-djgpp"
-    ;;
-  *-cygwin*)
-    host_makefile_frag="config/mh-cygwin"
-    ;;
-  *-mingw32*)
-    host_makefile_frag="config/mh-mingw32"
-    ;;
-  *-interix*)
-    host_makefile_frag="config/mh-interix"
-    ;;
-  vax-*-ultrix2*)
-    # The old BSD pcc isn't up to compiling parts of gdb so use gcc
-    tentative_cc=gcc
-    ;;
-  *-*-solaris2*)
-    host_makefile_frag="config/mh-solaris"
-    ;;
-  m68k-sun-sunos*)
-    # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
-    # without overflowing the jump tables (-J says to use a 32 bit table)
-    tentative_cc="cc -J"
-    ;;
-  *-hp-hpux*)
-    tentative_cc="cc -Wp,-H256000"
-    ;;
-  *-*-hiux*)
-    tentative_cc="cc -Wp,-H256000"
-    ;;
-  rs6000-*-lynxos*)
-    # /bin/cc is less than useful for our purposes.  Always use GCC
-    tentative_cc="/usr/cygnus/progressive/bin/gcc"
-    host_makefile_frag="config/mh-lynxrs6k"
-    ;;
-  *-*-lynxos*)
-    # /bin/cc is less than useful for our purposes.  Always use GCC
-    tentative_cc="/bin/gcc"
-    ;;
-  *-*-sysv4*)
-    host_makefile_frag="config/mh-sysv4"
-    ;;
-esac
-fi
-
-extra_arflags_for_target=
-extra_nmflags_for_target=
-extra_ranlibflags_for_target=
-target_makefile_frag=/dev/null
-case "${target}" in
-  i[3456]86-*-netware*)
-    target_makefile_frag="config/mt-netware"
-    ;;
-  powerpc-*-netware*)
-    target_makefile_frag="config/mt-netware"
-    ;;
-  *-*-linux*)
-    target_makefile_frag="config/mt-linux"
-    ;;
-  *-*-aix4.[3456789]* | *-*-aix[56789].*)
-    # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 
-    # commands to handle both 32-bit and 64-bit objects.  These flags are
-    # harmless if we're using GNU nm or ar.
-    extra_arflags_for_target=" -X32_64"
-    extra_nmflags_for_target=" -B -X32_64"
-    ;;
-  *-*-darwin*)
-    # ranlib from Darwin requires the -c flag to look at common symbols.
-    extra_ranlibflags_for_target=" -c"
-    ;;
-  mips*-*-pe | sh*-*-pe | *arm-wince-pe)
-    target_makefile_frag="config/mt-wince"
-    ;;
-esac
-
-alphaieee_frag=/dev/null
-case $target in
-  alpha*-*-*)
-    # This just makes sure to use the -mieee option to build target libs.
-    # This should probably be set individually by each library.
-    alphaieee_frag="config/mt-alphaieee"
-    ;;
-esac
-
-# If --enable-target-optspace always use -Os instead of -O2 to build
-# the target libraries, similarly if it is not specified, use -Os
-# on selected platforms.
-ospace_frag=/dev/null
-case "${enable_target_optspace}:${target}" in
-  yes:*)
-    ospace_frag="config/mt-ospace"
-    ;;
-  :d30v-*)
-    ospace_frag="config/mt-d30v"
-    ;;
-  :m32r-* | :d10v-* | :fr30-*)
-    ospace_frag="config/mt-ospace"
-    ;;
-  no:* | :*)
-    ;;
-  *)
-    echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
-    ;;
-esac
-
-# Set with_gnu_as and with_gnu_ld as appropriate.
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET UNDEFS
 #
-# This is done by determining whether or not the appropriate directory
-# is available, and by checking whether or not specific configurations
-# have requested that this magic not happen.
-# 
-# The command line options always override the explicit settings in 
-# configure.in, and the settings in configure.in override this magic.
-#
-# If the default for a toolchain is to use GNU as and ld, and you don't 
-# want to do that, then you should use the --without-gnu-as and
-# --without-gnu-ld options for the configure script.
+# The rules are:
+# 1. You aren't allowed to specify --host, --target, and undefs at the
+#    same time.
+# 2. Host defaults to undefs.
+# 3. If undefs is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target defaults to undefs.
+# 5. If undefs is not specified, then target defaults to host.
 
-if test x${use_gnu_as} = x &&
-   echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
-  with_gnu_as=yes
-  extra_host_args="$extra_host_args --with-gnu-as"
-fi
+case "${fatal}" in
+"")
+	# Make sure that host, target & undefs aren't all specified at the
+	# same time.
+	case $host_alias---$target_alias---$undefs in
+	NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
+		;;
+	*) echo '***' Can only configure for one host and one target at a time.  1>&2
+	   fatal=yes
+	   break 2
+		;;
+	esac
 
-if test x${use_gnu_ld} = x &&
-   echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
-  with_gnu_ld=yes
-  extra_host_args="$extra_host_args --with-gnu-ld"
-fi
+	# Now, do defaulting for host.
+	case $host_alias in
+	NOHOST)
+		case $undefs in
+		NOUNDEFS)
+			# Neither --host option nor undefs were present.
+			# Call config.guess.
+			guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
+			if host_alias=`${config_shell} ${guesssys}`
+			then
+				# If the string we are going to use for
+				# the target is a prefix of the string
+				# we just guessed for the host, then
+				# assume we are running native, and force
+				# the same string for both target and host.
+				case $target_alias in
+				NOTARGET) ;;
+				*)
+					if expr $host_alias : $target_alias >/dev/null
+					then
+						host_alias=$target_alias
+					fi
+					;;
+				esac
+				echo "Configuring for a ${host_alias} host."
+				arguments="--host=$host_alias $arguments"
+			else
+				echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
+				fatal=yes
+			fi
+			;;
+		*)
+			host_alias=$undefs
+			arguments="--host=$host_alias $arguments"
+			undefs=NOUNDEFS
+			;;
+		esac
+	esac
 
-# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
-# can detect this case.
-
-if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
-  with_newlib=yes
-  extra_host_args="$extra_host_args --with-newlib"
-fi
-
-# We default to --with-shared on platforms where -fpic is meaningless.
-# Well, we don't yet, but we will.
-if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
-  case "${target}" in
-    alpha*-dec-osf*)	enable_shared=yes ;;
-    alpha*-*-linux*)	enable_shared=yes ;;
-    mips-sgi-irix5*)	enable_shared=yes ;;
-    *)			enable_shared=no ;;
-  esac
-fi
-
-case "${enable_shared}" in
-  yes) shared=yes ;;
-  no) shared=no ;;
-  "") shared=no ;;
-  *) shared=yes ;;
+	# Do defaulting for target.  If --target option isn't present, default
+	# to undefs.  If undefs isn't present, default to host.
+	case $target_alias in
+	NOTARGET)
+		case $undefs in
+		NOUNDEFS)
+			target_alias=$host_alias
+			;;
+		*)
+			target_alias=$undefs
+			arguments="--target=$target_alias $arguments"
+			;;
+		esac
+	esac
+	;;
+*) ;;
 esac
 
+if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
+	exec 1>&2
+	echo Usage: configure [OPTIONS] [HOST]
+	echo
+	echo Options: [defaults in brackets]
+	echo ' --prefix=MYDIR		 install into MYDIR [/usr/local]'
+	echo ' --exec-prefix=MYDIR	 install host-dependent files into MYDIR [/usr/local]'
+	echo ' --help			 print this message [normal config]'
+	echo ' --build=BUILD		 configure for building on BUILD [BUILD=HOST]'
+	echo ' --host=HOST		 configure for HOST [determined via config.guess]'
+	echo ' --norecursion		 configure this directory only [recurse]'
+	echo ' --program-prefix=FOO	 prepend FOO to installed program names [""]'
+	echo ' --program-suffix=FOO	 append FOO to installed program names [""]'
+	echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
+	echo ' --site=SITE		 configure with site-specific makefile for SITE'
+	echo ' --srcdir=DIR		 find the sources in DIR [. or ..]'
+	echo ' --target=TARGET	 configure for TARGET [TARGET=HOST]'
+	echo ' --tmpdir=TMPDIR	 create temporary files in TMPDIR [/tmp]'
+	echo ' --nfp			 configure for software floating point [hard float]'
+	echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
+	echo ' --without-FOO		 package FOO is NOT available'
+	echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
+	echo ' --disable-FOO		 do not include feature FOO'
+	echo
+	echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
+	echo
+	if [ -r config.status ] ; then
+		cat config.status
+	fi
 
-# Default to using --with-stabs for certain targets.
-if test x${with_stabs} = x ; then
-  case "${target}" in
-  mips*-*-irix6*o32)
-    with_stabs=yes;
-    extra_host_args="${extra_host_args} --with-stabs"
-    ;;
-  mips*-*-irix6*)
-    ;;
-  mips*-*-* | alpha*-*-osf*)
-    with_stabs=yes;
-    extra_host_args="${extra_host_args} --with-stabs"
-    ;;
-  esac
+	exit 1
 fi
 
-# hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
-# them automatically.
-case "${host}" in
-  hppa*64*-*-hpux11*)	
-    extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
-    ;;
+configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
+moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
+## the sed command below emulates the dirname command
+topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}`
+
+
+# this is a hack.  sun4 must always be a valid host alias or this will fail.
+if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
+        true
+else
+        echo '***' cannot find config.sub.  1>&2
+        exit 1
+fi
+
+touch config.junk
+if ${config_shell} ${moveifchange} config.junk config.trash ; then
+        true
+else
+        echo '***' cannot find move-if-change.  1>&2
+        exit 1
+fi
+rm -f config.junk config.trash
+
+case "${srcdir}" in
+"")
+        if [ -r configure.in ] ; then
+                srcdir=.
+        else
+                if [ -r ${progname}.in ] ; then
+                        srcdir=`echo ${progname} | sed 's:/configure$::'`
+                else
+                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
+                        exit 1
+                fi
+        fi
+        ;;
+*)
+	# Set srcdir to "." if that's what it is.
+	# This is important for multilib support.
+	if [ ! -d ${srcdir} ] ; then
+		echo "Invalid source directory ${srcdir}" >&2
+		exit 1
+	fi
+	pwd=`${PWDCMD-pwd}`
+	srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
+	if [ "${pwd}" = "${srcpwd}" ] ; then
+		srcdir=.
+	fi
 esac
 
-# If we aren't going to be using gcc, see if we can extract a definition
-# of CC from the fragment.
-# Actually, use the 'pre-extracted' version above.
-if test -z "${CC}" && test "${build}" = "${host}" ; then
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-  found=
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/gcc; then
-      found=yes
-      break
-    fi
-  done
-  IFS="$save_ifs"
-  if test -z "${found}" && test -n "${tentative_cc}" ; then
-    CC=$tentative_cc
-  fi
+### warn about some conflicting configurations.
+
+case "${srcdir}" in
+".") ;;
+*)
+        if [ -f ${srcdir}/config.status ] ; then
+                echo '***' Cannot configure here in \"${PWD=`${PWDCMD-pwd}`}\" when \"${srcdir}\" is currently configured. 1>&2
+                exit 1
+        fi
+esac
+
+# default exec_prefix
+case "${exec_prefixoption}" in
+"") exec_prefix="\$(prefix)" ;;
+*) ;;
+esac
+
+### break up ${srcdir}/configure.in.
+case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
+"")
+        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
+	# Check for a directory that's been converted to use autoconf since
+	# it was last configured.
+	if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
+	  echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
+	  if [ -r ${srcdir}/configure ] ; then
+	    echo '***' Running the local configure script. 1>&2
+	    case "${cache_file}" in
+	    "") cache_file_option= ;;
+	    *)  cache_file_option="--cache-file=${cache_file}" ;;
+	    esac
+	    srcdiroption="--srcdir=${srcdir}"
+	    case "${build_alias}" in
+	    "") buildopt= ;;
+	    *)  buildopt="--build=${build_alias}" ;;
+	    esac
+	    eval exec ${config_shell} ${srcdir}/configure ${verbose} \
+		${buildopt} --host=${host_alias} --target=${target_alias} \
+		${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
+		${srcdiroption} ${diroptions} \
+		${program_prefixoption} ${program_suffixoption} \
+		${program_transform_nameoption} ${site_option} \
+		${withoptions} ${withoutoptions} \
+		${enableoptions} ${disableoptions} ${floating_pointoption} \
+		${cache_file_option} ${other_options} ${redirect}
+	  else
+	    echo '***' There is no configure script present though. 1>&2
+	  fi
+	fi
+        exit 1
+        ;;
+*) ;;
+esac
+
+case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
+"")
+        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
+        exit 1
+        ;;
+*) ;;
+esac
+
+case "${TMPDIR}" in
+"") TMPDIR=/tmp ; export TMPDIR ;;
+*) ;;
+esac
+
+# keep this filename short for &%*%$*# 14 char file names and 8+3 file names
+tmpdir=${TMPDIR}/cNf$$
+mkdir ${tmpdir} || exit 1
+tmpfile=${tmpdir}/cNf$$
+# Note that under many versions of sh a trap handler for 0 will *override* any
+# exit status you explicitly specify!  At this point, the only non-error exit
+# is at the end of the script; these actions are duplicated there, minus
+# the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
+# trap handler, or you'll lose.
+trap "rm -rf Makefile.tem ${tmpdir}; exit 1" 0 1 2 15
+
+# split ${srcdir}/configure.in into common, per-host, per-target,
+# and post-target parts.  Post-target is optional.
+sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
+sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
+if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
+  sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
+  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
+else
+  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
+  echo >${tmpfile}.pos
+fi
+
+### do common part of configure.in
+
+. ${tmpfile}.com
+
+# some sanity checks on configure.in
+case "${srctrigger}" in
+"")
+        echo '***' srctrigger not set in ${PWD=`${PWDCMD-pwd}`}/configure.in.  1>&2
+        exit 1
+        ;;
+*) ;;
+esac
+
+case "${build_alias}" in
+"")
+	if result=`${config_shell} ${configsub} ${host_alias}` ; then
+	    build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+	    build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+	    build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+	    build=${build_cpu}-${build_vendor}-${build_os}
+	    build_alias=${host_alias}
+	fi
+	;;
+*)
+	if result=`${config_shell} ${configsub} ${build_alias}` ; then
+	    buildopt="--build=${build_alias}"
+	    build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+	    build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+	    build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+	    build=${build_cpu}-${build_vendor}-${build_os}
+	else
+	    echo "Unrecognized build system name ${build_alias}." 1>&2
+	    exit 1
+	fi
+	;;
+esac
+
+if result=`${config_shell} ${configsub} ${host_alias}` ; then
+    true
+else
+    echo "Unrecognized host system name ${host_alias}." 1>&2
+    exit 1
+fi
+host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+host=${host_cpu}-${host_vendor}-${host_os}
+
+. ${tmpfile}.hst
+
+if result=`${config_shell} ${configsub} ${target_alias}` ; then
+    true
+else
+    echo "Unrecognized target system name ${target_alias}." 1>&2
+    exit 1
+fi
+target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+target=${target_cpu}-${target_vendor}-${target_os}
+
+. ${tmpfile}.tgt
+
+# Find the source files, if location was not specified.
+case "${srcdir}" in
+"")
+        srcdirdefaulted=1
+        srcdir=.
+        if [ ! -r ${srctrigger} ] ; then
+                srcdir=..
+        fi
+        ;;
+*) ;;
+esac
+
+if [ ! -r ${srcdir}/${srctrigger} ] ; then
+        case "${srcdirdefaulted}" in
+        "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/${srcdir}" 1>&2 ;;
+        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`${PWDCMD-pwd}`}/. or ${PWD=`${PWDCMD-pwd}`}/.." 1>&2 ;;
+        esac
+
+        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
+        exit 1
 fi
 
 # Some systems (e.g., one of the i386-aix systems the gas testers are
 # using) don't handle "\$" correctly, so don't use it here.
 tooldir='$(exec_prefix)'/${target_alias}
-build_tooldir=${tooldir}
+
+if [ "${host_alias}" != "${target_alias}" ] ; then
+    if [ "${program_prefixoption}" = "" ] ; then
+        if [ "${program_suffixoption}" = "" ] ; then 
+            if [ "${program_transform_nameoption}" = "" ] ; then
+                program_prefix=${target_alias}- ;
+            fi
+        fi
+    fi
+fi
+
+# Merge program_prefix and program_suffix onto program_transform_name.
+# (program_suffix used to use $, but it's hard to preserve $ through both
+# make and sh.)
+if [ "${program_suffix}" != "" ] ; then
+    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
+fi
+
+if [ "${program_prefix}" != "" ] ; then
+    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
+fi
+
+# If CC and CXX are not set in the environment, and the Makefile
+# exists, try to extract them from it.  This is to handle running
+# ./config.status by hand.
+if [ -z "${CC}" ] && [ -r Makefile ]; then
+  sed -n -e ':loop
+/\\$/ N
+s/\\\n//g
+t loop
+/^CC[ 	]*=/ s/CC[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
+  CC=`tail -1 Makefile.cc`
+  rm -f Makefile.cc
+fi
+
+if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
+  sed -n -e ':loop
+/\\$/ N
+s/\\\n//g
+t loop
+/^CFLAGS[ 	]*=/ s/CFLAGS[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
+  CFLAGS=`tail -1 Makefile.cc`
+  rm -f Makefile.cc
+fi
+
+if [ -z "${CXX}" ] && [ -r Makefile ]; then
+  sed -n -e ':loop
+/\\$/ N
+s/\\\n//g
+t loop
+/^CXX[ 	]*=/ s/CXX[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
+  CXX=`tail -1 Makefile.cc`
+  rm -f Makefile.cc
+fi
+
+if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
+  sed -n -e ':loop
+/\\$/ N
+s/\\\n//g
+t loop
+/^CXXFLAGS[ 	]*=/ s/CXXFLAGS[ 	]*=[ 	]*\(.*\)/\1/p' < Makefile > Makefile.cc
+  CXXFLAGS=`tail -1 Makefile.cc`
+  rm -f Makefile.cc
+fi
 
 # Generate a default definition for YACC.  This is used if the makefile can't
 # locate bison or byacc in objdir.
@@ -2023,10 +868,39 @@
   test -n "$DEFAULT_LEX" && break
 done
 
-if test "${build}" != "${host}" ; then
+
+if [ "${build}" != "${host}" ]; then
   # If we are doing a Canadian Cross, in which the host and build systems
   # are not the same, we set reasonable default values for the tools.
+  tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
+  tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
+  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
+  tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
+  tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
+  tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
+  tools="${tools} OBJCOPY OBJDUMP"
 
+  for var in ${tools}; do
+    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
+      sed -n -e ':loop
+/\\$/ N
+s/\\\n//g
+t loop
+/^'"${var}"'[ 	]*=/ s/'"${var}"'[ 	]*=[ 	]*\(.*\)/\1/p' \
+	< Makefile > Makefile.v
+      t=`tail -1 Makefile.v`
+      if [ -n "${t}" ]; then
+	eval "${var}=\${t}"
+      fi
+      rm -f Makefile.v
+    fi
+  done
+
+  AR=${AR-${host_alias}-ar}
+  AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
+  AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
+  AS=${AS-${host_alias}-as}
+  AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
   BISON=${BISON-bison}
   CC=${CC-${host_alias}-gcc}
   CFLAGS=${CFLAGS-"-g -O2"}
@@ -2036,12 +910,25 @@
   CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
   CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
   GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
+  DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
+  DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
   GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
   BUILD_PREFIX=${build_alias}-
   BUILD_PREFIX_1=${build_alias}-
+  LD=${LD-${host_alias}-ld}
+  LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
   MAKEINFO=${MAKEINFO-makeinfo}
+  NM=${NM-${host_alias}-nm}
+  NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
+  NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+  RANLIB=${RANLIB-${host_alias}-ranlib}
+  RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
+  WINDRES=${WINDRES-${host_alias}-windres}
+  WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
+  OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
+  OBJDUMP=${OBJDUMP-${host_alias}-objdump}
 
-  if test -z "${YACC}" ; then
+  if [ -z "${YACC}" ]; then
     IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
     for dir in $PATH; do
       test -z "$dir" && dir=.
@@ -2059,12 +946,12 @@
       fi
     done
     IFS="$save_ifs"
-    if test -z "${YACC}" ; then
+    if [ -z "${YACC}" ]; then
       YACC="bison -y"
     fi
   fi
 
-  if test -z "${LEX}" ; then
+  if [ -z "${LEX}" ]; then
     IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
     for dir in $PATH; do
       test -z "$dir" && dir=.
@@ -2081,6 +968,17 @@
     LEX=${LEX-flex}
   fi
 
+  # Export variables which autoconf might try to set.
+  export AS
+  export AR
+  export CC_FOR_BUILD
+  export DLLTOOL
+  export LD
+  export NM
+  export RANLIB
+  export WINDRES
+  export OBJCOPY
+  export OBJDUMP
 else
   # Set reasonable default values for some tools even if not Canadian.
   # Of course, these are different reasonable default values, originally
@@ -2090,24 +988,43 @@
   # in Makefile.in, so can still be overridden by fragments.
   # This is all going to change when we autoconfiscate...
 
-  BISON="\$(USUAL_BISON)"
-  CC_FOR_BUILD="\$(CC)"
-  GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
+  tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
+  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
+  tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
+  tools="${tools} NM_FOR_TARGET RANLIB_FOR_TARGET"
+  tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
+
+  AR=ar
+  AR_FOR_TARGET='\$(USUAL_AR_FOR_TARGET)'
+  AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
+  AS=as
+  AS_FOR_TARGET='\$(USUAL_AS_FOR_TARGET)'
+  BISON='$(USUAL_BISON)'
+  CC_FOR_BUILD='\$(CC)'
+  DLLTOOL=dlltool
+  DLLTOOL_FOR_TARGET='\$(USUAL_DLLTOOL_FOR_TARGET)'
+  GCC_FOR_TARGET='\$(USUAL_GCC_FOR_TARGET)'
   BUILD_PREFIX=
   BUILD_PREFIX_1=loser-
-  MAKEINFO="\$(USUAL_MAKEINFO)"
-  LEX="\$(USUAL_LEX)"
-  YACC="\$(USUAL_YACC)"
+  LD=ld
+  LD_FOR_TARGET='\$(USUAL_LD_FOR_TARGET)'
+  MAKEINFO='\$(USUAL_MAKEINFO)'
+  NM=nm
+  NM_FOR_TARGET='\$(USUAL_NM_FOR_TARGET)'
+  NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
+  RANLIB_FOR_TARGET='\$(USUAL_RANLIB_FOR_TARGET)'
+  WINDRES=windres
+  WINDRES_FOR_TARGET='\$(USUAL_WINDRES_FOR_TARGET)'
+  LEX='\$(USUAL_LEX)'
+  YACC='\$(USUAL_YACC)'
 
   # If CC is still not set, try to get gcc.
-  cc_prog_is_gcc=
-  if test -z "${CC}" ; then
+  if [ -z "${CC}" ]; then
     IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
     for dir in $PATH; do
       test -z "$dir" && dir=.
       if test -f $dir/gcc; then
 	CC="gcc"
-	cc_prog_is_gcc=yes
 	echo 'void f(){}' > conftest.c
 	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
 	  CFLAGS=${CFLAGS-"-g -O2"}
@@ -2123,20 +1040,11 @@
     IFS="$save_ifs"
     CC=${CC-cc}
   else
-    # Determine if we are using gcc.
-    cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-    if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
-      cc_prog_is_gcc=yes
-    fi
-    rm -f conftest.c
     if test -z "${CFLAGS}"; then
       # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
       # is set to a version of gcc.
-      if test "$cc_prog_is_gcc" = yes; then
+      case "${CC}" in
+      *gcc)
 	echo 'void f(){}' > conftest.c
 	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
 	  CFLAGS=${CFLAGS-"-g -O2"}
@@ -2146,25 +1054,7 @@
 	  CXXFLAGS=${CXXFLAGS-"-O2"}
 	fi
 	rm -f conftest*
-      fi
-    fi
-  fi
-
-  # We must set the default linker to the linker used by gcc for the correct
-  # operation of libtool.  If LD is not defined and we are using gcc, try to
-  # set the LD default to the ld used by gcc.
-  if test -z "$LD"; then
-    if test "$cc_prog_is_gcc" = yes; then
-      case $build in
-      *-*-mingw*)
-	gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
-      *)
-	gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
-      esac
-      case $gcc_prog_ld in
-      # Accept absolute paths.
-      [\\/]* | [A-Za-z]:[\\/]*)
-        LD="$gcc_prog_ld" ;;
+	;;
       esac
     fi
   fi
@@ -2174,22 +1064,27 @@
   CXXFLAGS=${CXXFLAGS-"-g -O2"}
 fi
 
+export CC
+export CXX
+export CFLAGS
+export CXXFLAGS
+
 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
 # Set up the list of links to be made.
 # ${links} is the list of link names, and ${files} is the list of names to link to.
 
 # Make the links.
 configlinks="${links}"
-if test -r ./config.status  ; then
+if [ -r ./config.status ] ; then
   mv -f ./config.status ./config.back
 fi
-while test -n "${files}" ; do
+while [ -n "${files}" ] ; do
   # set file to car of files, files to cdr of files
   set ${files}; file=$1; shift; files=$*
   set ${links}; link=$1; shift; links=$*
 
-  if test ! -r ${srcdir}/${file} ; then
-    if test ! -r ${file} ; then
+  if [ ! -r ${srcdir}/${file} ] ; then
+    if [ ! -r ${file} ] ; then
       echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
       echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
       exit 1
@@ -2210,7 +1105,7 @@
     ${remove} -r -f ${link}
     ${hard_link} ${srcfile} ${link}
   fi
-  if test ! -r ${link} ; then
+  if [ ! -r ${link} ] ; then
     echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
     exit 1
   fi
@@ -2221,7 +1116,7 @@
 # Create a .gdbinit file which runs the one in srcdir
 # and tells GDB to look there for source files.
 
-if test -r ${srcdir}/.gdbinit ; then
+if [ -r ${srcdir}/.gdbinit ] ; then
   case ${srcdir} in
     .) ;;
     *) cat > ./.gdbinit <<EOF
@@ -2234,2071 +1129,260 @@
   esac
 fi
 
-# record if we want runtime library stuff installed in libsubdir.
-# Blank means no.
-if test -z "${enable_version_specific_runtime_libs}"; then
-  enable_version_specific_runtime_libs=no
-fi
+# Install a makefile, and make it set VPATH
+# if necessary so that the sources are found.
+# Also change its value of srcdir.
+# NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
+# been somewhat optimized and is perhaps a bit twisty.
 
-# Make sure that the compiler is able to generate an executable.  If it
-# can't, we are probably in trouble.  We don't care whether we can run the
-# executable--we might be using a cross compiler--we only care whether it
-# can be created.  At this point the main configure script has set CC.
-we_are_ok=no
-echo "int main () { return 0; }" > conftest.c
-${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
-if test $? = 0 ; then
-  if test -s conftest || test -s conftest.exe ; then
-    we_are_ok=yes
-  fi
-fi 
-case $we_are_ok in
-  no)
-    echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
-    echo 1>&2 "*** You must set the environment variable CC to a working compiler."
-    rm -f conftest*
-    exit 1
-    ;;
-esac
-rm -f conftest*
+# code is order so as to try to sed the smallest input files we know.
+# so do these separately because I don't trust the order of sed -e expressions.
 
-# The Solaris /usr/ucb/cc compiler does not appear to work.
-case "${host}" in
-  sparc-sun-solaris2*)
-      CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
-      if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
-          could_use=
-          test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
-          if test -d /opt/cygnus/bin ; then
-              if test "$could_use" = "" ; then
-                  could_use="/opt/cygnus/bin"
-              else
-                  could_use="$could_use or /opt/cygnus/bin"
-              fi
-          fi
-        if test "$could_use" = "" ; then
-            echo "Warning: compilation may fail because you're using"
-            echo "/usr/ucb/cc.  You should change your PATH or CC "
-            echo "variable and rerun configure."
-        else
-            echo "Warning: compilation may fail because you're using"
-            echo "/usr/ucb/cc, when you should use the C compiler from"
-            echo "$could_use.  You should change your"
-            echo "PATH or CC variable and rerun configure."
-        fi
+# the five makefile fragments MUST end up in the resulting Makefile in this order: 
+# package macros, target, host, site, and package rules.
+
+if [ -f ${srcdir}/${Makefile_in} ] ; then
+
+  # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
+  rm -f ./${Makefile}.tem
+  case "${package_makefile_rules_frag}" in
+    "") cp ${srcdir}/${Makefile_in} ./Makefile.tem ;;
+    *)
+      if [ ! -f ${package_makefile_rules_frag} ] ; then
+        package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
       fi
-  ;;
-esac
-
-# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
-# binutils tools will find libbfd.so.
-if test "${shared}" = "yes" ; then
-  SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)"
-else
-  SET_LIB_PATH=
-fi
-
-
-case "${host}" in
-  *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
-  *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
-esac
-
-# Record target_configdirs and the configure arguments for target and
-# build configuration in Makefile.
-target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
-
-# This is the final value for target_configdirs.  configdirs already
-# has its final value.  It's time to create some lists of valid targets.
-
-# While at that, we remove Makefiles if we were started for recursive
-# configuration, such that the top-level Makefile reconfigures them,
-# like we used to do when configure itself was recursive.
-
-all_build_modules=
-configure_build_modules=
-# Only make build modules if build != host.
-# This should be done more generally, but at the moment it doesn't matter.
-if test ${host_alias} != ${build_alias} ; then
-  for module in libiberty ; do
-    all_build_modules=all-build-${module}
-    configure_build_modules=configure-build-${module}
-    if test -z "${no_recursion}" \
-       && test -f ${build_subdir}/${module}/Makefile; then
-      echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
-      rm -f ${build_subdir}/${module}/Makefile
-    fi
-  done
-fi
-
-all_host_modules=
-check_host_modules=
-install_host_modules=
-configure_host_modules=
-for module in ${configdirs} ; do
-  all_host_modules="${all_host_modules} all-${module}"
-  check_host_modules="${check_host_modules} check-${module}"
-  install_host_modules="${install_host_modules} install-${module}"
-  configure_host_modules="${configure_host_modules} configure-${module}"
-  if test -z "${no_recursion}" \
-     && test -f ${module}/Makefile; then
-    echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
-    rm -f ${module}/Makefile
-  fi
-done
-install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
-
-all_target_modules=
-check_target_modules=
-install_target_modules=
-configure_target_modules=
-for module in ${target_configdirs} ; do
-  all_target_modules="${all_target_modules} all-target-${module}"
-  check_target_modules="${check_target_modules} check-target-${module}"
-  install_target_modules="${install_target_modules} install-target-${module}"
-  configure_target_modules="${configure_target_modules} configure-target-${module}"
-  if test -z "${no_recursion}" \
-     && test -f ${target_subdir}/${module}/Makefile; then
-    echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
-    rm -f ${target_subdir}/${module}/Makefile
-  fi
-done
-
-# Determine whether gdb needs tk/tcl or not.
-# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
-# and in that case we want gdb to be built without tk.  Ugh!
-# In fact I believe gdb is the *only* package directly dependent on tk,
-# so we should be able to put the 'maybe's in unconditionally and
-# leave out the maybe dependencies when enable_gdbtk is false.  I'm not
-# 100% sure that that's safe though.
-
-gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
-case "$enable_gdbtk" in
-  no)
-    GDB_TK="" ;;
-  yes)
-    GDB_TK="${gdb_tk}" ;;
-  *)
-    # Only add the dependency on gdbtk when GDBtk is part of the gdb
-    # distro.  Eventually someone will fix this and move Insight, nee
-    # gdbtk to a separate directory.
-    if test -d ${srcdir}/gdb/gdbtk ; then
-      GDB_TK="${gdb_tk}"
-    else
-      GDB_TK=""
-    fi
-    ;;
-esac
-
-# Create the 'maybe dependencies'.  This uses a temporary file.
-rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
-for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
-	${install_host_modules} ${install_target_modules} \
-	${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
-	; do
-  echo "maybe-${item}: ${item}" >> maybedep.tmp
-done
-maybe_dependencies=maybedep.tmp
-
-
-# Create the serialization dependencies.  This uses a temporary file.
-
-# Check whether --enable-serial-configure or --disable-serial-configure was given.
-if test "${enable_serial_configure+set}" = set; then
-  enableval="$enable_serial_configure"
-  :
-fi
-
-
-# These force 'configure's to be done one at a time, to avoid problems
-# with contention over a shared config.cache.
-rm -f serdep.tmp
-echo '# serdep.tmp' > serdep.tmp
-olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_build_configure}" = xno ||
-for item in ${build_configdirs} ; do
-  case ${olditem} in
-    "") ;;
-    *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
+      if [ -f ${package_makefile_rules_frag} ] ; then
+        sed -e "/^####/  r ${package_makefile_rules_frag}" ${srcdir}/${Makefile_in} > ${Makefile}.tem
+      else
+        echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
+        echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
+        cp ${srcdir}/${Makefile_in} ./Makefile.tem
+      fi
   esac
-  olditem=${item}
-done
-olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_host_configure}" = xno ||
-for item in ${configdirs} ; do
-  case ${olditem} in
-    "") ;;
-    *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
-  esac
-  olditem=${item}
-done
-olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_target_configure}" = xno ||
-for item in ${target_configdirs} ; do
-  case ${olditem} in
-    "") ;;
-    *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
-  esac
-  olditem=${item}
-done
-serialization_dependencies=serdep.tmp
+  # working copy now in ${Makefile}.tem
 
+  # Conditionalize for this site.
+  rm -f ${Makefile}
+  case "${site}" in
+    "") mv ./Makefile.tem ${Makefile} ;;
+    *)
+      site_makefile_frag=${srcdir}/config/ms-${site}
 
-# Base args.  Strip norecursion, cache-file, srcdir, host, build,
-# target and nonopt.  These are the ones we might not want to pass
-# down to subconfigures.
-baseargs=`echo " ${ac_configure_args} " | \
-	sed -e 's/ --no[^ ]* / /' \
-	    -e 's/ --cache[a-z-]*=[^ ]* / /' \
-	    -e 's/ --sr[a-z-]*=[^ ]* / /' \
-	    -e 's/ --ho[a-z-]*=[^ ]* / /' \
-	    -e 's/ --bu[a-z-]*=[^ ]* / /' \
-	    -e 's/ --ta[a-z-]*=[^ ]* / /' \
-	    -e 's/ [^ -][^ ]* / /' \
-	    -e 's/^ *//;s/ *$//'`
-
-# For the build-side libraries, we just need to pretend we're native,
-# and not use the same cache file.  Multilibs are neither needed nor
-# desired.
-build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
-
-# For host modules, accept cache file option, or specification as blank.
-case "${cache_file}" in
-"") # empty
-  cache_file_option="" ;;
-/* | [A-Za-z]:[\\/]* ) # absolute path
-  cache_file_option="--cache-file=${cache_file}" ;;
-*) # relative path
-  cache_file_option="--cache-file=../${cache_file}" ;;
-esac
-
-host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
-
-target_configargs=${baseargs}
-
-# Passing a --with-cross-host argument lets the target libraries know
-# whether they are being built with a cross-compiler or being built
-# native.  However, it would be better to use other mechanisms to make the
-# sorts of decisions they want to make on this basis.  Please consider
-# this option to be deprecated.  FIXME.
-if test x${is_cross_compiler} = xyes ; then
-  target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
-fi
-
-# Default to --enable-multilib.
-if test x${enable_multilib} = x ; then
-  target_configargs="--enable-multilib ${target_configargs}"
-fi
-
-# Pass --with-newlib if appropriate.  Note that target_configdirs has
-# changed from the earlier setting of with_newlib.
-if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
-  target_configargs="--with-newlib ${target_configargs}"
-fi
-
-# Pass the appropriate --host, --build, and --cache-file arguments.
-target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
-
-# provide a proper gxx_include_dir.
-# Note, if you change the default, make sure to fix both here and in
-# the gcc and libstdc++-v3 subdirectories.
-# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-gxx_include_dir=
-if test -n "${with_gxx_include_dir}"; then
-  case "${with_gxx_include_dir}" in
-    yes )
-      echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
-      exit 1
-      ;;
-    no )
-      ;;
-    * )
-      gxx_include_dir=${with_gxx_include_dir}
+      if [ -f ${site_makefile_frag} ] ; then
+        sed -e "/^####/  r ${site_makefile_frag}" ./Makefile.tem > ${Makefile}
+      else
+        mv ./Makefile.tem ${Makefile}
+        site_makefile_frag=
+      fi
       ;;
   esac
-fi
-if test x${gxx_include_dir} = x; then
-  if test x${enable_version_specific_runtime_libs} = xyes; then
-    gxx_include_dir='${libsubdir}/include/c++'
-  else
-    . ${srcdir}/config.if
-    gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
-  fi
-else
-  gxx_include_dir=${gxx_include_dir}
-fi
+  # working copy now in ${Makefile}
 
-FLAGS_FOR_TARGET=
-case " $target_configdirs " in
- *" newlib "*)
-  case " $target_configargs " in
-  *" --with-newlib "*)
-   case "$target" in
-   *-cygwin*)
-     FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
-   esac
-
-   # If we're not building GCC, don't discard standard headers.
-   if test -d ${srcdir}/gcc; then
-     FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
-
-     if test "${build}" != "${host}"; then
-       # On Canadian crosses, CC_FOR_TARGET will have already been set
-       # by `configure', so we won't have an opportunity to add -Bgcc/
-       # to it.  This is right: we don't want to search that directory
-       # for binaries, but we want the header files in there, so add
-       # them explicitly.
-       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
-
-       # Someone might think of using the pre-installed headers on
-       # Canadian crosses, in case the installed compiler is not fully
-       # compatible with the compiler being built.  In this case, it
-       # would be better to flag an error than risking having
-       # incompatible object files being constructed.  We can't
-       # guarantee that an error will be flagged, but let's hope the
-       # compiler will do it, when presented with incompatible header
-       # files.
-     fi
-   fi
-
-   case "${target}-${is_cross_compiler}" in
-   i[3456]86-*-linux*-no)
-      # Here host == target, so we don't need to build gcc,
-      # so we don't want to discard standard headers.
-      FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
-      ;;
-   *)
-      # If we're building newlib, use its generic headers last, but search
-      # for any libc-related directories first (so make it the last -B
-      # switch).
-      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
-      ;;
-   esac
-   ;;
+  # Conditionalize the makefile for this host.
+  rm -f ./Makefile.tem
+  case "${host_makefile_frag}" in
+    "") mv ${Makefile} ./Makefile.tem ;;
+    *)
+      if [ ! -f ${host_makefile_frag} ] ; then
+        host_makefile_frag=${srcdir}/${host_makefile_frag}
+      fi
+      if [ -f ${host_makefile_frag} ] ; then
+        sed -e "/^####/  r ${host_makefile_frag}" ${Makefile} > ./Makefile.tem
+      else
+        echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
+        echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
+        mv ${Makefile} ./Makefile.tem
+      fi
   esac
-  ;;
+  # working copy now in ./Makefile.tem
+
+  # Conditionalize the makefile for this target.
+  rm -f ${Makefile}
+  case "${target_makefile_frag}" in
+    "") mv ./Makefile.tem ${Makefile} ;;
+    *)
+      if [ ! -f ${target_makefile_frag} ] ; then
+        target_makefile_frag=${srcdir}/${target_makefile_frag}
+      fi
+      if [ -f ${target_makefile_frag} ] ; then
+        sed -e "/^####/  r ${target_makefile_frag}" ./Makefile.tem > ${Makefile}
+      else
+        mv ./Makefile.tem ${Makefile}
+        target_makefile_frag=
+      fi
+      ;;
+  esac
+  # working copy now in ${Makefile}
+
+  # Emit the default values of this package's macros.
+  rm -f ./Makefile.tem
+  case "${package_makefile_frag}" in
+    "") mv ${Makefile} ./Makefile.tem ;;
+    *)
+      if [ ! -f ${package_makefile_frag} ] ; then
+        package_makefile_frag=${srcdir}/${package_makefile_frag}
+      fi
+      if [ -f ${package_makefile_frag} ] ; then
+        sed -e "/^####/  r ${package_makefile_frag}" ${Makefile} > ./Makefile.tem
+      else
+        echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
+        echo '***' is missing in ${PWD=`${PWDCMD-pwd}`}. 1>&2
+        mv ${Makefile} ./Makefile.tem
+      fi
+  esac
+  # real copy now in ./Makefile.tem
+
+  # record if we want runtime library stuff installed in libsubdir.
+  # Blank means no.
+  if test -z "${enable_version_specific_runtime_libs}"; then
+    enable_version_specific_runtime_libs=no
+  fi
+
+  sed -e "s|@configlinks@|${configlinks}|" \
+      -e "s|@build_alias@|${build_alias}|" \
+      -e "s|@build_cpu@|${build_cpu}|" \
+      -e "s|@build_vendor@|${build_vendor}|" \
+      -e "s|@build_os@|${build_os}|" \
+      -e "s|@host_alias@|${host_alias}|" \
+      -e "s|@host_cpu@|${host_cpu}|" \
+      -e "s|@host_vendor@|${host_vendor}|" \
+      -e "s|@host_os@|${host_os}|" \
+      -e "s|@target_alias@|${target_alias}|" \
+      -e "s|@target_cpu@|${target_cpu}|" \
+      -e "s|@target_vendor@|${target_vendor}|" \
+      -e "s|@target_os@|${target_os}|" \
+      -e "s|@target_makefile_frag@|${target_makefile_frag}|" \
+      -e "s|@host_makefile_frag@|${host_makefile_frag}|" \
+      -e "s|@enable_shared@|${enable_shared}|" \
+      -e "s|@enable_threads@|${enable_threads}|" \
+      -e "s|@enable_version_specific_runtime_libs@|${enable_version_specific_runtime_libs}|" \
+      -e "s|@gcc_version_trigger@|${gcc_version_trigger}|" \
+      -e "s|@gcc_version@|${gcc_version}|" \
+      ./Makefile.tem > ${Makefile}
+  mv -f ${Makefile} ./Makefile.tem
+  # Real copy now in Makefile.tem; no prologue.
+
+  # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
+  # remove any form feeds.
+  sed -e "s|@configdirs@|${configdirs}|" \
+      -e "s|@prefix@|${prefix}|" \
+      -e "s|@exec_prefix@|${exec_prefix}|" \
+      -e "s|@bindir@|${bindir}|" \
+      -e "s|@sbindir@|${sbindir}|" \
+      -e "s|@libexecdir@|${libexecdir}|" \
+      -e "s|@datadir@|${datadir}|" \
+      -e "s|@sysconfdir@|${sysconfdir}|" \
+      -e "s|@sharedstatedir@|${sharedstatedir}|" \
+      -e "s|@localstatedir@|${localstatedir}|" \
+      -e "s|@libdir@|${libdir}|" \
+      -e "s|@includedir@|${includedir}|" \
+      -e "s|@oldincludedir@|${oldincludedir}|" \
+      -e "s|@infodir@|${infodir}|" \
+      -e "s|@mandir@|${mandir}|" \
+      -e "s|@CC@|${CC}|" \
+      -e "s|@CXX@|${CXX}|" \
+      -e "s|@CFLAGS@|${CFLAGS}|" \
+      -e "s|@CXXFLAGS@|${CXXFLAGS}|" \
+      -e "s|@config_shell@|${config_shell}|" \
+      -e "s|@srcdir@|${srcdir}|" \
+      -e "s///" \
+      -e "s:@program_transform_name@:${program_transform_name}:" \
+      -e "s|@tooldir@|${tooldir}|" \
+      -e "s|@build_tooldir@|${tooldir}|" \
+      -e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \
+      -e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \
+      -e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \
+          ./Makefile.tem > ${Makefile}
+
+  # If this is a Canadian Cross, preset the values of many more
+  # tools.
+  if [ "${build}" != "${host}" ]; then
+    for var in ${tools}; do
+      eval val=\$${var}
+      sed -e "/^${var}[ 	]*=/{
+              :loop1
+              /\\\\$/ N
+              /\\\\$/ b loop1
+              s/\\\\\\n//g
+              s%^${var}[ 	]*=.*$%${var} = ${val}%
+              }" ${Makefile} > ${Makefile}.tem
+      mv -f ${Makefile}.tem ${Makefile}
+    done
+  fi
+  # If this is NOT a Canadian Cross, preset the values of some more
+  # tools.  The above line should get merged into this, but this
+  # substitutes *once* where the above substitutes *globally*; that
+  # needs to be worked out before the merger.  The issue is in Makefile
+  # fragment elements (ick, yuck, ugh).
+  if [ "${build}" = "${host}" ]; then
+    for var in ${tools}; do
+      eval val=\$${var}
+      sed -e "s%@${var}@%${val}%" ${Makefile} > ${Makefile}.tem
+      mv -f ${Makefile}.tem ${Makefile}
+    done
+  fi
+
+  # final copy now in ${Makefile}
+
+else
+  echo "No Makefile.in found in ${srcdir}/., unable to configure" 1>&2
+fi
+
+rm -f ./Makefile.tem
+
+case "${host_makefile_frag}" in
+  "") using= ;;
+  *) using="and \"${host_makefile_frag}\"" ;;
 esac
 
-# On Canadian crosses, we'll be searching the right directories for
-# the previously-installed cross compiler, so don't bother to add
-# flags for directories within the install tree of the compiler
-# being built; programs in there won't even run.
-if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
-  # Search for pre-installed headers if nothing else fits.
-  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
-fi
+case "${target_makefile_frag}" in
+  "") ;;
+  *) using="${using} and \"${target_makefile_frag}\"" ;;
+esac
 
-if test "x${use_gnu_ld}" = x &&
-   echo " ${configdirs} " | grep " ld " > /dev/null ; then
-  # Arrange for us to find uninstalled linker scripts.
-  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
-fi
+case "${site_makefile_frag}" in
+  "") ;;
+  *) using="${using} and \"${site_makefile_frag}\"" ;;
+esac
 
-if test "x${CC_FOR_TARGET+set}" = xset; then
-  :
-elif test -d ${srcdir}/gcc; then
-  CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
-elif test "$host" = "$target"; then
-  CC_FOR_TARGET='$(CC)'
-else
-  CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
-fi
-CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+newusing=`echo "${using}" | sed 's/and/using/'`
+using=${newusing}
+echo "Created \"${Makefile}\" in" ${PWD=`${PWDCMD-pwd}`} ${using}
 
-if test "x${GCJ_FOR_TARGET+set}" = xset; then
-  :
-elif test -d ${srcdir}/gcc; then
-  GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
-elif test "$host" = "$target"; then
-  GCJ_FOR_TARGET='gcj'
-else
-  GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
-fi
-GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+. ${tmpfile}.pos
 
-# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
-raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+# describe the chosen configuration in config.status.
+# Make that file a shellscript which will reestablish
+# the same configuration.  Used in Makefiles to rebuild
+# Makefiles.
 
-if test "x${CXX_FOR_TARGET+set}" = xset; then
-  :
-elif test -d ${srcdir}/gcc; then
-  # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
-  # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
-  # default whereas gcc does not.
-  # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
-  # all other cases.
-  CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
-  RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
-elif test "$host" = "$target"; then
-  CXX_FOR_TARGET='$(CXX)'
-  RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
-else
-  CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
-  RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
-fi
-CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+case "${norecursion}" in
+  "") arguments="${arguments} --norecursion" ;;
+  *) ;;
+esac
 
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
-qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
-
-# We want to defer the evaluation of `cmd`s and shell variables in
-# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
-# bootstrap.  We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
-# quotes, but we still have to duplicate `$'s so that shell variables
-# can be expanded by the nested make as shell variables, not as make
-# macros.
-qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-
-# Wrap CC_FOR_TARGET and friends, for certain types of builds.
-CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
-GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
-CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
-
-# Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
-
-
-
-
-
-# Miscellanea: directories, flags, etc.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Build module lists & subconfigure args.
-
-
-
-
-
-# Host module lists & subconfigure args.
-
-
-
-
-
-
-
-
-# Target module lists & subconfigure args.
-
-
-
-
-
-
-
-
-# Build tools.
-
-
-
-
-
-
-
-# Host tools.
-ncn_tool_prefix=
-test -n "$host_alias" && ncn_tool_prefix=$host_alias-
-ncn_target_tool_prefix=
-test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2737: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="${ncn_tool_prefix}ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
+echo "#!/bin/sh
+# ${NO_EDIT}
+# This directory was configured as follows:
+${progname}" ${arguments}  "
+# ${using}" > ./config.new
+chmod a+x ./config.new
+if [ -r ./config.back ] ; then
+  mv -f ./config.back ./config.status
 fi
+${config_shell} ${moveifchange} ./config.new ./config.status
 
-fi
-if test -z "$ac_cv_prog_AR" ; then
-  if test $build = $host ; then
-    ncn_cv_AR=$AR
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2770: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_AR"; then
-  ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
-fi
-fi
-ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
-if test -n "$ncn_cv_AR"; then
-  echo "$ac_t""$ncn_cv_AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    AR=$ncn_cv_AR
-  else
-    AR="${ncn_tool_prefix}ar"
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2809: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AS"; then
-  ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AS="${ncn_tool_prefix}as"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
-  echo "$ac_t""$AS" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AS" ; then
-  if test $build = $host ; then
-    ncn_cv_AS=$AS
-    # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2842: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_AS"; then
-  ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_AS="as"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
-fi
-fi
-ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
-if test -n "$ncn_cv_AS"; then
-  echo "$ac_t""$ncn_cv_AS" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    AS=$ncn_cv_AS
-  else
-    AS="${ncn_tool_prefix}as"
-  fi
-else
-  AS="$ac_cv_prog_AS"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2881: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$DLLTOOL"; then
-  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
-  echo "$ac_t""$DLLTOOL" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL" ; then
-  if test $build = $host ; then
-    ncn_cv_DLLTOOL=$DLLTOOL
-    # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2914: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_DLLTOOL"; then
-  ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
-fi
-fi
-ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
-if test -n "$ncn_cv_DLLTOOL"; then
-  echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    DLLTOOL=$ncn_cv_DLLTOOL
-  else
-    DLLTOOL="${ncn_tool_prefix}dlltool"
-  fi
-else
-  DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2953: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$LD"; then
-  ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_LD="${ncn_tool_prefix}ld"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
-  echo "$ac_t""$LD" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_LD" ; then
-  if test $build = $host ; then
-    ncn_cv_LD=$LD
-    # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2986: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_LD"; then
-  ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_LD="ld"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
-fi
-fi
-ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
-if test -n "$ncn_cv_LD"; then
-  echo "$ac_t""$ncn_cv_LD" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    LD=$ncn_cv_LD
-  else
-    LD="${ncn_tool_prefix}ld"
-  fi
-else
-  LD="$ac_cv_prog_LD"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3025: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$NM"; then
-  ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_NM="${ncn_tool_prefix}nm"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-NM="$ac_cv_prog_NM"
-if test -n "$NM"; then
-  echo "$ac_t""$NM" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_NM" ; then
-  if test $build = $host ; then
-    ncn_cv_NM=$NM
-    # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3058: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_NM"; then
-  ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_NM="nm"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm"
-fi
-fi
-ncn_cv_NM="$ac_cv_prog_ncn_cv_NM"
-if test -n "$ncn_cv_NM"; then
-  echo "$ac_t""$ncn_cv_NM" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    NM=$ncn_cv_NM
-  else
-    NM="${ncn_tool_prefix}nm"
-  fi
-else
-  NM="$ac_cv_prog_NM"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3097: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="${ncn_tool_prefix}ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB" ; then
-  if test $build = $host ; then
-    ncn_cv_RANLIB=$RANLIB
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3130: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_RANLIB"; then
-  ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":"
-fi
-fi
-ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB"
-if test -n "$ncn_cv_RANLIB"; then
-  echo "$ac_t""$ncn_cv_RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    RANLIB=$ncn_cv_RANLIB
-  else
-    RANLIB=":"
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3169: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_WINDRES="${ncn_tool_prefix}windres"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
-  echo "$ac_t""$WINDRES" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_WINDRES" ; then
-  if test $build = $host ; then
-    ncn_cv_WINDRES=$WINDRES
-    # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3202: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_WINDRES"; then
-  ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_WINDRES="windres"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres"
-fi
-fi
-ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES"
-if test -n "$ncn_cv_WINDRES"; then
-  echo "$ac_t""$ncn_cv_WINDRES" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    WINDRES=$ncn_cv_WINDRES
-  else
-    WINDRES="${ncn_tool_prefix}windres"
-  fi
-else
-  WINDRES="$ac_cv_prog_WINDRES"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$OBJCOPY"; then
-  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_OBJCOPY="${ncn_tool_prefix}objcopy"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-OBJCOPY="$ac_cv_prog_OBJCOPY"
-if test -n "$OBJCOPY"; then
-  echo "$ac_t""$OBJCOPY" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_OBJCOPY" ; then
-  if test $build = $host ; then
-    ncn_cv_OBJCOPY=$OBJCOPY
-    # Extract the first word of "objcopy", so it can be a program name with args.
-set dummy objcopy; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3274: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_OBJCOPY"; then
-  ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
-fi
-fi
-ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY"
-if test -n "$ncn_cv_OBJCOPY"; then
-  echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    OBJCOPY=$ncn_cv_OBJCOPY
-  else
-    OBJCOPY="${ncn_tool_prefix}objcopy"
-  fi
-else
-  OBJCOPY="$ac_cv_prog_OBJCOPY"
-fi
-
- if test -n "$ncn_tool_prefix"; then
-  # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ncn_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3313: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$OBJDUMP"; then
-  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_OBJDUMP="${ncn_tool_prefix}objdump"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
-  echo "$ac_t""$OBJDUMP" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP" ; then
-  if test $build = $host ; then
-    ncn_cv_OBJDUMP=$OBJDUMP
-    # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3346: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_OBJDUMP"; then
-  ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_OBJDUMP="objdump"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump"
-fi
-fi
-ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP"
-if test -n "$ncn_cv_OBJDUMP"; then
-  echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    OBJDUMP=$ncn_cv_OBJDUMP
-  else
-    OBJDUMP="${ncn_tool_prefix}objdump"
-  fi
-else
-  OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-
-
-
-
-
-
-
-
-# Target tools.
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3394: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AR_FOR_TARGET"; then
-  ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
-if test -n "$AR_FOR_TARGET"; then
-  echo "$ac_t""$AR_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3427: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_AR_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
-fi
-fi
-ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET"
-if test -n "$ncn_cv_AR_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET
-  else
-    AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
-  fi
-else
-  AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
-fi
-
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3466: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AS_FOR_TARGET"; then
-  ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
-if test -n "$AS_FOR_TARGET"; then
-  echo "$ac_t""$AS_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET
-    # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3499: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_AS_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
-fi
-fi
-ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET"
-if test -n "$ncn_cv_AS_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET
-  else
-    AS_FOR_TARGET="${ncn_target_tool_prefix}as"
-  fi
-else
-  AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
-fi
-
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3538: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$DLLTOOL_FOR_TARGET"; then
-  ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
-if test -n "$DLLTOOL_FOR_TARGET"; then
-  echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
-    # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3571: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
-fi
-fi
-ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET"
-if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET
-  else
-    DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
-  fi
-else
-  DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
-fi
-
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3610: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$LD_FOR_TARGET"; then
-  ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
-if test -n "$LD_FOR_TARGET"; then
-  echo "$ac_t""$LD_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET
-    # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3643: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_LD_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
-fi
-fi
-ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET"
-if test -n "$ncn_cv_LD_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET
-  else
-    LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
-  fi
-else
-  LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
-fi
-
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3682: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$NM_FOR_TARGET"; then
-  ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
-if test -n "$NM_FOR_TARGET"; then
-  echo "$ac_t""$NM_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET
-    # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3715: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_NM_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
-fi
-fi
-ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET"
-if test -n "$ncn_cv_NM_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET
-  else
-    NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
-  fi
-else
-  NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
-fi
-
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3754: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB_FOR_TARGET"; then
-  ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
-if test -n "$RANLIB_FOR_TARGET"; then
-  echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
-    # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3787: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":"
-fi
-fi
-ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET"
-if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET
-  else
-    RANLIB_FOR_TARGET=":"
-  fi
-else
-  RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
-fi
-
- if test -n "$ncn_target_tool_prefix"; then
-  # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3826: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$WINDRES_FOR_TARGET"; then
-  ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
-if test -n "$WINDRES_FOR_TARGET"; then
-  echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
-  if test $build = $target ; then
-    ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
-    # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3859: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
-  ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
-fi
-fi
-ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET"
-if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
-  echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- 
-    WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET
-  else
-    WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
-  fi
-else
-  WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
-fi
-
-
-
-
-
-
-
-
-
-
-
-# Fix up target tools.
-if test "x${build}" = "x${host}" ; then
-  # In this case, the newly built tools can and should be used,
-  # so we override the results of the autoconf tests.
-  # This should really only happen when the tools are actually being built,
-  # but that's a further refinement.  The new build scheme, where
-  # tools are built into a structure paralleling where they're installed,
-  # should also eliminate all of this cleanly.
-  AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
-  AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
-  DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
-  LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
-  NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
-  RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
-  WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
-fi
-# Certain tools may need extra flags.
-AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
-RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
-NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# 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.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# 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.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# 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 we branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
-t quote
-s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output.  A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-/@maybe_dependencies@/r $maybe_dependencies
-s%@maybe_dependencies@%%g
-/@serialization_dependencies@/r $serialization_dependencies
-s%@serialization_dependencies@%%g
-/@host_makefile_frag@/r $host_makefile_frag
-s%@host_makefile_frag@%%g
-/@target_makefile_frag@/r $target_makefile_frag
-s%@target_makefile_frag@%%g
-/@alphaieee_frag@/r $alphaieee_frag
-s%@alphaieee_frag@%%g
-/@ospace_frag@/r $ospace_frag
-s%@ospace_frag@%%g
-s%@SET_LIB_PATH@%$SET_LIB_PATH%g
-s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
-s%@BUILD_PREFIX@%$BUILD_PREFIX%g
-s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
-s%@configlinks@%$configlinks%g
-s%@enable_shared@%$enable_shared%g
-s%@enable_threads@%$enable_threads%g
-s%@enable_version_specific_runtime_libs@%$enable_version_specific_runtime_libs%g
-s%@gcc_version_trigger@%$gcc_version_trigger%g
-s%@gcc_version@%$gcc_version%g
-s%@tooldir@%$tooldir%g
-s%@build_tooldir@%$build_tooldir%g
-s%@GDB_TK@%$GDB_TK%g
-s%@gxx_include_dir@%$gxx_include_dir%g
-s%@libstdcxx_incdir@%$libstdcxx_incdir%g
-s%@build_subdir@%$build_subdir%g
-s%@build_configargs@%$build_configargs%g
-s%@configure_build_modules@%$configure_build_modules%g
-s%@all_build_modules@%$all_build_modules%g
-s%@host_configargs@%$host_configargs%g
-s%@configdirs@%$configdirs%g
-s%@configure_host_modules@%$configure_host_modules%g
-s%@all_host_modules@%$all_host_modules%g
-s%@check_host_modules@%$check_host_modules%g
-s%@install_host_modules@%$install_host_modules%g
-s%@install_host_modules_nogcc@%$install_host_modules_nogcc%g
-s%@target_subdir@%$target_subdir%g
-s%@target_configargs@%$target_configargs%g
-s%@target_configdirs@%$target_configdirs%g
-s%@configure_target_modules@%$configure_target_modules%g
-s%@all_target_modules@%$all_target_modules%g
-s%@check_target_modules@%$check_target_modules%g
-s%@install_target_modules@%$install_target_modules%g
-s%@BISON@%$BISON%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@LEX@%$LEX%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@YACC@%$YACC%g
-s%@config_shell@%$config_shell%g
-s%@AR@%$AR%g
-s%@ncn_cv_AR@%$ncn_cv_AR%g
-s%@AS@%$AS%g
-s%@ncn_cv_AS@%$ncn_cv_AS%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g
-s%@LD@%$LD%g
-s%@ncn_cv_LD@%$ncn_cv_LD%g
-s%@NM@%$NM%g
-s%@ncn_cv_NM@%$ncn_cv_NM%g
-s%@RANLIB@%$RANLIB%g
-s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g
-s%@WINDRES@%$WINDRES%g
-s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g
-s%@OBJCOPY@%$OBJCOPY%g
-s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
-s%@CC@%$CC%g
-s%@CXX@%$CXX%g
-s%@DEFAULT_YACC@%$DEFAULT_YACC%g
-s%@DEFAULT_LEX@%$DEFAULT_LEX%g
-s%@DEFAULT_M4@%$DEFAULT_M4%g
-s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
-s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g
-s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
-s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g
-s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
-s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g
-s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
-s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g
-s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
-s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g
-s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
-s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g
-s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
-s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g
-s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
-s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
-s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
-s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
-s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
-s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
-s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
-s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
+# and reset the trap handler.
+rm -rf ${tmpdir}
+trap 0
 
 exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
+#
+# Local Variables:
+# fill-column: 131
+# End:
+#
+
+# end of configure
diff --git a/configure.in b/configure.in
index 88150ed..82cca6c 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,21 @@
+#! /bin/bash
+##############################################################################
+
+## This file is a shell script fragment that supplies the information
+## necessary to tailor a template configure script into the configure
+## script appropriate for this directory.  For more information, check
+## any existing configure script.  
+
+## Be warned, there are two types of configure.in files.  There are those
+## used by Autoconf, which are macros which are expanded into a configure
+## script by autoconf.  The other sort, of which this is one, is executed
+## by Cygnus configure.  
+
+## For more information on these two systems, check out the documentation
+## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi).  
+
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-#   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 #
 # 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
@@ -16,107 +32,29 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 ##############################################################################
-### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
-
-AC_INIT(move-if-change)
-AC_PREREQ(2.13)
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-
-sinclude(config/acx.m4)
-
-# clear some things potentially inherited from environment.
-
-enable_threads=no
-enable_shared=no
-enable_libstdcxx_v3=yes
-floating_point=default
-gas=default
-x11=default
-
-### we might need to use some other shell than /bin/sh for running subshells
-### If we are on Windows, search for the shell.  This will permit people
-### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
-### without also having to set CONFIG_SHELL.  This code will work when
-### using bash, which sets OSTYPE.
-case "${OSTYPE}" in
-*win32*)
-  if test x${CONFIG_SHELL} = x ; then
-    if test ! -f /bin/sh ; then
-      if test x${SHELL} != x && test -f ${SHELL} ; then
-	CONFIG_SHELL=${SHELL}
-	export CONFIG_SHELL
-      else
-	for prog in sh sh.exe bash bash.exe; do
-	  IFS="${IFS=	}"; save_ifs="$IFS"; IFS="${IFS}:"
-	  for dir in $PATH; do
-	    test -z "$dir" && dir=.
-	    if test -f $dir/$prog; then
-	      CONFIG_SHELL=$dir/$prog
-	      export CONFIG_SHELL
-	      break
-	    fi
-	  done
-	  IFS="$save_ifs"
-	  test -n "${CONFIG_SHELL}" && break
-	done
-      fi
-    fi
-  fi
-  ;;
-esac
-
-config_shell=${CONFIG_SHELL-/bin/sh}
-
-## this is a little touchy and won't always work, but...
-##
-## if the argv[[0]] starts with a slash then it is an absolute name that can (and
-## must) be used as is.
-##
-## otherwise, if argv[[0]] has no slash in it, we can assume that it is on the
-## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
-##
-
-progname=$0
-# if PWD already has a value, it is probably wrong.
-if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-
-# Export original configure arguments for use by sub-configures.
-TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
-export TOPLEVEL_CONFIGURE_ARGUMENTS
-
-moveifchange=${srcdir}/move-if-change
-
-# Set srcdir to "." if that's what it is.
-# This is important for multilib support.
-pwd=`${PWDCMD-pwd}`
-srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
-if test "${pwd}" = "${srcpwd}" ; then
-  srcdir=.
-fi
-
-topsrcdir=$srcpwd
 
 extra_host_args=
 # Define the trigger file to make sure configure will re-run whenever
 # the gcc version number changes.
-if test "${with_gcc_version_trigger+set}" = set ; then
-  gcc_version_trigger="$with_gcc_version_trigger"
-  gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
+if [ "${with_gcc_version_trigger+set}" = set ]; then
+    gcc_version_trigger="$with_gcc_version_trigger"
+    gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
 else
-  # If gcc's sources are available, define the trigger file.
-  if test -f ${topsrcdir}/gcc/version.c ; then
-    gcc_version_trigger=${topsrcdir}/gcc/version.c
-    gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
-    case "$ac_configure_args" in
-      *--with-gcc-version-trigger=$gcc_version_trigger* )
-        ;;
-      * )
-        # Add to all subconfigure arguments: build, host, and target.
-        ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
-        ;;
-    esac
-  fi
+    # If gcc's sources are available, define the trigger file.
+    if [ -f ${topsrcdir}/gcc/version.c ] ; then
+	gcc_version_trigger=${topsrcdir}/gcc/version.c
+	gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
+	case "$arguments" in
+	  *--with-gcc-version-trigger=$gcc_version_trigger* )
+	    ;;
+	  * )
+	    # Add to all subconfigure arguments: build, host, and target.
+	    arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
+	    ;;
+	esac
+	# This will be redundant when we start all subconfigures from the Makefile.
+	extra_host_args="--with-gcc-version-trigger=$gcc_version_trigger $extra_host_args"
+    fi
 fi
 
 ### To add a new directory to the tree, first choose whether it is a target
@@ -186,11 +124,18 @@
 
 ################################################################################
 
+srctrigger=move-if-change
 srcname="gnu development package"
 
 # This gets set non-empty for some net releases of packages.
 appdirs=""
 
+# per-host:
+
+# There is no longer anything interesting in the per-host section.
+
+# per-target:
+
 # Define is_cross_compiler to save on calls to 'test'.
 is_cross_compiler=
 if test x"${host}" = x"${target}" ; then
@@ -298,17 +243,17 @@
   hppa*64*-*-*)
     noconfigdirs="$noconfigdirs byacc"
     ;;
-  i[[3456]]86-*-vsta)
+  i[3456]86-*-vsta)
     noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
     ;;
-  i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
+  i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
     noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
 	;;
-  i[[3456]]86-*-mingw32*)
+  i[3456]86-*-mingw32*)
     # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
      noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
 	;;
-  i[[3456]]86-*-beos*)
+  i[3456]86-*-beos*)
      noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
      ;;
   *-*-cygwin*)
@@ -348,7 +293,7 @@
   *-*-chorusos)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
-  *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
+  *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
   *-*-netbsd*)
@@ -503,13 +448,13 @@
     # No gdb or ld support yet.
     noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
     ;;
-  i[[3456]]86-*-coff | i[[3456]]86-*-elf)
+  i[3456]86-*-coff | i[3456]86-*-elf)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  i[[34567]]86-*-freebsd*)
+  i[34567]86-*-freebsd*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
-  i[[3456]]86-*-linux*)
+  i[3456]86-*-linux*)
     # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
     # not build java stuff by default.
     case "${target}" in
@@ -528,13 +473,13 @@
     # if the --with-newlib option has been given, because otherwise
     # 'target-newlib' will appear in skipdirs.
     ;;
-  i[[3456]]86-*-mingw32*)
+  i[3456]86-*-mingw32*)
     target_configdirs="$target_configdirs target-mingw"
     noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
 
     # Can't build gdb for mingw32 if not native.
     case "${host}" in
-      i[[3456]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
+      i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
          ;;
     esac
@@ -552,24 +497,24 @@
          ;;
     esac
     ;;    
-  i[[3456]]86-*-pe)
+  i[3456]86-*-pe)
     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
     ;;
-  i[[3456]]86-*-sco3.2v5*)
+  i[3456]86-*-sco3.2v5*)
     # The linker does not yet know about weak symbols in COFF,
     # and is not configured to handle mixed ELF and COFF.
     noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     ;;
-  i[[3456]]86-*-sco*)
+  i[3456]86-*-sco*)
     noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     ;;
-  i[[3456]]86-*-solaris2*)
+  i[3456]86-*-solaris2*)
     noconfigdirs="$noconfigdirs target-libgloss"
     ;;
-  i[[3456]]86-*-sysv4*)
+  i[3456]86-*-sysv4*)
     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     ;;
-  i[[3456]]86-*-beos*)
+  i[3456]86-*-beos*)
      noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
      ;;
   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
@@ -667,9 +612,9 @@
     ;;
   sh-*-*)
     case "${host}" in
-      i[[3456]]86-*-vsta) ;; # don't add gprof back in
-      i[[3456]]86-*-go32*) ;; # don't add gprof back in
-      i[[3456]]86-*-msdosdjgpp*) ;; # don't add gprof back in
+      i[3456]86-*-vsta) ;; # don't add gprof back in
+      i[3456]86-*-go32*) ;; # don't add gprof back in
+      i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
       *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
     esac
     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
@@ -755,7 +700,7 @@
 		exit 1
 	fi
 fi
-enable_languages=`echo "${enable_languages}" | sed -e 's/[[ 	,]][[ 	,]]*/,/g' -e 's/,$//'`
+enable_languages=`echo "${enable_languages}" | sed -e 's/[ 	,][ 	,]*/,/g' -e 's/,$//'`
 
 # First scan to see if an enabled language requires some other language.
 # We assume that a given config-lang.in will list all the language
@@ -767,11 +712,11 @@
        ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
-    ${srcdir}/gcc/[[*]]/config-lang.in)
+    ${srcdir}/gcc/[*]/config-lang.in)
        ;;
     *)
-       lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ 	]]*\).*$,\1,p' $lang`
-       this_lang_requires=`sed -n -e 's,^lang_requires=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_requires=\([[^ 	]]*\).*$,\1,p' $lang`
+       lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ 	]*\).*$,\1,p' $lang`
+       this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ 	]*\).*$,\1,p' $lang`
        for other in $this_lang_requires
        do
 	  case ,${enable_languages}, in
@@ -796,12 +741,12 @@
 	..) ;;
 	# The odd quoting in the next line works around
 	# an apparent bug in bash 1.12 on linux.
-	${srcdir}/gcc/[[*]]/config-lang.in) ;;
+	${srcdir}/gcc/[*]/config-lang.in) ;;
 	*)
-	  lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ 	]]*\).*$,\1,p' $lang`
-	  this_lang_libs=`sed -n -e 's,^target_libs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^target_libs=\([[^ 	]]*\).*$,\1,p' $lang`
-	  this_lang_dirs=`sed -n -e 's,^lang_dirs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_dirs=\([[^ 	]]*\).*$,\1,p' $lang`
-	  build_by_default=`sed -n -e 's,^build_by_default=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^build_by_default=\([[^ 	]]*\).*$,\1,p' $lang`
+	  lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ 	]*\).*$,\1,p' $lang`
+	  this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ 	]*\).*$,\1,p' $lang`
+	  this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ 	]*\).*$,\1,p' $lang`
+	  build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ 	]*\).*$,\1,p' $lang`
 	  if test "x$lang_alias" = x
 	  then
 		echo "$lang doesn't set \$language." 1>&2
@@ -868,6 +813,20 @@
   fi
 fi
 
+# Deconfigure all subdirectories, in case we are changing the
+# configuration from one where a subdirectory is supported to one where it
+# is not.
+if test -z "${norecursion}" && test -n "${configdirs}" ; then
+  for i in `echo ${configdirs} | sed -e s/target-//g` ; do
+    rm -f $i/Makefile
+  done
+fi
+if test -z "${norecursion}" && test -n "${target_configdirs}" ; then
+  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
+    rm -f ${target_subdir}/$i/Makefile
+  done
+fi
+
 # Quietly strip out all directories which aren't configurable in this tree.
 # This relies on all configurable subdirectories being autoconfiscated, which
 # is now the case.
@@ -999,18 +958,16 @@
 
 # Work in distributions that contain no compiler tools, like Autoconf.
 tentative_cc=""
-host_makefile_frag=/dev/null
 if test -d ${srcdir}/config ; then
 case "${host}" in
   m68k-hp-hpux*)
     # Avoid "too much defining" errors from HPUX compiler.
     tentative_cc="cc -Wp,-H256000"
-    # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
-    # If it's HP/UX ar, this should be harmless.
-    RANLIB="ar ts"
+    host_makefile_frag="config/mh-hp300"
     ;;
   m68k-apollo-sysv*)
     tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
+    host_makefile_frag="config/mh-apollo68"
     ;;
   m68k-apollo-bsd*)
     #None of the Apollo compilers can compile gas or binutils.  The preprocessor
@@ -1019,8 +976,8 @@
     # the apollo compiler" (the preferred version of GCC could be called cc,
     # or whatever), but I'm not sure leaving CC as cc is any better...
     #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
-    # Used to have BISON=yacc.
     tentative_cc=gcc
+    host_makefile_frag="config/mh-a68bsd"
     ;;
   m88k-dg-dgux*)
     tentative_cc="gcc -Wall -ansi -D__using_DGUX"
@@ -1032,6 +989,7 @@
     host_makefile_frag="config/mh-cxux"
     ;;
   m88k-motorola-sysv*)
+    host_makefile_frag="config/mh-delta88"
     ;;
   mips*-dec-ultrix*)
     tentative_cc="cc -Wf,-XNg1000"
@@ -1042,12 +1000,21 @@
     tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
     host_makefile_frag="config/mh-necv4"
     ;;
+  mips*-sgi-irix6*)
+    host_makefile_frag="config/mh-irix6"
+    ;;
+  mips*-sgi-irix5*)
+    host_makefile_frag="config/mh-irix5"
+    ;;
   mips*-sgi-irix4*)
     # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
     # environment.  Also bump switch table size so that cp-parse will
     # compile.  Bump string length limit so linker builds.
     tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
     ;;
+  mips*-sgi-irix3*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
   mips*-*-sysv4*)
     host_makefile_frag="config/mh-sysv4"
     ;;
@@ -1065,23 +1032,26 @@
     # This is not part of CFLAGS because perhaps not all C compilers have this
     # option.
     tentative_cc="cc -systype sysv"
+    host_makefile_frag="config/mh-riscos"
     ;;
   i370-ibm-opened*)
     tentative_cc="c89"
+    host_makefile_frag="config/mh-openedition"
     ;;
-  i[[3456]]86-*-sysv5*)
+  i[3456]86-*-sysv5*)
     host_makefile_frag="config/mh-sysv5"
     ;;
-  i[[3456]]86-*-dgux*)
+  i[3456]86-*-dgux*)
     tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     host_makefile_frag="config/mh-dgux386"
     ;;
-  i[[3456]]86-ncr-sysv4.3*)
+  i[3456]86-ncr-sysv4.3*)
     # The MetaWare compiler will generate a copyright message unless you
     # turn it off by adding the -Hnocopyr flag.
     tentative_cc="cc -Hnocopyr"
+    host_makefile_frag="config/mh-ncrsvr43"
     ;;
-  i[[3456]]86-ncr-sysv4*)
+  i[3456]86-ncr-sysv4*)
     # for an NCR 3000 (i486/SVR4) system.
     # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
     # This compiler not only emits obnoxious copyright messages every time
@@ -1090,21 +1060,28 @@
     tentative_cc="/usr/ccs/ATT/cc"
     host_makefile_frag="config/mh-ncr3000"
     ;;
-  i[[3456]]86-*-sco3.2v5*)
+  i[3456]86-*-sco3.2v5*)
+    host_makefile_frag="config/mh-sysv"
     ;;
-  i[[3456]]86-*-sco*)
+  i[3456]86-*-sco*)
     # The native C compiler botches some simple uses of const.  Unfortunately,
     # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
     tentative_cc="cc -Dconst="
     host_makefile_frag="config/mh-sco"
     ;;
-  i[[3456]]86-*-udk*)
+  i[3456]86-*-udk*)
     host_makefile_frag="config/mh-sysv5"
     ;;
-  i[[3456]]86-*-solaris2*)
+  i[3456]86-*-isc*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
+  i[3456]86-*-solaris2*)
     host_makefile_frag="config/mh-sysv4"
     ;;
-  i[[3456]]86-*-msdosdjgpp*)
+  i[3456]86-*-aix*)
+    host_makefile_frag="config/mh-aix386"
+    ;;
+  i[3456]86-*-msdosdjgpp*)
     host_makefile_frag="config/mh-djgpp"
     ;;
   *-cygwin*)
@@ -1128,11 +1105,17 @@
     # without overflowing the jump tables (-J says to use a 32 bit table)
     tentative_cc="cc -J"
     ;;
+  *-hp-hpux[78]*)
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hpux8"
+    ;;
   *-hp-hpux*)
     tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hpux"
     ;;
   *-*-hiux*)
     tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hpux"
     ;;
   rs6000-*-lynxos*)
     # /bin/cc is less than useful for our purposes.  Always use GCC
@@ -1146,15 +1129,25 @@
   *-*-sysv4*)
     host_makefile_frag="config/mh-sysv4"
     ;;
+  *-*-sysv*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
 esac
 fi
 
+rm -f mh-frag
+if test -n "${host_makefile_frag}" ; then
+  for f in ${host_makefile_frag}
+  do
+    cat ${srcdir}/$f >> mh-frag
+  done
+  host_makefile_frag=mh-frag
+fi
+
 extra_arflags_for_target=
 extra_nmflags_for_target=
-extra_ranlibflags_for_target=
-target_makefile_frag=/dev/null
 case "${target}" in
-  i[[3456]]86-*-netware*)
+  i[3456]86-*-netware*)
     target_makefile_frag="config/mt-netware"
     ;;
   powerpc-*-netware*)
@@ -1163,23 +1156,19 @@
   *-*-linux*)
     target_makefile_frag="config/mt-linux"
     ;;
-  *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
+  *-*-aix4.[3456789]* | *-*-aix[56789].*)
     # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 
     # commands to handle both 32-bit and 64-bit objects.  These flags are
     # harmless if we're using GNU nm or ar.
     extra_arflags_for_target=" -X32_64"
     extra_nmflags_for_target=" -B -X32_64"
     ;;
-  *-*-darwin*)
-    # ranlib from Darwin requires the -c flag to look at common symbols.
-    extra_ranlibflags_for_target=" -c"
-    ;;
   mips*-*-pe | sh*-*-pe | *arm-wince-pe)
     target_makefile_frag="config/mt-wince"
     ;;
 esac
 
-alphaieee_frag=/dev/null
+alphaieee_frag=
 case $target in
   alpha*-*-*)
     # This just makes sure to use the -mieee option to build target libs.
@@ -1191,7 +1180,7 @@
 # If --enable-target-optspace always use -Os instead of -O2 to build
 # the target libraries, similarly if it is not specified, use -Os
 # on selected platforms.
-ospace_frag=/dev/null
+ospace_frag=
 case "${enable_target_optspace}:${target}" in
   yes:*)
     ospace_frag="config/mt-ospace"
@@ -1209,6 +1198,15 @@
     ;;
 esac
 
+rm -f mt-frag
+if test -n "${target_makefile_frag}${alphaieee_frag}${ospace_frag}" ; then
+  for f in ${target_makefile_frag} ${alphaieee_frag} ${ospace_frag}
+  do
+    cat ${srcdir}/$f >> mt-frag
+  done
+  target_makefile_frag=mt-frag
+fi
+
 # Set with_gnu_as and with_gnu_ld as appropriate.
 #
 # This is done by determining whether or not the appropriate directory
@@ -1285,6 +1283,9 @@
     ;;
 esac
 
+# This will go away when we start subconfigures from the Makefile.
+withoptions="${withoptions} ${extra_host_args}"
+
 # If we aren't going to be using gcc, see if we can extract a definition
 # of CC from the fragment.
 # Actually, use the 'pre-extracted' version above.
@@ -1304,284 +1305,7 @@
   fi
 fi
 
-# Some systems (e.g., one of the i386-aix systems the gas testers are
-# using) don't handle "\$" correctly, so don't use it here.
-tooldir='$(exec_prefix)'/${target_alias}
-build_tooldir=${tooldir}
-
-# Generate a default definition for YACC.  This is used if the makefile can't
-# locate bison or byacc in objdir.
-
-for prog in 'bison -y' byacc yacc
-do
-  set dummy $prog; tmp=$2
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$tmp; then
-      DEFAULT_YACC="$prog"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  test -n "$DEFAULT_YACC" && break
-done
-
-# Generate a default definition for M4.  This is used if the makefile can't
-# locate m4 in objdir.
-
-for prog in gm4 gnum4 m4
-do
-  set dummy $prog; tmp=$2
-  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$tmp; then
-      DEFAULT_M4="$prog"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  test -n "$DEFAULT_M4" && break
-done
-
-# Generate a default definition for LEX.  This is used if the makefile can't
-# locate flex in objdir.
-
-for prog in flex lex
-do
-  set dummy $prog; tmp=$2
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$tmp; then
-      DEFAULT_LEX="$prog"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  test -n "$DEFAULT_LEX" && break
-done
-
-if test "${build}" != "${host}" ; then
-  # If we are doing a Canadian Cross, in which the host and build systems
-  # are not the same, we set reasonable default values for the tools.
-
-  BISON=${BISON-bison}
-  CC=${CC-${host_alias}-gcc}
-  CFLAGS=${CFLAGS-"-g -O2"}
-  CXX=${CXX-${host_alias}-c++}
-  CXXFLAGS=${CXXFLAGS-"-g -O2"}
-  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
-  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
-  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
-  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
-  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
-  BUILD_PREFIX=${build_alias}-
-  BUILD_PREFIX_1=${build_alias}-
-  MAKEINFO=${MAKEINFO-makeinfo}
-
-  if test -z "${YACC}" ; then
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/bison; then
-	YACC="bison -y"
-	break
-      fi
-      if test -f $dir/byacc; then
-	YACC=byacc
-	break
-      fi
-      if test -f $dir/yacc; then
-	YACC=yacc
-	break
-      fi
-    done
-    IFS="$save_ifs"
-    if test -z "${YACC}" ; then
-      YACC="bison -y"
-    fi
-  fi
-
-  if test -z "${LEX}" ; then
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/flex; then
-	LEX=flex
-	break
-      fi
-      if test -f $dir/lex; then
-	LEX=lex
-	break
-      fi
-    done
-    IFS="$save_ifs"
-    LEX=${LEX-flex}
-  fi
-
-else
-  # Set reasonable default values for some tools even if not Canadian.
-  # Of course, these are different reasonable default values, originally
-  # specified directly in the Makefile.
-  # We don't export, so that autoconf can do its job.
-  # Note that all these settings are above the fragment inclusion point
-  # in Makefile.in, so can still be overridden by fragments.
-  # This is all going to change when we autoconfiscate...
-
-  BISON="\$(USUAL_BISON)"
-  CC_FOR_BUILD="\$(CC)"
-  GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
-  BUILD_PREFIX=
-  BUILD_PREFIX_1=loser-
-  MAKEINFO="\$(USUAL_MAKEINFO)"
-  LEX="\$(USUAL_LEX)"
-  YACC="\$(USUAL_YACC)"
-
-  # If CC is still not set, try to get gcc.
-  cc_prog_is_gcc=
-  if test -z "${CC}" ; then
-    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-    for dir in $PATH; do
-      test -z "$dir" && dir=.
-      if test -f $dir/gcc; then
-	CC="gcc"
-	cc_prog_is_gcc=yes
-	echo 'void f(){}' > conftest.c
-	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
-	  CFLAGS=${CFLAGS-"-g -O2"}
-	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
-	else
-	  CFLAGS=${CFLAGS-"-O2"}
-	  CXXFLAGS=${CXXFLAGS-"-O2"}
-	fi
-	rm -f conftest*
-	break
-      fi
-    done
-    IFS="$save_ifs"
-    CC=${CC-cc}
-  else
-    # Determine if we are using gcc.
-    cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-    if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
-      cc_prog_is_gcc=yes
-    fi
-    rm -f conftest.c
-    if test -z "${CFLAGS}"; then
-      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
-      # is set to a version of gcc.
-      if test "$cc_prog_is_gcc" = yes; then
-	echo 'void f(){}' > conftest.c
-	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
-	  CFLAGS=${CFLAGS-"-g -O2"}
-	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
-	else
-	  CFLAGS=${CFLAGS-"-O2"}
-	  CXXFLAGS=${CXXFLAGS-"-O2"}
-	fi
-	rm -f conftest*
-      fi
-    fi
-  fi
-
-  # We must set the default linker to the linker used by gcc for the correct
-  # operation of libtool.  If LD is not defined and we are using gcc, try to
-  # set the LD default to the ld used by gcc.
-  if test -z "$LD"; then
-    if test "$cc_prog_is_gcc" = yes; then
-      case $build in
-      *-*-mingw*)
-	gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
-      *)
-	gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
-      esac
-      case $gcc_prog_ld in
-      # Accept absolute paths.
-      [[\\/]* | [A-Za-z]:[\\/]*)]
-        LD="$gcc_prog_ld" ;;
-      esac
-    fi
-  fi
-
-  CXX=${CXX-"c++"}
-  CFLAGS=${CFLAGS-"-g"}
-  CXXFLAGS=${CXXFLAGS-"-g -O2"}
-fi
-
-# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
-# Set up the list of links to be made.
-# ${links} is the list of link names, and ${files} is the list of names to link to.
-
-# Make the links.
-configlinks="${links}"
-if test -r ./config.status  ; then
-  mv -f ./config.status ./config.back
-fi
-while test -n "${files}" ; do
-  # set file to car of files, files to cdr of files
-  set ${files}; file=$1; shift; files=$*
-  set ${links}; link=$1; shift; links=$*
-
-  if test ! -r ${srcdir}/${file} ; then
-    if test ! -r ${file} ; then
-      echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
-      echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
-      exit 1
-    else
-      srcfile=${file}
-    fi
-  else
-    srcfile=${srcdir}/${file}
-  fi
-
-  ${remove} -f ${link}
-  # Make a symlink if possible, otherwise try a hard link
-  if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
-    true
-  else
-    # We need to re-remove the file because Lynx leaves a 
-    # very strange directory there when it fails an NFS symlink.
-    ${remove} -r -f ${link}
-    ${hard_link} ${srcfile} ${link}
-  fi
-  if test ! -r ${link} ; then
-    echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
-    exit 1
-  fi
-
-  echo "Linked \"${link}\" to \"${srcfile}\"."
-done
-
-# Create a .gdbinit file which runs the one in srcdir
-# and tells GDB to look there for source files.
-
-if test -r ${srcdir}/.gdbinit ; then
-  case ${srcdir} in
-    .) ;;
-    *) cat > ./.gdbinit <<EOF
-# ${NO_EDIT}
-dir ${srcdir}
-dir .
-source ${srcdir}/.gdbinit
-EOF
-    ;;
-  esac
-fi
-
-# record if we want runtime library stuff installed in libsubdir.
-# Blank means no.
-if test -z "${enable_version_specific_runtime_libs}"; then
-  enable_version_specific_runtime_libs=no
-fi
+# post-target:
 
 # Make sure that the compiler is able to generate an executable.  If it
 # can't, we are probably in trouble.  We don't care whether we can run the
@@ -1609,7 +1333,7 @@
 case "${host}" in
   sparc-sun-solaris2*)
       CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
-      if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then
+      if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
           could_use=
           test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
           if test -d /opt/cygnus/bin ; then
@@ -1640,12 +1364,18 @@
 else
   SET_LIB_PATH=
 fi
+sed -e "s/@SET_LIB_PATH@/${SET_LIB_PATH}/" Makefile > Makefile.tem
+rm -f Makefile
+mv -f Makefile.tem Makefile
 
 
 case "${host}" in
   *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
   *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
 esac
+sed -e "s/@RPATH_ENVVAR@/${RPATH_ENVVAR}/" Makefile > Makefile.tem
+rm -f Makefile
+mv -f Makefile.tem Makefile
 
 # Record target_configdirs and the configure arguments for target and
 # build configuration in Makefile.
@@ -1654,24 +1384,13 @@
 # This is the final value for target_configdirs.  configdirs already
 # has its final value.  It's time to create some lists of valid targets.
 
-# While at that, we remove Makefiles if we were started for recursive
-# configuration, such that the top-level Makefile reconfigures them,
-# like we used to do when configure itself was recursive.
-
 all_build_modules=
 configure_build_modules=
 # Only make build modules if build != host.
 # This should be done more generally, but at the moment it doesn't matter.
 if test ${host_alias} != ${build_alias} ; then
-  for module in libiberty ; do
-    all_build_modules=all-build-${module}
-    configure_build_modules=configure-build-${module}
-    if test -z "${no_recursion}" \
-       && test -f ${build_subdir}/${module}/Makefile; then
-      echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
-      rm -f ${build_subdir}/${module}/Makefile
-    fi
-  done
+  all_build_modules=all-build-libiberty
+  configure_build_modules=configure-build-libiberty
 fi
 
 all_host_modules=
@@ -1683,11 +1402,6 @@
   check_host_modules="${check_host_modules} check-${module}"
   install_host_modules="${install_host_modules} install-${module}"
   configure_host_modules="${configure_host_modules} configure-${module}"
-  if test -z "${no_recursion}" \
-     && test -f ${module}/Makefile; then
-    echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
-    rm -f ${module}/Makefile
-  fi
 done
 install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
 
@@ -1700,11 +1414,6 @@
   check_target_modules="${check_target_modules} check-target-${module}"
   install_target_modules="${install_target_modules} install-target-${module}"
   configure_target_modules="${configure_target_modules} configure-target-${module}"
-  if test -z "${no_recursion}" \
-     && test -f ${target_subdir}/${module}/Makefile; then
-    echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
-    rm -f ${target_subdir}/${module}/Makefile
-  fi
 done
 
 # Determine whether gdb needs tk/tcl or not.
@@ -1714,113 +1423,90 @@
 # so we should be able to put the 'maybe's in unconditionally and
 # leave out the maybe dependencies when enable_gdbtk is false.  I'm not
 # 100% sure that that's safe though.
-
-gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
 case "$enable_gdbtk" in
   no)
     GDB_TK="" ;;
-  yes)
-    GDB_TK="${gdb_tk}" ;;
   *)
-    # Only add the dependency on gdbtk when GDBtk is part of the gdb
-    # distro.  Eventually someone will fix this and move Insight, nee
-    # gdbtk to a separate directory.
-    if test -d ${srcdir}/gdb/gdbtk ; then
-      GDB_TK="${gdb_tk}"
-    else
-      GDB_TK=""
-    fi
-    ;;
+    GDB_TK="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui" ;;
 esac
 
 # Create the 'maybe dependencies'.  This uses a temporary file.
 rm -f maybedep.tmp
-echo '# maybedep.tmp' > maybedep.tmp
 for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
 	${install_host_modules} ${install_target_modules} \
 	${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
 	; do
   echo "maybe-${item}: ${item}" >> maybedep.tmp
 done
-maybe_dependencies=maybedep.tmp
-AC_SUBST_FILE(maybe_dependencies)
+sed -e '/@maybe_dependencies@/r maybedep.tmp' \
+    -e 's/@maybe_dependencies@//' Makefile > Makefile.tem
+rm -f Makefile
+mv -f Makefile.tem Makefile
+rm -f maybedep.tmp
 
 # Create the serialization dependencies.  This uses a temporary file.
 
-AC_ARG_ENABLE([serial-configure],
-[  --disable-serial-[{host,target,build}-]configure
-                          Don't force sequential configuration of
-                          sub-packages for the host, target or build
-			  machine, or of any sub-packages at all])
-
 # These force 'configure's to be done one at a time, to avoid problems
 # with contention over a shared config.cache.
 rm -f serdep.tmp
-echo '# serdep.tmp' > serdep.tmp
 olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_build_configure}" = xno ||
 for item in ${build_configdirs} ; do
   case ${olditem} in
     "") ;;
-    *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
+    *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
   esac
   olditem=${item}
 done
 olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_host_configure}" = xno ||
 for item in ${configdirs} ; do
   case ${olditem} in
     "") ;;
-    *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
+    *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;;
   esac
   olditem=${item}
 done
 olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_target_configure}" = xno ||
 for item in ${target_configdirs} ; do
   case ${olditem} in
     "") ;;
-    *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
+    *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
   esac
   olditem=${item}
 done
-serialization_dependencies=serdep.tmp
-AC_SUBST_FILE(serialization_dependencies)
+sed -e '/@serialization_dependencies@/r serdep.tmp' \
+    -e 's/@serialization_dependencies@//' Makefile > Makefile.tem
+rm -f Makefile
+mv -f Makefile.tem Makefile
+rm -f serdep.tmp
 
-# Base args.  Strip norecursion, cache-file, srcdir, host, build,
-# target and nonopt.  These are the ones we might not want to pass
-# down to subconfigures.
-baseargs=`echo " ${ac_configure_args} " | \
-	sed -e 's/ --no[[^ ]]* / /' \
-	    -e 's/ --cache[[a-z-]]*=[[^ ]]* / /' \
-	    -e 's/ --sr[[a-z-]]*=[[^ ]]* / /' \
-	    -e 's/ --ho[[a-z-]]*=[[^ ]]* / /' \
-	    -e 's/ --bu[[a-z-]]*=[[^ ]]* / /' \
-	    -e 's/ --ta[[a-z-]]*=[[^ ]]* / /' \
-	    -e 's/ [[^ -][^ ]*] / /' \
-	    -e 's/^ *//;s/ *$//'`
+# Base args.  Strip norecursion, cache-file, srcdir, host, build, target.
+# These are the ones we might not want to pass down to subconfigures.
+baseargs=`echo "${arguments}" | \
+	sed -e 's/--no[^ 	]*//' \
+	    -e 's/--cache[a-z-]*=[^ 	]*//' \
+	    -e 's/--sr[a-z-]*=[^ 	]*//' \
+	    -e 's/--ho[a-z-]*=[^ 	]*//' \
+	    -e 's/--bu[a-z-]*=[^ 	]*//' \
+	    -e 's/--ta[a-z-]*=[^ 	]*//'`
 
 # For the build-side libraries, we just need to pretend we're native,
 # and not use the same cache file.  Multilibs are neither needed nor
 # desired.
-build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
+buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
 
 # For host modules, accept cache file option, or specification as blank.
 case "${cache_file}" in
 "") # empty
   cache_file_option="" ;;
-/* | [[A-Za-z]]:[[\\/]]* ) # absolute path
+/* | [A-Za-z]:[\\/]* ) # absolute path
   cache_file_option="--cache-file=${cache_file}" ;;
 *) # relative path
   cache_file_option="--cache-file=../${cache_file}" ;;
 esac
 
-host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+hostargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
 
-target_configargs=${baseargs}
+targargs=${baseargs}
 
 # Passing a --with-cross-host argument lets the target libraries know
 # whether they are being built with a cross-compiler or being built
@@ -1828,22 +1514,22 @@
 # sorts of decisions they want to make on this basis.  Please consider
 # this option to be deprecated.  FIXME.
 if test x${is_cross_compiler} = xyes ; then
-  target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
+  targargs="--with-cross-host=${host_alias} ${targargs}"
 fi
 
 # Default to --enable-multilib.
 if test x${enable_multilib} = x ; then
-  target_configargs="--enable-multilib ${target_configargs}"
+  targargs="--enable-multilib ${targargs}"
 fi
 
 # Pass --with-newlib if appropriate.  Note that target_configdirs has
 # changed from the earlier setting of with_newlib.
 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
-  target_configargs="--with-newlib ${target_configargs}"
+  targargs="--with-newlib ${targargs}"
 fi
 
 # Pass the appropriate --host, --build, and --cache-file arguments.
-target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
+targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
 
 # provide a proper gxx_include_dir.
 # Note, if you change the default, make sure to fix both here and in
@@ -1877,7 +1563,7 @@
 FLAGS_FOR_TARGET=
 case " $target_configdirs " in
  *" newlib "*)
-  case " $target_configargs " in
+  case " $targargs " in
   *" --with-newlib "*)
    case "$target" in
    *-cygwin*)
@@ -1908,7 +1594,7 @@
    fi
 
    case "${target}-${is_cross_compiler}" in
-   i[[3456]]86-*-linux*-no)
+   i[3456]86-*-linux*-no)
       # Here host == target, so we don't need to build gcc,
       # so we don't want to discard standard headers.
       FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
@@ -1947,9 +1633,14 @@
 elif test "$host" = "$target"; then
   CC_FOR_TARGET='$(CC)'
 else
-  CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
+  CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
 fi
-CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+# On Canadian crosses, configure reads CC_FOR_TARGET from Makefile,
+# if Makefile exists.  Prevent $(FLAGS_FOR_TARGET) from being duplicated.
+case $CC_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
 
 if test "x${GCJ_FOR_TARGET+set}" = xset; then
   :
@@ -1958,9 +1649,12 @@
 elif test "$host" = "$target"; then
   GCJ_FOR_TARGET='gcj'
 else
-  GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
+  GCJ_FOR_TARGET=`echo gcj | sed -e 's/x/x/' ${program_transform_name}`
 fi
-GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+case $GCJ_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
 
 # Don't use libstdc++-v3's flags to configure/build itself.
 libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
@@ -1980,14 +1674,20 @@
   CXX_FOR_TARGET='$(CXX)'
   RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
 else
-  CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
+  CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
   RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
 fi
-CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
-RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
+case $CXX_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
+case $RAW_CXX_FOR_TARGET in
+*' $(FLAGS_FOR_TARGET)') ;;
+*) RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
+esac
 
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
-qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
+qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
+qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
 
 # We want to defer the evaluation of `cmd`s and shell variables in
 # CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
@@ -1995,131 +1695,48 @@
 # quotes, but we still have to duplicate `$'s so that shell variables
 # can be expanded by the nested make as shell variables, not as make
 # macros.
-qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
-qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
+qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
+qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
 
-# Wrap CC_FOR_TARGET and friends, for certain types of builds.
-CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
-GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
-CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
-RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
+# BASE_CC_FOR_TARGET is the actual program file of CC_FOR_TARGET,
+# for use in dependencies.  Replace $$r with a relative
+# path if it's present.
+set dummy $CC_FOR_TARGET; cc_for_target_first_word=$2
+BASE_CC_FOR_TARGET=`echo "$cc_for_target_first_word" | sed -e 's,[$][$]r,.,'`
 
-# Makefile fragments.
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-target_makefile_frag=${srcdir}/${target_makefile_frag}
-alphaieee_frag=${srcdir}/${alphaieee_frag}
-ospace_frag=${srcdir}/${ospace_frag}
-AC_SUBST_FILE(host_makefile_frag)
-AC_SUBST_FILE(target_makefile_frag)
-AC_SUBST_FILE(alphaieee_frag)
-AC_SUBST_FILE(ospace_frag)
+sedtemp=sed.$$
+cat >$sedtemp <<EOF
+s%@GDB_TK@%${GDB_TK}%
+s%@configure_build_modules@%${configure_build_modules}%
+s%@all_build_modules@%${all_build_modules}%
+s%@configure_host_modules@%${configure_host_modules}%
+s%@all_host_modules@%${all_host_modules}%
+s%@check_host_modules@%${check_host_modules}%
+s%@install_host_modules@%${install_host_modules}%
+s%@install_host_modules_nogcc@%${install_host_modules_nogcc}%
+s%@configure_target_modules@%${configure_target_modules}%
+s%@all_target_modules@%${all_target_modules}%
+s%@check_target_modules@%${check_target_modules}%
+s%@install_target_modules@%${install_target_modules}%
+s:@target_configdirs@:${target_configdirs}:
+s%@target_configargs@%${targargs}%
+s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%
+s%@CC_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
+s%@BASE_CC_FOR_TARGET@%${BASE_CC_FOR_TARGET}%
+s%@GCJ_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
+s%@CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
+s%@RAW_CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}%
+s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
+s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}%
+s%@target_subdir@%${target_subdir}%
+s%@build_subdir@%${build_subdir}%
+s%@build_configargs@%${buildargs}%
+s%@gxx_include_dir@%${gxx_include_dir}%
+s%@libstdcxx_incdir@%${libstdcxx_incdir}%
+s%@host_configargs@%${hostargs}%
+EOF
+sed -f $sedtemp Makefile > Makefile.tem
+rm -f Makefile $sedtemp
+mv -f Makefile.tem Makefile
 
-# Miscellanea: directories, flags, etc.
-AC_SUBST(SET_LIB_PATH)
-AC_SUBST(RPATH_ENVVAR)
-AC_SUBST(BUILD_PREFIX)
-AC_SUBST(BUILD_PREFIX_1)
-AC_SUBST(configlinks)
-AC_SUBST(enable_shared)
-AC_SUBST(enable_threads)
-AC_SUBST(enable_version_specific_runtime_libs)
-AC_SUBST(gcc_version_trigger)
-AC_SUBST(gcc_version)
-AC_SUBST(tooldir)
-AC_SUBST(build_tooldir)
-AC_SUBST(GDB_TK)
-AC_SUBST(gxx_include_dir)
-AC_SUBST(libstdcxx_incdir)
-
-# Build module lists & subconfigure args.
-AC_SUBST(build_subdir)
-AC_SUBST(build_configargs)
-AC_SUBST(configure_build_modules)
-AC_SUBST(all_build_modules)
-
-# Host module lists & subconfigure args.
-AC_SUBST(host_configargs)
-AC_SUBST(configdirs)
-AC_SUBST(configure_host_modules)
-AC_SUBST(all_host_modules)
-AC_SUBST(check_host_modules)
-AC_SUBST(install_host_modules)
-AC_SUBST(install_host_modules_nogcc)
-
-# Target module lists & subconfigure args.
-AC_SUBST(target_subdir)
-AC_SUBST(target_configargs)
-AC_SUBST(target_configdirs)
-AC_SUBST(configure_target_modules)
-AC_SUBST(all_target_modules)
-AC_SUBST(check_target_modules)
-AC_SUBST(install_target_modules)
-
-# Build tools.
-AC_SUBST(BISON)
-AC_SUBST(CC_FOR_BUILD)
-AC_SUBST(LEX)
-AC_SUBST(MAKEINFO)
-AC_SUBST(YACC)
-AC_SUBST(config_shell)
-
-# Host tools.
-NCN_STRICT_CHECK_TOOL(AR, ar)
-NCN_STRICT_CHECK_TOOL(AS, as)
-NCN_STRICT_CHECK_TOOL(DLLTOOL, dlltool)
-NCN_STRICT_CHECK_TOOL(LD, ld)
-NCN_STRICT_CHECK_TOOL(NM, nm)
-NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :)
-NCN_STRICT_CHECK_TOOL(WINDRES, windres)
-NCN_STRICT_CHECK_TOOL(OBJCOPY, objcopy)
-NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump)
-AC_SUBST(CC)
-AC_SUBST(CXX)
-AC_SUBST(CFLAGS)
-AC_SUBST(CXXFLAGS)
-AC_SUBST(DEFAULT_YACC)
-AC_SUBST(DEFAULT_LEX)
-AC_SUBST(DEFAULT_M4)
-
-# Target tools.
-NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
-NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
-NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
-NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
-NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
-NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
-NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
-
-AC_SUBST(GCC_FOR_TARGET)
-AC_SUBST(FLAGS_FOR_TARGET)
-AC_SUBST(CC_FOR_TARGET)
-AC_SUBST(GCJ_FOR_TARGET)
-AC_SUBST(CXX_FOR_TARGET)
-AC_SUBST(RAW_CXX_FOR_TARGET)
-AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
-AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
-
-# Fix up target tools.
-if test "x${build}" = "x${host}" ; then
-  # In this case, the newly built tools can and should be used,
-  # so we override the results of the autoconf tests.
-  # This should really only happen when the tools are actually being built,
-  # but that's a further refinement.  The new build scheme, where
-  # tools are built into a structure paralleling where they're installed,
-  # should also eliminate all of this cleanly.
-  AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
-  AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
-  DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
-  LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
-  NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
-  RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
-  WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
-fi
-# Certain tools may need extra flags.
-AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
-RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
-NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
-
-AC_OUTPUT(Makefile)
+#
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 9a1a67d..debe735 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,8 +1,3 @@
-2003-01-02  H.J. Lu <hjl@gnu.org>
-
-	* Makefile.in (DESTDIR): New.
-	(install-info): Use it.
-
 2002-06-11  Nick Clifton  <nickc@cambridge.redhat.com>
 
 	Import the following patches from the FSF GCC sources:
diff --git a/etc/Makefile.in b/etc/Makefile.in
index 63f7738..2bc3457 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -2,8 +2,6 @@
 # Makefile.in for etc
 #
 
-DESTDIR		=
-
 prefix 		= @prefix@
 exec_prefix 	= @exec_prefix@
 
@@ -70,17 +68,17 @@
 	done
 
 install-info: info
-	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
+	$(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
 	if test ! -f standards.info; then cd $(srcdir); fi; \
 	if test -f standards.info; then \
 	  for i in standards.info*; do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
+	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
 	  done; \
 	fi
 	if test ! -f configure.info; then cd $(srcdir); fi; \
 	if test -f configure.info; then \
 	  for i in configure.info*; do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
+	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
 	  done; \
 	fi
 
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 11ca878..14514fd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,857 +1,3 @@
-2003-01-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* lin-lwp.c (child_wait): Ignore exit statuses for processes other
-	than inferior_ptid.
-	(lin_lwp_wait): Ignore exit statuses for unknown LWPs.
-
-2003-01-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* frame.h (frame_obstack_zalloc): Replace frame_obstack_alloc.
-	Update comments.
-	* frame.c (frame_obstack_zalloc): Replace frame_obstack_alloc.
-	(frame_saved_regs_zalloc): Update.
-	(frame_saved_regs_register_unwind): Update.
-	(create_new_frame): Update.
-	(get_prev_frame): Update.
-	(frame_extra_info_zalloc): Update.
-	(deprecated_get_frame_saved_regs): Update.
-	* dwarf2cfi.c (cfi_init_extra_frame_info): Update.
-	* cris-tdep.c: Update comment.
-
-	* somsolib.h: Fix function indentation.
-	* disasm.c, buildsym.c, buildsym.h: Eliminate PTR.
-	* gnu-v2-abi.c, f-typeprint.c, x86-64-linux-tdep.c: Eliminate STREQ.
-	* demangle.c, ax-gdb.c, c-valprint.c: Eliminate STREQ.
-	* alpha-osf1-tdep.c, corefile.c: Eliminate STREQ.
-	* somsolib.c, inftarg.c: Remove assignment in if conditional.
-
-	* infrun.c (follow_fork): Use ISO C definition.
-	* expprint.c (print_subexp): Use xfree instead of free.
-	* charset.c: Include "gdb_string.h" instead of <string.h>.
-	(register_iconv_charsets): Use ISO C definition.
-	(host_charset, target_charset): Ditto.
-	* Makefile.in (charset.o): Update dependencies.
-	(mi-cmd-env.o): Update dependencies.
-
-2003-01-08  Andrew Cagney  <cagney@redhat.com>
-
-	* alpha-linux-tdep.c (alpha_linux_sigcontext_addr): Use
-	get_frame_base.
-
-2003-01-08  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdb_mbuild.sh: Add --keep option.  When specified, keep the
-	build directories.  Save edited gdb output in Mbuild.log.  If a
-	build fails, remove any final GDB executable.
-
-2003-01-08  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdb_mbuild.sh: Edit the output of `maint print architecture'
-	replacing hex constants with function names and stripping leading
-	file name directory prefixes.
-
-2003-01-08  Andrew Cagney  <cagney@redhat.com>
-
-	* gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and
-	get_frame_base.
-
-2003-01-08  David Carlton  <carlton@math.stanford.edu>
-
-	* linespec.c (decode_line_1): Move code into decode_variable.
-	(decode_variable): New function.
-
-2003-01-08  Andrew Cagney  <ac131313@redhat.com>
-
-	* mn10300-tdep.c (analyze_dummy_frame): Fix typo.
-
-2003-01-08  Andrew Cagney  <cagney@redhat.com>
-
-	* cris-tdep.c (cris_frame_init_saved_regs): Use
-	get_frame_saved_regs and SIZEOF_FRAME_SAVED_REGS when copying a
-	saved_regs buffer.
-	* sh-tdep.c (sh_nofp_frame_init_saved_regs): Ditto.
-	(sh64_nofp_frame_init_saved_regs): Ditto.
-	(sh_fp_frame_init_saved_regs): Ditto.
-	* arm-tdep.c: Use deprecated_set_frame_saved_regs_hack.
-	* mips-tdep.c (mips_init_extra_frame_info): Ditto.
-	* mcore-tdep.c (analyze_dummy_frame): Ditto.
-	* mn10300-tdep.c (analyze_dummy_frame): Ditto.
-
-2003-01-08  Daniel Jacobowitz  <drow@mvista.com>
-
-	* minsyms.c (lookup_minimal_symbol): Update comment.
-	(lookup_minimal_symbol_text): Update comment.  Use the hash table.
-	(lookup_minimal_symbol_solib_trampoline): Likewise.
-
-2003-01-08  Andrew Cagney  <cagney@redhat.com>
-
-	* d10v-tdep.c (d10v_init_extra_frame_info): Use
-	frame_relative_level.
-
-	* alpha-tdep.c: Use get_frame_extra_info.
-	* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
-	* h8300-tdep.c, ia64-tdep.c, m68hc11-tdep.c, mcore-tdep.c: Ditto.
-	* mips-tdep.c, mn10300-tdep.c, s390-tdep.c, sh-tdep.c: Ditto.
-	* sparc-tdep.c, xstormy16-tdep.c: Ditto.
-
-	* alpha-tdep.c: Use get_next_frame.
-	* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
-	* dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto.
-	* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Ditto.
-	* mips-tdep.c, mn10200-tdep.c, mn10300-tdep.c: Ditto.
-	* ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto.
-	* v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto.
-	* xstormy16-tdep.c: Ditto.
-	
-2003-01-07  Andrew Cagney  <cagney@redhat.com>
-
-	* alpha-tdep.c: Use get_frame_base.
-	* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
-	* h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto.
-	* m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
-	* mn10300-tdep.c, ns32k-tdep.c, s390-tdep.c, sh-tdep.c: Ditto.
-	* sparc-tdep.c, v850-tdep.c, vax-tdep.c: Ditto.
-	* x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
-	* config/h8500/tm-h8500.h, config/mn10200/tm-mn10200.h: Ditto.
-	* config/sparc/tm-sparc.h: Ditto.
-	
-2003-01-07  Andrew Cagney  <cagney@redhat.com>
-
-	* frame.c (deprecated_get_frame_context): New function.
-	(deprecated_set_frame_context): New function.
-	* frame.h (deprecated_get_frame_context): Declare.
-	(deprecated_set_frame_context): Declare.
-	* dwarf2cfi.c (UNWIND_CONTEXT): Use deprecated_get_frame_context.
-	(cfi_init_extra_frame_info): Use deprecated_set_frame_context.
-	
-2003-01-07  Andrew Cagney  <cagney@redhat.com>
-
-	* frame.c (deprecated_set_frame_next_hack): New function.
-	(deprecated_set_frame_prev_hack): New function.
-	* frame.h (deprecated_set_frame_next_hack): Declare.
-	(deprecated_set_frame_prev_hack): Declare.
-	* mcore-tdep.c (analyze_dummy_frame): Use
-	deprecated_set_frame_next_hack and deprecated_set_frame_prev_hack.
-	* mn10300-tdep.c (analyze_dummy_frame): Ditto.
-
-2003-01-07  David Carlton  <carlton@math.stanford.edu>
-
-	* linespec.c (decode_line_1): Move code into decode_dollar.
-	(decode_dollar): New function.
-
-2003-01-07  Andrew Cagney  <cagney@redhat.com>
-
-	* arm-tdep.c (arm_init_extra_frame_info): Use
-	deprecated_update_frame_base_hack.
-	* xstormy16-tdep.c (xstormy16_scan_prologue): Ditto.
-	* mn10300-tdep.c (analyze_dummy_frame): Ditto.
-	(fix_frame_pointer): Ditto.
-	(mn10300_analyze_prologue): Ditto.
-
-2003-01-07  Andrew Cagney  <cagney@redhat.com>
-
-	* xstormy16-tdep.c (xstormy16_init_extra_frame_info): Allocate
-	extra_info using frame_extra_info_zalloc.
-	* sparc-tdep.c (sparc_init_extra_frame_info): Ditto.
-	* sh-tdep.c (sh_init_extra_frame_info): Ditto.
-	(sh64_init_extra_frame_info): Ditto.
-	* mn10300-tdep.c (mn10300_init_extra_frame_info): Ditto.
-	* s390-tdep.c (s390_init_extra_frame_info): Ditto.
-	* mips-tdep.c (mips_init_extra_frame_info): Ditto.
-	* mcore-tdep.c (mcore_init_extra_frame_info): Ditto.
-	* frv-tdep.c (frv_init_extra_frame_info): Ditto.
-	* m68hc11-tdep.c (m68hc11_init_extra_frame_info): Ditto.
-	* ia64-tdep.c (ia64_init_extra_frame_info): Ditto.
-	* h8300-tdep.c (h8300_init_extra_frame_info): Ditto.
-	* d10v-tdep.c (d10v_init_extra_frame_info): Ditto.
-	* cris-tdep.c (cris_init_extra_frame_info): Ditto.
-	* arm-tdep.c (arm_init_extra_frame_info): Ditto.
-	* alpha-tdep.c (alpha_init_extra_frame_info): Ditto.
-
-	* mn10300-tdep.c (analyze_dummy_frame): Use
-	deprecated_set_frame_extra_info_hack.
-	* mcore-tdep.c (analyze_dummy_frame): Ditto.
-
-2003-01-07  J. Brobecker  <brobecker@gnat.com>
-
-	* mdebugread.c (parse_symbol): Skip stProc entries which storage
-	class is not scText. These do not define "real" procedures.
-	(parse_partial_symbols): Likewise.
-
-2003-01-06  Michael Snyder  <msnyder@redhat.com>
-
-	* lin-lwp.c: Added or elaborated on "debug lin-lwp" info.
-
-2003-01-06  Andrew Cagney  <ac131313@redhat.com>
-
-	* frame.h (deprecated_frame_xmalloc_with_cleanup): Declare.
-	* frame.c (deprecated_frame_xmalloc_with_cleanup): New function.
-	* arm-tdep.c (arm_frame_chain): Allocate caller_fi using
-	deprecated_frame_xmalloc_with_cleanup.
-	* m32r-tdep.c (m32r_virtual_frame_pointer): Allocate `fi' using
-	deprecated_frame_xmalloc.
-	* mcore-tdep.c (analyze_dummy_frame): Ditto for dummy.
-	* mn10200-tdep.c (mn10200_frame_chain): Ditto for dummy_frame.
-
-2003-01-06  Andrew Cagney  <cagney@redhat.com>
-
-	* x86-64-linux-tdep.c: Include "osabi.h".
-	* Makefile.in (x86-64-linux-tdep.o): Update dependencies.
-
-	* sparc-tdep.c (sparc_dump_tdep): Fix typo, match -> mach.
-
-2003-01-06  Andrew Cagney  <cagney@redhat.com>
-
-	* MAINTAINERS (Target Instruction Set Architectures): Update
-	arm-elf.  Can be built with -Werror, has been multiarched.
-
-	* value.h (unpack_long): Make buffer parameter constant.
-	(unpack_double, unpack_pointer, unpack_field_as_long): Ditto.
-	* scm-lang.h (scm_parse): Ditto.
-	* defs.h (extract_typed_address, extract_address): Ditto.
-	(extract_long_unsigned_integer): Ditto.
-	* inferior.h (unsigned_pointer_to_address): Ditto.
-	(signed_pointer_to_address): Ditto.
-	* gdbarch.sh (POINTER_TO_ADDRESS): Ditto.
-	* gdbarch.h, gdbarch.c: Regenerate.
-	* findvar.c (extract_long_unsigned_integer): Update.
-	(extract_address): Update.
-	(extract_typed_address): Update.
-	(unsigned_pointer_to_address): Update.
-	* values.c (unpack_long): Update.
-	(unpack_double): Update.
-	(unpack_pointer): Update.
-	(unpack_field_as_long): Update.
-	* d10v-tdep.c (d10v_pointer_to_address): Update.
-	* avr-tdep.c (avr_pointer_to_address): Update.
-	* scm-lang.c (scm_unpack): Update.
-	* findvar.c (signed_pointer_to_address): Update.
-
-2003-01-06  Michal Ludvig  <mludvig@suse.cz>
-
-	* x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore 
-	since it is in i386-tdep.c.
-
-2003-01-06  J. Brobecker  <brobecker@gnat.com>
-
-	* alpha-tdep.c (alpha_gdbarch_init): Fix a small compilation
-	failure introduced in the previous change.
-
-2003-01-05  Michael Chastain  <mec@shout.net>
-
-	* README: Remove references to deleted remote-*.c files:
-	remote-adapt.c, remote-eb.c, remote-mm.c, remote-nindy.c,
-	remote-nrom.c, remote-os9k.c, remote-udi.c.
-
-2003-01-05  Mark Kettenis  <kettenis@gnu.org>
-
-	* i386-tdep.c (i386_get_longjmp_target): Make usable on x86-64.
-	* x86-64-tdep.c (x86_64_init_abi): Remove FIXME about
-	i386_get_longjmp_target.
-
-2003-01-05  Andrew Cagney  <ac131313@redhat.com>
-
-	* arm-tdep.c (prologue_cache): Change to a pointer.
-	(_initialize_arm_tdep): Allocate prologue_cache.
-	(check_prologue_cache): Update.
-	(save_prologue_cache): Update.
-	(arm_gdbarch_init): Update.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* stabsread.c (update_method_name_from_physname): Call complaint()
-	instead of error.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* arm-tdep.c (arm_frame_chain_valid):  Remove unnecessary test.
-	* d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests.
-	* hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test.
-
-	* blockframe.c: Include "gdbcmd.h" and "command.h".
-	(backtrace_below_main): New variable.
-	(file_frame_chain_valid, func_frame_chain_valid)
-	(nonnull_frame_chain_valid, generic_file_frame_chain_valid)
-	(generic_func_frame_chain_valid): Remove functions.
-	(frame_chain_valid, do_flush_frames_sfunc): New functions.
-	(_initialize_blockframe): New function.
-	* Makefile.in (blockframe.o): Update dependencies.
-	* frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME
-	comment.  Call frame_chain_valid ().
-	* frame.h: Remove old prototypes.  Add prototype for
-	frame_chain_valid and update comments to match.
-	* gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function.
-	Remove old comment.
-	* gdbarch.h: Regenerated.
-	* gdbarch.c: Regenerated.
-
-	* alpha-tdep.c (alpha_gdbarch_init): Don't call
-	set_gdbarch_frame_chain_valid.
-	* avr-tdep.c (avr_gdbarch_init): Likewise.
-	* cris-tdep.c (cris_gdbarch_init): Likewise.
-	* frv-tdep.c (frv_gdbarch_init): Likewise.
-	* h8300-tdep.c (h8300_gdbarch_init): Likewise.
-	* i386-tdep.c (i386_svr4_init_abi): Likewise.
-	(i386_nw_init_abi): Likewise.
-	(i386_gdbarch_init): Likewise.
-	* ia64-tdep.c (ia64_gdbarch_init): Likewise.
-	* m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
-	* m68k-tdep.c (m68k_gdbarch_init): Likewise.
-	* mcore-tdep.c (mcore_gdbarch_init): Likewise.
-	* mips-tdep.c (mips_gdbarch_init): Likewise.
-	* mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
-	* ns32k-tdep.c (ns32k_gdbarch_init): Likewise.
-	* ppcnbsd-tdep.c (ppcnbsd_init_abi): Likewise.
-	* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
-	* s390-tdep.c (s390_gdbarch_init): Likewise.
-	* sh-tdep.c (sh_gdbarch_init): Likewise.
-	* sparc-tdep.c (sparc_gdbarch_init): Likewise.
-	* v850-tdep.c (v850_gdbarch_init): Likewise.
-	* vax-tdep.c (vax_gdbarch_init): Likewise.
-	* x86-64-tdep.c (x86_64_init_abi): Likewise.
-
-	* config/m32r/tm-m32r.h (FRAME_CHAIN_VALID): Don't define.
-	* config/m68k/tm-apollo68b.h (FRAME_CHAIN_VALID): Likewise.
-	* config/m68k/tm-m68kv4.h (FRAME_CHAIN_VALID): Likewise.
-	* config/m68k/tm-monitor.h (FRAME_CHAIN_VALID): Likewise.
-	* config/m68k/tm-os68k.h (FRAME_CHAIN_VALID): Likewise.
-	* config/m68k/tm-vx68.h (FRAME_CHAIN_VALID): Likewise.
-	* config/mn10200/tm-mn10200.h (FRAME_CHAIN_VALID): Likewise.
-	* config/sparc/tm-sparclite.h (FRAME_CHAIN_VALID): Likewise.
-
-2002-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* Makefile.in (acconfig_h): Remove incorrect macro.
-	(config_h): Define.
-	(osabi.o): Update dependencies.
-	* configure.tgt: Set gdb_osabi based on target triplet.
-	* configure.in: Define GDB_OSABI_DEFAULT based on gdb_osabi.
-	* configure: Regenerated.
-	* config.in: Regenerated.
-	* osabi.c: Include "arch-utils.h", "gdbcmd.h", and "command.h".
-	(GDB_OSABI_DEFAULT): Define if not already defined.
-	(user_osabi_state, user_selected_osabi, gdb_osabi_available_names)
-	(set_osabi_string): New variables.
-	(gdbarch_register_osabi): Add new OS ABI to
-	gdb_osabi_available_names.
-	(gdbarch_lookup_osabi): Honor specified and default OS ABIs.
-	(set_osabi, show_osabi): New functions.
-	(_initialize_gdb_osabi): Add "set osabi" and "show osabi" commands.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* arch-utils.c (gdbarch_info_init): Set osabi to
-	GDB_OSABI_UNINITIALIZED.
-	* gdbarch.sh: Add osabi to struct gdbarch and to struct
-	gdbarch_info.  Include "osabi.h" in gdbarch.c.  Check osabi
-	in gdbarch_list_lookup_by_info and in gdbarch_update_p.
-	* gdbarch.c: Regenerated.
-	* gdbarch.h: Regenerated.
-	* osabi.c (gdbarch_lookup_osabi): Return GDB_OSABI_UNINITIALIZED if
-	there's no BFD.
-	(gdbarch_init_osabi): Remove osabi argument; use info.osabi.
-	* osabi.h (enum gdb_osabi): Move to defs.h.
-	(gdbarch_init_osabi): Update prototype.
-	* defs.h (enum gdb_osabi): Moved here.
-	* Makefile.in: Update dependencies.
-
-	* alpha-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove osabi member.
-	* alpha-tdep.c: Include "osabi.h".
-	(alpha_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	iterate over arches.  Update call to gdbarch_init_osabi.
-	(alpha_dump_tdep): Don't dump osabi.
-	* alpha-linux-tdep.c: Include "osabi.h".
-	* alpha-osf1-tdep.c: Include "osabi.h".
-	* alphafbsd-tdep.c: Include "osabi.h".
-	* alphanbsd-tdep.c: Include "osabi.h".
-
-	* arm-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove osabi member.
-	* arm-tdep.c: Include "osabi.h".
-	(arm_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	iterate over arches.  Update call to gdbarch_init_osabi.
-	(arm_dump_tdep): Don't dump osabi.
-	* arm-linux-tdep.c: Include "osabi.h".
-	* armnbsd-tdep.c: Include "osabi.h".
-
-	* hppa-tdep.c (hppa_gdbarch_init): Don't call gdbarch_lookup_osabi.
-	Update call to gdbarch_init_osabi.
-
-	* i386-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove osabi member.
-	* i386-tdep.c: Include "osabi.h".
-	(i386_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	iterate over arches.  Update call to gdbarch_init_osabi.
-	(i386_dump_tdep): Don't dump osabi.
-	* i386-linux-tdep.c: Include "osabi.h".
-	* i386-sol2-tdep.c: Include "osabi.h".
-	* i386bsd-tdep.c: Include "osabi.h".
-	* i386gnu-tdep.c: Include "osabi.h".
-	* i386ly-tdep.c: Include "osabi.h".
-	* i386nbsd-tdep.c: Include "osabi.h".
-	* i386obsd-tdep.c: Include "osabi.h".
-
-	* mips-tdep.c (struct gdbarch_tdep): Remove osabi member.
-	(mips_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	check osabi when iterating over arches.  Update call to
-	gdbarch_init_osabi.
-	(mips_dump_tdep): Don't dump osabi.
-
-	* ns32k-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove.
-	* ns32k-tdep.c (ns32k_gdbarch_init): Don't call
-	gdbarch_lookup_osabi.  Don't iterate over arches.  Don't
-	allocate tdep.  Update call to gdbarch_init_osabi.
-	(ns32k_dump_tdep): Remove.
-	(_initialize_ns32k_tdep): Update call to gdbarch_register.
-	* ns32knbsd-tdep.c: Include "osabi.h".
-
-	* ppc-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove osabi member.
-	* rs6000-tdep.c: Include "osabi.h".
-	(rs6000_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't check
-	osabi when iterating over arches.  Update call to
-	gdbarch_init_osabi.
-	(rs6000_dump_tdep): Don't dump osabi.
-	* ppc-linux-tdep.c: Include "osabi.h".
-	* ppcnbsd-tdep.c: Include "osabi.h".
-
-	* sh-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove osabi member.
-	* sh-tdep.c: Include "osabi.h".
-	(sh_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	iterate over arches.  Update call to gdbarch_init_osabi.
-	(sh_dump_tdep): Don't dump osabi.
-	* shnbsd-tdep.c: Include "osabi.h".
-
-	* sparc-tdep.c: Include "osabi.h".
-	(sparc_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	iterate over arches.  Update call to gdbarch_init_osabi.
-	(sparc_dump_tdep): Don't dump osabi.  Do dump the rest of the
-	tdep structure.
-
-	* vax-tdep.h: Don't include "osabi.h".
-	(struct gdbarch_tdep): Remove.
-	* vax-tdep.c: Include "osabi.h".
-	(vax_gdbarch_init): Don't call gdbarch_lookup_osabi.  Don't
-	iterate over arches.  Don't allocate tdep.  Update call
-	to gdbarch_init_osabi.
-	(vax_dump_tdep): Remove.
-	(_initialize_vax_tdep): Update call to gdbarch_register.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* breakpoint.c (insert_breakpoints): Skip disabled breakpoints
-	entirely.
-	(breakpoint_re_set_one): Don't fetch the value for a disabled
-	watchpoint.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* buildsym.h (processing_hp_compilation): Remove obsolete variable.
-	* gdbarch.sh Remove include of "value.h" in gdbarch.h.
-	(COERCE_FLOAT_TO_DOUBLE): Remove.
-	* gdbarch.c: Regenerate.
-	* gdbarch.h: Regenerate.
-	* Makefile.in: Remove value_h from gdbarch_h.
-	* valops.c (coerce_float_to_double): New variable.
-	(default_coerce_float_to_double): Remove.
-	(standard_coerce_float_to_double): Remove.
-	(value_arg_coerce): Use coerce_float_to_double.
-	(_initialize_valops): Add "set coerce-float-to-double".
-	* value.h (default_coerce_float_to_double): Remove prototype.
-	(standard_coerce_float_to_double): Remove prototype.
-
-	* hpread.c (hpread_process_one_debug_symbol): Mark C++ functions as
-	prototyped.
-	* mdebugread.c (parse_symbol): Likewise.
-	* stabsread.c (define_symbol): Mark all functions as prototyped.
-
-	* hppa-tdep.c (hppa_coerce_float_to_double): Remove.
-	* alpha-tdep.c (alpha_gdbarch_init): Remove call to
-	set_gdbarch_coerce_float_to_double.
-	* arm-tdep.c (arm_gdbarch_init): Likewise.
-	* frv-tdep.c (frv_gdbarch_init): Likewise.
-	* h8300-tdep.c (h8300_gdbarch_init): Likewise (commented out).
-	* i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.
-	* mips-tdep.c (mips_gdbarch_init): Likewise.
-	(mips_coerce_float_to_double): Remove.
-	* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
-	(rs6000_coerce_float_to_double): Remove.
-	* s390-tdep.c (s390_gdbarch_init): Likewise.
-	* sh-tdep.c (sh_gdbarch_init): Likewise.
-	(sh_coerce_float_to_double): Remove.
-	* sparc-tdep.c (sparc_gdbarch_init): Likewise.
-	(sparc_coerce_float_to_double): Remove.
-	* v850-tdep.c (v850_gdbarch_init): Likewise.
-	* xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
-	* config/m32r/tm-m32r.h (COERCE_FLOAT_TO_DOUBLE): Remove.
-	* config/pa/tm-hppa.h: (COERCE_FLOAT_TO_DOUBLE): Remove.
-	(hppa_coerce_float_to_double): Remove prototype.
-	* config/sparc/tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Remove.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* regformats/reg-m68k.dat: Remove fpcode and fpflags.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	Suggested by Stewart Brown <sb24@avaya.com>:
-	* c-typeprint.c (c_type_print_varspec_prefix): Pass value of show
-	in recursive calls.  Handle TYPE_CODE_TYPEDEF.
-	(c_type_print_varspec_suffix): Likewise.
-
-2003-01-04  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Don't set and AC_SUBST SUBDIRS.
-	* configure: Regenerated.
-
-	* configure.in: Remove code dealing with shared libraries.
-	* Makefile.in: Remove HLDFLAGS and HLDENV.
-	* configure: Regenerated.
-
-2003-01-04  Andrew Cagney  <ac131313@redhat.com>
-
-	* frame.c (deprecated_frame_xmalloc): New function.
-	(deprecated_set_frame_saved_regs_hack): New function.
-	(deprecated_set_frame_extra_info_hack): New function.
-	* frame.h (deprecated_frame_xmalloc): Declare.
-	(deprecated_set_frame_saved_regs_hack): Declare.
-	(deprecated_set_frame_extra_info_hack): Declare.
-
-2003-01-04  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Move code that provides the --enable-gdbtk option
-	right after the code that handles the --enable-tui option, and
-	polish it somewhat.
-	* configure: Regenerated.
-
-	* configure.in: Call AC_GNU_SOURCE.  Check for pread64 using
-	AC_CHECK_FUNCS and remove the old check for pread64.
-	* acinclude.m4 (AC_GNU_SOURCE): New macro.
-	* acconfig.h (_GNU_SOURCE): Add.
-	(HAVE_PREAD64): Remove.
-	* configure, aclocal.m4, config.in: Regenerated.
-
-2003-01-03  Andrew Cagney  <ac131313@redhat.com>
-
-	* alpha-tdep.c: Use get_frame_saved_regs.
-	* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
-	* h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto.
-	* m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Ditto.
-	* ns32k-tdep.c, s390-tdep.c, sh-tdep.c, v850-tdep.c: Ditto.
-	* vax-tdep.c, xstormy16-tdep.c: Ditto.
-
-2003-01-03  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Remove all use of the SUBDIRS variable; add
-	directories using the AC_CONFIG_SUBDIRS macro instead.  Polish
-	code providing the --enable-multi-ice option, and move it right in
-	front of the code that checks whether gdbserver is supported.
-	Polish that too.
-	* configure: Regenerated.
-	* Makefile.in (SUBDIRS): Substitute @subdirs@ instead of
-	@SUBDIRS@.
-
-2003-01-03  Andrew Cagney  <cagney@redhat.com>
-
-	* alpha-tdep.c: Use deprecated_update_frame_base_hack.
-	* avr-tdep.c, cris-tdep.c: Ditto.
-	* mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
-	* sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
-	
-2003-01-03  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Remove --enable-netrom option.
-	* configure: Regenerated.
-
-2003-01-03  Mark Kettenis  <kettenis@gnu.org>
-
-	* cli/cli-decode.h: Don't include "gdb_regex.h"; provide a forward
-	declaration for `struct re_pattern_buffer' instead.
-	* Makefile.in (cli_decode_h): Remove $(gdb_regex_h).
-
-2003-01-03  J. Brobecker  <brobecker@gnat.com>
-
-	* mdebugread.c (parse_symbol): Count until the stEnd matching
-	the structure name.
-
-2003-01-02  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Remove --with-cpu option.
-	subscripts.  Remove evil changequotes here.
-	* acconfig.h (TARGET_CPU_DEFAULT): Remove.
-	* config.in, configure: Regenerated.
-	
-	* acconfig.h (DEFAULT_BFD_ARCH, DEFAULT_BFD_VEC): Remove.
-	* configure.in: Cleanup section that sources GDB and BFD configure
-	subscripts.  Remove evil changequotes here.
-	* config.in, configure: Regenerated.
-
-2003-01-02  Andrew Cagney  <ac131313@redhat.com>
-
-	* arm-tdep.c: Use get_frame_pc and deprecated_update_frame_pc_hack
-	frame accessor methods.
-	* alpha-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
-	* dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto.
-	* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
-	* mn10200-tdep.c, mn10300-tdep.c, ns32k-tdep.c: Ditto.
-	* s390-tdep.c, sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
-	* vax-tdep.c, x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
-	* z8k-tdep.c: Ditto.
-	
-2003-01-02  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Remove UI_OUT configuration code.
-	* ada-lang.c: Update assuming UI_OUT is always true.
-	* Makefile.in (UIOUT_CFLAGS): Remove.
-	* configure: Regenerated.
-	* TODO: Remove blurb about elimination of -DUI_OUT.
-
-	* configure.in: Move code that provides the --enable-gdbcli,
-	--enable-gdbmi options right before the code that handles the
-	--enable-tui option.  Polish a bit.
-	* configure: Regenerated.
-
-	* configure.in: Rewrite check for GNU regex and the
-	--without-included regex option, and move it into the "Checks for
-	library functions" section.  This makes us use the system regex
-	again by default on systems with version 2 of the GNU C library.
-	This was apparently broken.
-	* gdb_regex.h [!USE_INCLUDED_REGEX] (_REGEX_RE_COMP): Define.
-	* acconfig.h (USE_INCLUDED_REGEX): Remove.
-	* config.in, configure: Regenerated.
-
-	* configure.in: Move code that provides the --enable-tui option
-	before the "Checks for libraries" section.  Polish the code
-	somewhat and set need_curses to yes if we build the TUI.  Rewrite
-	code that looks for a library providing termcap functionality to
-	match more closely what's done in the Readline library, and move
-	it into to the "Checks for libraries" section.
-	* configure: Regenerated.
-	* Makefile.in (TERMCAP): Remove variable.
-	* config/i386/go32.mh (TERMCAP): Remove variable.
-
-2003-01-02  Andrew Cagney  <ac131313@redhat.com>
-
-	* MAINTAINERS: Mention gdb_mbuild.sh.
-	* gdb_mbuild.sh: Rewrite.
-
-2003-01-02  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Fix typo in last change.
-	* config.in, configure: Regenerated.
-
-2003-01-02  Andrew Cagney  <ac131313@redhat.com>
-
-	* valarith.c (value_binop): Delete obsolete code and comments.
-	* configure.host: Ditto.
-	* buildsym.h (make_blockvector): Ditto.
-	* buildsym.c (make_blockvector): Ditto.
-	* defs.h (enum language): Ditto.
-	(chill_demangle): Ditto.
-	* elfread.c (elf_symtab_read): Ditto.
-	* dwarfread.c (CHILL_PRODUCER): Ditto.
-	(set_cu_language): Ditto.
-	(handle_producer): Ditto.
-	* expprint.c (print_subexp): Ditto.
-	* gdbtypes.c (chill_varying_type): Ditto.
-	* gdbtypes.h (builtin_type_chill_bool): Ditto.
-	(builtin_type_chill_char, builtin_type_chill_long): Ditto.
-	(builtin_type_chill_ulong, builtin_type_chill_real): Ditto.
-	(chill_varying_type): Ditto.
-	* language.h (_LANG_chill): Ditto.
-	* language.c (binop_result_type, integral_type): Ditto.
-	(character_type, string_type, structured_type): Ditto.
-	(lang_bool_type, binop_type_check): Ditto.
-	* stabsread.h (os9k_stabs): Ditto.
-	* stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto.
-	(define_symbol, read_type, read_struct_fields): Ditto.
-	(read_array_type, read_enum_type, read_huge_number): Ditto.
-	(read_range_type, start_stabs): Ditto.
-	* symfile.c (init_filename_language_table): Ditto.
-	(add_psymbol_with_dem_name_to_list): Ditto.
-	* symtab.c (symbol_init_language_specific): Ditto.
-	(symbol_init_demangled_name, symbol_demangled_name): Ditto.
-	* symtab.h (struct general_symbol_info): Ditto.
-	(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
-	* typeprint.c (typedef_print): Ditto.
-	* utils.c (fprintf_symbol_filtered): Ditto.
-	* valops.c (value_cast, search_struct_field, value_slice): Delete
-	obsolete code.
-	(varying_to_slice): Delete function.
-	* value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents.
-	(varying_to_slice): Delete declaration.
-	* MAINTAINERS: Update.
-
-2003-01-02  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Reorganize "Checks for library functions section"
-	a bit.  Remove check for `btowc' and `isascii' functions.
-	* configure: Regenerated.
-
-	* acconfig.h (_MSE_INT_H): Remove.
-	* configure.in: Create "Checks for header files" section, and move
-	appropriate tests there.  Don't check for objlist.h, wchar.h,
-	wctype.h and asm/debugreg.h.  Rewrite Solaris 2.[78] <curses.h>
-	misdetection fix.  Also add "Checks for types", "Checks for
-	compiler characteristics" and "Checks for library functions"
-	sections.
-	* config.in, configure: Regenerated.
-
-	* configure.in: Create "Checks for programs" section, and move
-	appropriate tests there.
-
-2003-01-01  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Create "Checks for libraries" section, and move
-	appropriate tests there.  Cleanup check for wctype in libw.  Use
-	AC_SEARCH_LIBS to see whether we need libsocket.
-	* configure: Regenerated.
-
-2002-12-31  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Remove bzero and bcopy from call to AC_CHECK_FUNCS.
-	* config.in, configure: Regenerated.
-
-2002-12-31  Mark Kettenis  <kettenis@gnu.org>
-
-	* gdb_dirent.h: Cleanup and update code to match the example in
-	the Autoconf manual.
-	* configure.in: Call AC_HEADER_DIRENT.  Remove dirent.h,
-	sys/ndir.h, sys/dir.h and ndir.h from call to AC_CHECK_HEADERS.
-	* configure: Regenerated.
-
-2002-12-30  Adam Fedor  <fedor@gnu.org>
-
-	* objc-exp.y (parse_number): Cast sscanf arguments to proper type.
-	(yylex): Initialize c to avoid uninitialized warning.
-
-2002-12-29  Kazu Hirata  <kazu@cs.umass.edu>
-
-	* doc/fdl.texi: Revert the last change.
-
-2002-12-29  Mark Kettenis  <kettenis@gnu.org>
-
-	* tracepoint.c (ISATTY): Removed.
-
-2002-12-26  J. Brobecker  <brobecker@gnat.com>
-
-	Continuing work to convert the hppa targets to multiarch partil.
-
-	* hppa-tdep.c: Add some missing forward declarations.
-	(frameless_function_invocation): Prefix the function name
-	by "hppa_" to avoid polluting the namespace.  Update all calls
-	to use the new function name.
-	(saved_pc_after_call): Ditto.
-	(init_extra_frame_info): Ditto.
-	(frame_chain): Ditto.
-	(push_dummy_frame): Ditto.
-	(target_read_pc): Ditto.
-	(target_write_pc): Ditto.
-	(in_solib_call_trampoline): Ditto.
-	(in_solib_return_trampoline): Ditto.
-	(skip_trampoline_code): Ditto.
-	(hppa_read_fp): New function, renamed from target_read_fp.
-	(hppa_target_read_fp): New function, using hppa_read_fp.
-	This function conforms to the function profile for the
-	READ_FP gdbarch method.
-	(hppa_extract_struct_value_address): New function, extracted
-	from the definition of the DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
-	macro.
-	(hppa_frame_num_args): New function.
-	(hppa_gdbarch_init): Setup the gdbarch vector for the hppa target.
-
-	* config/pa/tm-hppa.h: Wrap around all gdbarch-eligible macros
-	inside "#if !GDB_MULTI_ARCH ... #endif" conditional, in preparation
-	for the switch to multiarch partial.
-	Update some of the macros definitions to match some changes
-	described above in the name of the function they are calling.
-	(PUSH_DUMMY_FRAME): Add a FIXME explaining why this macro will
-	not be straightforward to convert. Do now wrap it inside
-	"#if !... #endif" to remember that this macro has still not
-	been taken care of.
-	(FIX_CALL_DUMMY): Likewise.
-
-2002-12-26  J. Brobecker  <brobecker@gnat.com>
-
-	Continuing work to convert the hppa targets to multiarch partial.
-
-	* hppa-tdep.c (hppa_register_raw_size): New function replacing
-	the body of macro REGISTER_RAW_SIZE.
-	* hppa-hpux-tdep.c: Add new functions replacing macro bodies from
-	config/pa/tm-hppah.h. These functions will be used to initialize
-	the gdbarch structure.
-	(hppa_hpux_pc_in_sigtramp): New function.
-	(hppa_hpux_frame_saved_pc_in_sigtramp): New function.
-	(hppa_hpux_frame_base_before_sigtramp): New function.
-	(hppa_hpux_frame_find_saved_regs_in_sigtramp): New function.
-	Add gdbcore.h #include.
-	* config/pa/tm-hppa.h (REGISTER_RAW_SIZE): Change the definition
-	of this gdbarch-eligible macro to a call to the new associated
-	function.
-	* config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Likewise.
-	(FRAME_SAVED_PC_IN_SIGTRAMP): Change the definition of this macro
-	into a call to the new associated function.
-	(FRAME_BASE_BEFORE_SIGTRAMP): Likewise.
-	(FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Likewise.
-	* Makefile.in (hppa-hpux-tdep.o): Add dependency on gdbcore.h.
-
-2002-12-24  David Carlton  <carlton@math.stanford.edu>
-
-	* config/sparc/tm-sparc.h: Delete duplicate definition of
-	DEPRECATED_PC_IN_CALL_DUMMY.
-
-2002-12-24  Kevin Buettner  <kevinb@redhat.com>
-
-	* Makefile.in (mips-linux-tdep.o): Add $(mips_tdep_h) and
-	$(gdb_assert_h).
-	* configure.tgt: Recognize mips64*-*-linux*.
-	* mips-linux-tdep.c (mips-tdep.h, gdb_assert.h): Include.
-	(supply_32_bit_reg): New function.
-	(supply_gregset): Call supply_32bit_reg() instead of supply_register().
-	(fill_gregset): Use regcache_collect() instead of
-	deprecated_registers[].
-	(register_addr): Change name to mips_linux_register_addr().
-	(MIPS64_ELF_NGREG, MIPS64_ELF_NFPREG, MIPS64_FPR_BASE, MIPS64_PC)
-	(MIPS64_CAUSE, MIPS64_BADVADDR, MIPS64_MMHI, MIPS64_MMLO)
-	(MIPS64_FPC_CSR, MIPS64_FPC_EIR, MIPS64_EF_REG0, MIPS64_EF_REG31)
-	(MIPS64_EF_LO, MIPS64_EF_HI, MIPS64_EF_CP0_EPC, MIPS64_EF_CP0_BADVADDR)
-	(MIPS64_EF_CP0_STATUS, MIPS64_EF_CP0_CAUSE, MIPS64_EF_SIZE)
-	(MIPS64_LINUX_JB_PC): New defines.
-	(mips64_elf_greg_t, mips64_elf_gregset_t, mips64_elf_fpreg_t)
-	(mips64_elf_fpregset_t): New typedefs.
-	(mips64_linux_get_longhmp_target, mips64_supply_gregset)
-	(mips64_fill_gregset, mips64_supply_fpregset, mips64_fill_fpregset)
-	(mips64_linux_register_addr, set_mips_linux_register_addr)
-	(register_addr, mips64_linux_svr4_fetch_link_map_offsets):
-	(init_register_addr_data)
-	New functions.
-	(fetch_core_registers): Add support for core file formats with 64-bit
-	registers.
-	(mips_linux_init_abi): Distinguish o32, n32, and n64 ABIs.
-	(register_addr_data): New static global variable.
-	(_initialize_mips_linux_tdep): Initialize register_addr_data.  Invoke
-	gdbarch_register_osabi() for each MIPS machine.
-	* config/mips/linux64.mt: New file.
-	* config/mips/tm-linux64.h: New file.
-
-2002-12-23  Adam Fedor  <fedor@gnu.org>
-
-	* maint.c (maintenance_demangle): Add switch to demangle
-	ObjC language symbols as well.
-
-2002-12-23  Adam Fedor  <fedor@gnu.org>
-
-	* objc-lang.c (lookup_objc_class, lookup_child_selector): Remove 
-	last argument from complaint function call.
-
-2002-12-23  Kevin Buettner  <kevinb@redhat.com>
-
-	* exec.c (print_section_info): Add FIXME comments regarding format
-	string choices.
-
 2002-12-23  Daniel Jacobowitz  <drow@mvista.com>
 
 	* config/pa/nm-hppab.h: Delete duplicate CANNOT_STORE_REGISTER decl.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index b6a7655..257b718 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -60,12 +60,13 @@
 	alpha		--target=alpha-elf ,-Werror
 			Maintenance only
 
-	arc		Deleted.
+	arc		(--target=arc-elf OBSOLETE)
 
-	arm		--target=arm-elf ,-Werror
+	arm		--target=arm-elf ,
 			Fernando Nasser		fnasser@redhat.com
 			Scott Bambrough		scottb@netwinder.org
 			Richard Earnshaw	rearnsha@arm.com
+			Not multi-arch
 
 	avr		--target=avr ,-Werror
 			Theodore A. Roth	troth@verinet.com
@@ -76,9 +77,9 @@
 	d10v		--target=d10v-elf ,-Werror
 			Maintenance only
 
-	d30v		Deleted.
+	d30v		(--target=d30v-elf OBSOLETE)
 
-	fr30		Deleted.
+	fr30		(--target=fr30-elf OBSOLETE)
 
 	h8300		--target=h8300hms ,-Werror
 			Maintenance only
@@ -90,7 +91,7 @@
 	i386		--target=i386-elf ,-Werror
 			Mark Kettenis           kettenis@gnu.org
 
-	i960		Deleted.
+	i960		(--target=i960-coff OBSOLETE)
 
 	ia64		--target=ia64-linux-gnu ,-Werror
 			(--target=ia64-elf broken)
@@ -106,7 +107,7 @@
 	m68k		--target=m68k-elf ,-Werror
 			Maintenance only
 
-	m88k		Deleted.
+	m88k		(--target=m88k OBSOLETE)
 
 	mcore		--target=mcore-elf ,-Werror
 			Maintenance only
@@ -171,8 +172,40 @@
 the obvious fix rule) to ``maintenance only'' targets.  The change
 shall be sanity checked by compiling with one of the listed targets.
 
-The Bourne shell script gdb_mbuild.sh can be used to rebuild all the
-above targets.
+The Bourne shell script:
+
+cat MAINTAINERS | tr -s '[\t]' '[ ]' | sed -n '
+/^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
+s/^.*--target=//
+s/).*$//
+h
+:loop
+  g
+  /^[^ ]*,/ !b end
+  s/,[^ ]*//
+  p
+  g
+  s/^[^,]*,//
+  h
+b loop
+:end
+p
+'
+
+can be used to generate a list of buildable targets.  The list
+containing values for the configure options --target=,
+--enable-gdb-build-warnings= and optionally
+--enable-sim-build-warnings vis:
+
+	arc-elf ,-Werror
+	...
+	m68hc11-elf ,-Werror ,
+	...
+	hppa1.1-hp-proelf broken
+	...
+
+While the ``broken'' targets are included in the listing, the are not
+expected to build.
 
 
 Host/Native:
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 057405f..f4c72bf 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1,5 +1,5 @@
 # Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 # This file is part of GDB.
 
@@ -64,6 +64,10 @@
 WINDRES = @WINDRES@
 MIG = @MIG@
 
+# Flags that describe where you can find the termcap library.
+# This can be overridden in the host Makefile fragment file.
+TERMCAP = @TERM_LIB@
+
 # If you are compiling with GCC, make sure that either 1) You have the
 # fixed include files where GCC can reach them, or 2) You use the
 # -traditional flag.  Otherwise the ioctl calls in inflow.c
@@ -109,6 +113,9 @@
 MMALLOC = @MMALLOC@
 MMALLOC_CFLAGS = @MMALLOC_CFLAGS@
 
+# Configured by the --with-uiout option to configure.
+UIOUT_CFLAGS = @UIOUT_CFLAGS@
+
 # Where is the BFD library?  Typically in ../bfd.
 BFD_DIR = ../bfd
 BFD = $(BFD_DIR)/libbfd.a
@@ -334,7 +341,7 @@
 	$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
 	$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
 	$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
-	$(INTL_CFLAGS) $(ENABLE_CFLAGS) \
+	$(INTL_CFLAGS) $(ENABLE_CFLAGS) $(UIOUT_CFLAGS) \
 	$(GDB_WARN_CFLAGS)
 INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
 
@@ -345,22 +352,24 @@
 # Profiling options need to go here to work.
 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
 # and have it work; that's why CFLAGS is here.
-INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS)
+INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) @HLDFLAGS@
+HLDENV = @HLDENV@
 
 # If your system is missing alloca(), or, more likely, it's there but
 # it doesn't work, then refer to libiberty.
 
 # Libraries and corresponding dependencies for compiling gdb.
 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
+# TERMCAP comes after readline, since readline depends on it.
 # MMALLOC comes after anything else that might want an allocation function.
 # LIBIBERTY appears twice on purpose.
 # If you have the Cygnus libraries installed,
 # you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS='
 INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \
-	$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+	$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
 	-lmmalloc -lintl -liberty
 CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \
-	$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+	$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
 	$(LIBICONV) \
 	$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
 CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
@@ -473,6 +482,26 @@
     fi; \
   fi`
 
+# OBSOLETE CHILLFLAGS = $(CFLAGS)
+# OBSOLETE CHILL = gcc
+# OBSOLETE CHILL_FOR_TARGET = ` \
+# OBSOLETE   if [ -f $${rootme}/../gcc/Makefile ] ; then \
+# OBSOLETE     echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../gcc/ch/runtime/; \
+# OBSOLETE   else \
+# OBSOLETE     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+# OBSOLETE       echo $(CC); \
+# OBSOLETE     else \
+# OBSOLETE       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+# OBSOLETE     fi; \
+# OBSOLETE   fi`
+# OBSOLETE CHILL_LIB = ` \
+# OBSOLETE   if [ -f $${rootme}/../gcc/ch/runtime/libchill.a ] ; then \
+# OBSOLETE     echo $${rootme}/../gcc/ch/runtime/chillrt0.o \
+# OBSOLETE       $${rootme}/../gcc/ch/runtime/libchill.a; \
+# OBSOLETE   else \
+# OBSOLETE       echo -lchill; \
+# OBSOLETE   fi`
+
 # The use of $$(x_FOR_TARGET) reduces the command line length by not
 # duplicating the lengthy definition.
 TARGET_FLAGS_TO_PASS = \
@@ -581,12 +610,13 @@
 # gdb/ header files
 #
 
+acconfig_h = acconfig.h
 ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h)
-alpha_tdep_h = alpha-tdep.h
+alpha_tdep_h = alpha-tdep.h $(osabi_h)
 alphabsd_tdep_h = alphabsd-tdep.h
 annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
 arch_utils_h = arch-utils.h
-arm_tdep_h = arm-tdep.h
+arm_tdep_h = arm-tdep.h $(osabi_h)
 ax_gdb_h = ax-gdb.h
 ax_h = ax.h $(doublest_h)
 bcache_h = bcache.h
@@ -601,7 +631,6 @@
 command_h = command.h
 complaints_h = complaints.h
 completer_h = completer.h
-config_h = config.h
 cp_abi_h = cp-abi.h
 cp_support_h = cp-support.h
 dcache_h = dcache.h
@@ -633,7 +662,7 @@
 gdb_thread_db_h = gdb_thread_db.h
 gdb_vfork_h = gdb_vfork.h
 gdb_wait_h = gdb_wait.h
-gdbarch_h = gdbarch.h $(dis_asm_h) $(inferior_h)
+gdbarch_h = gdbarch.h $(dis_asm_h) $(value_h) $(inferior_h)
 gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
 gdbcore_h = gdbcore.h $(bfd_h)
 gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
@@ -641,7 +670,7 @@
 gnu_nat_h = gnu-nat.h
 gregset_h = gregset.h
 i386_linux_tdep_h = i386-linux-tdep.h
-i386_tdep_h = i386-tdep.h
+i386_tdep_h = i386-tdep.h $(osabi_h)
 i387_tdep_h = i387-tdep.h
 inf_loop_h = inf-loop.h
 inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h)
@@ -661,7 +690,7 @@
 mipsnbsd_tdep_h = mipsnbsd-tdep.h
 monitor_h = monitor.h
 nbsd_tdep_h = nbsd-tdep.h
-ns32k_tdep_h = ns32k-tdep.h
+ns32k_tdep_h = ns32k-tdep.h $(osabi_h)
 objc_lang_h = objc-lang.h
 objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
 ocd_h = ocd.h
@@ -669,7 +698,7 @@
 p_lang_h = p-lang.h
 pa64solib_h = pa64solib.h
 parser_defs_h = parser-defs.h $(doublest_h)
-ppc_tdep_h = ppc-tdep.h
+ppc_tdep_h = ppc-tdep.h $(osabi_h)
 ppcnbsd_tdep_h = ppcnbsd-tdep.h
 proc_utils_h = proc-utils.h
 regcache_h = regcache.h
@@ -680,7 +709,7 @@
 scm_tags_h = scm-tags.h
 ser_unix_h = ser-unix.h
 serial_h = serial.h
-sh_tdep_h = sh-tdep.h
+sh_tdep_h = sh-tdep.h $(osabi_h)
 shnbsd_tdep_h = shnbsd-tdep.h
 sim_regno_h = sim-regno.h
 solib_svr4_h = solib-svr4.h
@@ -703,7 +732,7 @@
 valprint_h = valprint.h
 value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
 varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
-vax_tdep_h = vax-tdep.h
+vax_tdep_h = vax-tdep.h $(osabi_h)
 version_h = version.h
 wince_stub_h = wince-stub.h
 wrapper_h = wrapper.h $(gdb_h)
@@ -716,7 +745,7 @@
 #
 
 cli_cmds_h = $(srcdir)/cli/cli-cmds.h
-cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h)
+cli_decode_h = $(srcdir)/cli/cli-decode.h $(gdb_regex_h) $(command_h)
 cli_dump_h = $(srcdir)/cli/cli-dump.h
 cli_script_h = $(srcdir)/cli/cli-script.h
 cli_setshow_h = $(srcdir)/cli/cli-setshow.h
@@ -837,7 +866,7 @@
 
 TSOBS = inflow.o
 
-SUBDIRS = @subdirs@
+SUBDIRS = @SUBDIRS@
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
 YYFILES = c-exp.tab.c \
@@ -986,7 +1015,7 @@
 # Removing the old gdb first works better if it is running, at least on SunOS.
 gdb$(EXEEXT): gdb.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
 	rm -f gdb$(EXEEXT)
-	$(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+	$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
 		-o gdb$(EXEEXT) gdb.o main.o $(CONFIG_OBS) libgdb.a \
 		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
 
@@ -1331,6 +1360,11 @@
 # will remove them.
 MAKEOVERRIDES=
 
+## This is ugly, but I don't want GNU make to put these variables in
+## the environment.  Older makes will see this as a set of targets
+## with no dependencies and no actions.
+# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+
 ALLDEPFILES = a68v-nat.c \
 	aix-thread.c \
 	alpha-nat.c alphabsd-nat.c \
@@ -1486,27 +1520,26 @@
 	$(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \
 	$(ppc_tdep_h)
 alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
-	$(value_h) $(alpha_tdep_h) $(osabi_h)
+	$(value_h) $(alpha_tdep_h)
 alpha-nat.o: alpha-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
 	$(regcache_h) $(alpha_tdep_h) $(gregset_h) $(gdb_string_h)
 alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
-	$(value_h) $(alpha_tdep_h) $(osabi_h)
+	$(value_h) $(alpha_tdep_h)
 alpha-tdep.o: alpha-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
 	$(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
 	$(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
-	$(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h) \
-	$(osabi_h)
+	$(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h)
 alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
 	$(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
 alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
 	$(alphabsd_tdep_h)
-alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h) \
-	$(osabi_h)
+alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h)
 alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
 	$(regcache_h) $(value_h) $(solib_svr4_h) $(alpha_tdep_h) \
-	$(alphabsd_tdep_h) $(nbsd_tdep_h) $(osabi_h)
+	$(alphabsd_tdep_h) $(nbsd_tdep_h)
 annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
 	$(gdbtypes_h) $(breakpoint_h)
+# OBSOLETE arc-tdep.o: arc-tdep.c
 arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) \
 	$(inferior_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
 	$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(annotate_h) \
@@ -1516,17 +1549,16 @@
 	$(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h)
 arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
 	$(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
-	$(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
-	$(osabi_h)
+	$(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h)
 arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
 	$(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
 	$(doublest_h) $(value_h) $(arch_utils_h) $(solib_svr4_h) \
 	$(arm_tdep_h) $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) \
-	$(elf_arm_h) $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) $(osabi_h)
+	$(elf_arm_h) $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h)
 armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
 	$(regcache_h) $(gdbcore_h)
 armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(arm_tdep_h) $(nbsd_tdep_h) \
-	$(solib_svr4_h) $(osabi_h)
+	$(solib_svr4_h)
 avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
 	$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
 ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
@@ -1537,7 +1569,7 @@
 blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
 	$(objfiles_h) $(frame_h) $(gdbcore_h) $(value_h) $(target_h) \
 	$(inferior_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
-	$(dummy_frame_h) $(command_h) $(gdbcmd_h)
+	$(dummy_frame_h)
 breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
 	$(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
 	$(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
@@ -1561,8 +1593,11 @@
 c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
 	$(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
 	$(c_lang_h) $(cp_abi_h)
-charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \
-	$(gdb_string_h)
+# OBSOLETE ch-exp.o: ch-exp.c
+# OBSOLETE ch-lang.o: ch-lang.c
+# OBSOLETE ch-typeprint.o: ch-typeprint.c
+# OBSOLETE ch-valprint.o: ch-valprint.c
+charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) gdb_assert.h
 cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \
 	$(gdb_assert_h)
 coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
@@ -1601,11 +1636,13 @@
 	$(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(value_h) \
 	$(opcode_cris_h) $(arch_utils_h) $(regcache_h) $(symfile_h) \
 	$(solib_h) $(solib_svr4_h) $(gdb_string_h)
+# OBSOLETE cxux-nat.o: cxux-nat.c
 d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
 	$(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) \
 	$(arch_utils_h) $(regcache_h) $(floatformat_h) $(gdb_sim_d10v_h) \
 	$(sim_regno_h)
+# OBSOLETE d30v-tdep.o: d30v-tdep.c
 dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
 	$(serial_h) $(regcache_h) $(m68k_tdep_h)
 dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
@@ -1626,6 +1663,7 @@
 	$(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h)
 dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
 dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h)
+# OBSOLETE dstread.o: dstread.c
 dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
 	$(frame_h) $(inferior_h) $(gdb_assert_h)
 dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
@@ -1676,6 +1714,7 @@
 fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \
 	$(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \
 	$(terminal_h) $(gdbthread_h) $(command_h)
+# OBSOLETE fr30-tdep.o: fr30-tdep.c
 frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
 	$(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(builtin_regs_h) \
 	$(gdb_obstack_h) $(dummy_frame_h) $(gdbcore_h) $(annotate_h) \
@@ -1690,8 +1729,7 @@
 	$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
 	$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
 	$(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
-	$(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h) \
-	$(osabi_h)
+	$(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h)
 gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
 	$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
 	$(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
@@ -1722,8 +1760,7 @@
 	$(value_h) $(regcache_h) $(completer_h) $(symtab_h) $(a_out_encap_h) \
 	$(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \
 	$(symfile_h) $(objfiles_h) $(language_h) $(osabi_h)
-hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
-	$(osabi_h)
+hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h)
 hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
 hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
 	$(gdb_wait_h) $(regcache_h)
@@ -1740,36 +1777,36 @@
 	$(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h)
 i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
 	$(value_h) $(regcache_h) $(inferior_h) $(symtab_h) $(symfile_h) \
-	$(objfiles_h) $(solib_svr4_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
-	$(osabi_h)
+	$(objfiles_h) $(solib_svr4_h) $(i386_tdep_h) $(i386_linux_tdep_h)
 i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
-i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h) \
-	$(osabi_h)
+i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h)
 i386-stub.o: i386-stub.c
 i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
 	$(gdbcore_h) $(objfiles_h) $(target_h) $(floatformat_h) $(symfile_h) \
 	$(symtab_h) $(gdbcmd_h) $(command_h) $(arch_utils_h) $(regcache_h) \
 	$(doublest_h) $(value_h) $(gdb_assert_h) $(i386_tdep_h) \
-	$(i387_tdep_h) $(osabi_h)
+	$(i387_tdep_h)
+# OBSOLETE i386aix-nat.o: i386aix-nat.c
 i386b-nat.o: i386b-nat.c $(defs_h)
 i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
-	$(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) \
-	$(osabi_h)
+	$(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h)
 i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
 	$(gdbcore_h) $(regcache_h) $(gdb_string_h) $(i386_tdep_h)
 i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h)
 i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
 	$(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \
 	$(i387_tdep_h)
-i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h) $(osabi_h)
+i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h)
 i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	$(regcache_h) $(target_h) $(i386_tdep_h) $(osabi_h)
+	$(regcache_h) $(target_h) $(i386_tdep_h)
+# OBSOLETE i386m3-nat.o: i386m3-nat.c
+# OBSOLETE i386mach-nat.o: i386mach-nat.c
 i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
 	$(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
-	$(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
+	$(nbsd_tdep_h) $(solib_svr4_h)
 i386obsd-nat.o: i386obsd-nat.c $(defs_h)
 i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
-	$(regcache_h) $(i386_tdep_h) $(i387_tdep_h) $(osabi_h)
+	$(regcache_h) $(i386_tdep_h) $(i387_tdep_h)
 i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
 	$(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) $(i386_tdep_h)
 i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
@@ -1777,6 +1814,7 @@
 i387-tdep.o: i387-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
 	$(value_h) $(gdbcore_h) $(floatformat_h) $(regcache_h) \
 	$(gdb_assert_h) $(gdb_string_h) $(doublest_h) $(i386_tdep_h)
+# OBSOLETE i960-tdep.o: i960-tdep.c
 ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \
 	$(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \
 	$(objfiles_h) $(gdb_stat_h)
@@ -1871,6 +1909,8 @@
 m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
 	$(regcache_h)
 m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
+# OBSOLETE m88k-nat.o: m88k-nat.c
+# OBSOLETE m88k-tdep.o: m88k-tdep.c
 macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \
 	$(command_h) $(gdbcmd_h)
 macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
@@ -1906,8 +1946,7 @@
 mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h)
 mips-linux-nat.o: mips-linux-nat.c $(defs_h)
 mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
-	$(solib_svr4_h) $(osabi_h) $(gdb_string_h) $(mips_tdep_h) \
-	$(gdb_assert_h)
+	$(solib_svr4_h) $(osabi_h) $(gdb_string_h)
 mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
 mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
 	$(symtab_h) $(value_h) $(gdbcmd_h) $(language_h) $(gdbcore_h) \
@@ -1944,11 +1983,10 @@
 	$(objfiles_h) $(buildsym_h) $(stabsread_h)
 ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \
 	$(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) \
-	$(ns32k_tdep_h) $(gdb_string_h) $(osabi_h)
+	$(ns32k_tdep_h) $(gdb_string_h)
 ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \
 	$(gdbcore_h) $(regcache_h)
-ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(ns32k_tdep_h) $(gdb_string_h) \
-	$(osabi_h)
+ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(ns32k_tdep_h) $(gdb_string_h)
 objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
 	$(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \
 	$(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \
@@ -1962,8 +2000,8 @@
 	$(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
 op50-rom.o: op50-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
 	$(serial_h)
-osabi.o: osabi.c $(defs_h) $(gdb_string_h) $(osabi_h) $(elf_bfd_h) \
-	$(gdbcmd_h) $(command_h) $(arch_utils_h)
+# OBSOLETE os9kread.o: os9kread.c
+osabi.o: osabi.c $(defs_h) $(gdb_string_h) $(osabi_h) $(elf_bfd_h)
 p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
 	$(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \
 	$(valprint_h)
@@ -1990,8 +2028,7 @@
 	$(gdbcore_h) $(regcache_h) $(gregset_h) $(ppc_tdep_h) $(gdb_string_h)
 ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
 	$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
-	$(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h) \
-	$(osabi_h)
+	$(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
 ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
 	$(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
 ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
@@ -2000,7 +2037,7 @@
 	$(ppcnbsd_tdep_h)
 ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
 	$(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_h) \
-	$(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
+	$(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
 printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
 	$(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
 	$(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
@@ -2025,6 +2062,7 @@
 remote-array.o: remote-array.c $(defs_h) $(gdbcore_h) $(target_h) \
 	$(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) \
 	$(remote_utils_h) $(inferior_h) $(version_h) $(regcache_h)
+# OBSOLETE remote-bug.o: remote-bug.c
 remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \
 	$(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \
 	$(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h)
@@ -2038,6 +2076,9 @@
 remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \
 	$(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \
 	$(gdb_string_h) $(gdb_stat_h) $(regcache_h)
+# OBSOLETE remote-nindy.o: remote-nindy.c
+# OBSOLETE remote-nrom.o: remote-nrom.c
+# OBSOLETE remote-os9k.o: remote-os9k.c
 remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \
 	$(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
 	$(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \
@@ -2069,6 +2110,7 @@
 	$(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \
 	$(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \
 	$(vx_share_dbgRpcLib_h)
+# OBSOLETE remote-vx960.o: remote-vx960.c
 remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \
 	$(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \
 	$(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \
@@ -2095,7 +2137,7 @@
 	$(arch_utils_h) $(regcache_h) $(doublest_h) $(value_h) \
 	$(parser_defs_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
 	$(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
-	$(ppc_tdep_h) $(osabi_h)
+	$(ppc_tdep_h)
 s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h)
 s390-tdep.o: s390-tdep.c $(arch_utils_h) $(frame_h) $(inferior_h) \
 	$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
@@ -2123,13 +2165,13 @@
 	$(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
 	$(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
 	$(regcache_h) $(doublest_h) $(sh_tdep_h) $(elf_bfd_h) \
-	$(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h) $(osabi_h)
+	$(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h)
 sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
 	$(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \
 	$(sh_tdep_h)
 shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(shnbsd_tdep_h)
 shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \
-	$(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) $(shnbsd_tdep_h) $(osabi_h)
+	$(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) $(shnbsd_tdep_h)
 sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
 	$(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) $(symfile_h) \
 	$(gregset_h)
@@ -2277,7 +2319,7 @@
 	$(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
 vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \
 	$(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \
-	$(gdb_string_h) $(vax_tdep_h) $(osabi_h)
+	$(gdb_string_h) $(vax_tdep_h)
 w89k-rom.o: w89k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
 	$(serial_h) $(xmodem_h) $(regcache_h)
 win32-nat.o: win32-nat.c $(defs_h) $(tm_h) $(frame_h) $(inferior_h) \
@@ -2292,9 +2334,8 @@
 wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h)
 x86-64-linux-nat.o: x86-64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
 	$(regcache_h) $(gdb_assert_h) $(x86_64_tdep_h)
-x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
-	$(gdb_string_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h) \
-	$(osabi_h)
+x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
+	$(gdbcore_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h)
 x86-64-tdep.o: x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
 	$(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) $(objfiles_h) \
 	$(x86_64_tdep_h) $(dwarf2cfi_h) $(gdb_assert_h)
@@ -2399,7 +2440,7 @@
 insight$(EXEEXT): gdbtk-main.o main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) \
 		$(CDEPS) $(TDEPLIBS)
 	rm -f insight$(EXEEXT)
-	$(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
+	$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
 		-o insight$(EXEEXT) gdbtk-main.o main.o $(CONFIG_OBS) libgdb.a \
 		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
 
@@ -2497,9 +2538,9 @@
 mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
 	$(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h) $(disasm_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
-mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
-	$(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \
-	$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
+mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
+	$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(inferior.h) \
+	$(mi_getopt_h) $(environ_h) $(gdbcmd_h) $(top_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
 mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
 	$(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h)
diff --git a/gdb/NEWS b/gdb/NEWS
index cb3af22..f9feaf0 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -17,29 +17,9 @@
 Fix for gdb/702: a -var-assign that updates the value now shows up
                  in a subsequent -var-update.
 
-* OBSOLETE configurations and files
-
-Configurations that have been declared obsolete in this release have
-been commented out.  Unless there is activity to revive these
-configurations, the next release of GDB will have their sources
-permanently REMOVED.
-
 * REMOVED configurations and files
 
 V850EA ISA				
-Motorola Delta 88000 running Sys V		m88k-motorola-sysv  or  delta88
-IBM AIX PS/2					i[3456]86-*-aix
-i386 running Mach 3.0				i[3456]86-*-mach3*
-i386 running Mach				i[3456]86-*-mach*
-i386 running OSF/1				i[3456]86-*osf1mk*
-HP/Apollo 68k Family				m68*-apollo*-sysv*,
-						m68*-apollo*-bsd*,
-						m68*-hp-bsd*, m68*-hp-hpux*
-Argonaut Risc Chip (ARC)			arc-*-*
-Mitsubishi D30V					d30v-*-*
-Fujitsu FR30					fr30-*-elf*
-OS/9000						i[34]86-*-os9k
-I960 with MON960				i960-*-coff
 
 * MIPS $fp behavior changed
 
diff --git a/gdb/README b/gdb/README
index 5f722b4..e8759c1 100644
--- a/gdb/README
+++ b/gdb/README
@@ -449,17 +449,24 @@
    There are a number of remote interfaces for talking to existing ROM
 monitors and other hardware:
 
+	remote-adapt.c	 AMD 29000 "Adapt"
 	remote-array.c   Array Tech RAID controller
 	remote-e7000.c	 Hitachi E7000 ICE
+	remote-eb.c	 AMD 29000 "EBMON"
 	remote-es.c	 Ericsson 1800 monitor
 	remote-est.c	 EST emulator
 	remote-hms.c	 Hitachi Micro Systems H8/300 monitor
 	remote-mips.c	 MIPS remote debugging protocol
+	remote-mm.c	 AMD 29000 "minimon"
+	remote-nindy.c   Intel 960 "Nindy"
+	remote-nrom.c	 NetROM ROM emulator
+	remote-os9k.c	 PC running OS/9000
 	remote-rdi.c	 ARM with Angel monitor
 	remote-rdp.c	 ARM with Demon monitor
 	remote-sds.c	 PowerPC SDS monitor
 	remote-sim.c	 Generalized simulator protocol
 	remote-st.c	 Tandem ST-2000 monitor
+	remote-udi.c	 AMD 29000 using the AMD "Universal Debug Interface"
 	remote-vx.c	 VxWorks realtime kernel
 
    Remote-vx.c and the vx-share subdirectory contain a remote
@@ -467,6 +474,14 @@
 using the Sun RPC library.  This would be a useful starting point for
 other remote- via-ethernet back ends.
 
+   Remote-udi.c and the 29k-share subdirectory contain a remote
+interface for AMD 29000 programs, which uses the AMD "Universal Debug
+Interface".  This allows GDB to talk to software simulators,
+emulators, and/or bare hardware boards, via network or serial
+interfaces.  Note that GDB only provides an interface that speaks UDI,
+not a complete solution.  You will need something on the other end
+that also speaks UDI.
+
 
 Reporting Bugs in GDB
 =====================
diff --git a/gdb/TODO b/gdb/TODO
index 5dc2ee7..f743ae7 100644
--- a/gdb/TODO
+++ b/gdb/TODO
@@ -114,6 +114,12 @@
 
 --
 
+Remove old code that does not use ui_out functions and all the related
+"ifdef"s.  This also allows the elimination of -DUI_OUT from
+Makefile.in and configure.in.
+
+--
+
 Compiler warnings.
 
 Eliminate warnings for all targets on at least one host for one of the
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index a9bf0a4..88c15e1 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -1,7 +1,5 @@
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
+/* Define if compiling on Solaris 7. */
+#undef _MSE_INT_H
 
 /* Define if your struct reg has r_fs.  */
 #undef HAVE_STRUCT_REG_R_FS
@@ -51,6 +49,9 @@
 /* Define if <sys/procfs.h> has pr_siginfo64_t */
 #undef HAVE_PR_SIGINFO64_T
 
+/* Define if the pread64 function is available.  */
+#undef HAVE_PREAD64
+
 /* Define if <link.h> exists and defines struct link_map which has
    members with an ``l_'' prefix.  (For Solaris, SVR4, and
    SVR4-like systems.) */
@@ -133,6 +134,10 @@
    size_t, and assorted other type changes. */
 #undef PROC_SERVICE_IS_OLD
 
+/* If you want to specify a default CPU variant, define this to be its
+   name, as a C string.  */
+#undef TARGET_CPU_DEFAULT
+
 /* Define if the simulator is being linked in.  */
 #undef WITH_SIM
 
@@ -154,6 +159,15 @@
 /* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request.  */
 #undef HAVE_PT_GETXMMREGS
 
+/* Define if gnu-regex.c included with GDB should be used. */
+#undef USE_INCLUDED_REGEX
+
+/* BFD's default architecture. */
+#undef DEFAULT_BFD_ARCH
+
+/* BFD's default target vector. */
+#undef DEFAULT_BFD_VEC
+
 /* Multi-arch enabled. */
 #undef GDB_MULTI_ARCH
 
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index a215108..ef6876d 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -918,12 +918,3 @@
   fi
   AC_SUBST(LIBICONV)
 ])
-
-# AC_GNU_SOURCE
-# -------------
-# FIXME: Remove thise once we start using Autoconf 2.5x (x>=4).
-AC_DEFUN([AC_GNU_SOURCE],
-[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
-AC_BEFORE([$0], [AC_TRY_RUN])dnl
-AC_DEFINE([_GNU_SOURCE])
-])
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index 8391330..4ac2651 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -1,6 +1,6 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+dnl aclocal.m4 generated automatically by aclocal 1.4
 
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -753,6 +753,74 @@
 AC_DEFUN([CY_GNU_GETTEXT],)
 ])
 
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+
+  AC_ARG_WITH([libiconv-prefix],
+[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+    done
+   ])
+
+  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS -liconv"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+  LIBICONV=
+  if test "$am_cv_lib_iconv" = yes; then
+    LIBICONV="-liconv"
+  fi
+  AC_SUBST(LIBICONV)
+])
+
 
 # Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
@@ -859,89 +927,12 @@
 esac
 ])
 
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV],
-[
-  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-  dnl those with the standalone portable GNU libiconv installed).
-
-  AC_ARG_WITH([libiconv-prefix],
-[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
-    for dir in `echo "$withval" | tr : ' '`; do
-      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
-      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
-    done
-   ])
-
-  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
-      am_cv_func_iconv=yes)
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS -liconv"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes)
-      LIBS="$am_save_LIBS"
-    fi
-  ])
-  if test "$am_cv_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL(am_cv_proto_iconv, [
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([$]{ac_t:-
-         }[$]am_cv_proto_iconv)
-    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-      [Define as const if the declaration of iconv() needs const.])
-  fi
-  LIBICONV=
-  if test "$am_cv_lib_iconv" = yes; then
-    LIBICONV="-liconv"
-  fi
-  AC_SUBST(LIBICONV)
-])
-
-# AC_GNU_SOURCE
-# -------------
-# FIXME: Remove thise once we start using Autoconf 2.5x (x>=4).
-AC_DEFUN([AC_GNU_SOURCE],
-[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
-AC_BEFORE([$0], [AC_TRY_RUN])dnl
-AC_DEFINE([_GNU_SOURCE])
-])
-
 # Add --enable-maintainer-mode option to configure.
 # From Jim Meyering
 
 # serial 1
 
-AC_DEFUN([AM_MAINTAINER_MODE],
+AC_DEFUN(AM_MAINTAINER_MODE,
 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode is disabled by default
   AC_ARG_ENABLE(maintainer-mode,
@@ -958,7 +949,7 @@
 
 # Define a conditional.
 
-AC_DEFUN([AM_CONDITIONAL],
+AC_DEFUN(AM_CONDITIONAL,
 [AC_SUBST($1_TRUE)
 AC_SUBST($1_FALSE)
 if $2; then
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 5d5aaf8..84ec71b 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -36,7 +36,9 @@
 #include "breakpoint.h"
 #include "gdbcore.h"
 #include "ada-lang.h"
+#ifdef UI_OUT
 #include "ui-out.h"
+#endif
 
 struct cleanup *unresolved_names;
 
@@ -5052,6 +5054,7 @@
 void
 ada_report_exception_break (struct breakpoint *b)
 {
+#ifdef UI_OUT
   /* FIXME: break_on_exception should be defined in breakpoint.h */
   /*  if (b->break_on_exception == 1)
      {
@@ -5089,6 +5092,7 @@
    else if (b->break_on_exception == 3)
    fputs_filtered ("on assert failure", gdb_stdout);
  */
+#endif
 }
 
 int
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index c5d7481..26f4db4 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for GNU/Linux on Alpha.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,6 @@
 #include "frame.h"
 #include "gdbcore.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "alpha-tdep.h"
 
@@ -96,7 +95,7 @@
 static CORE_ADDR
 alpha_linux_sigcontext_addr (struct frame_info *frame)
 {
-  return (get_frame_base (frame) - 0x298); /* sizeof(struct sigcontext) */
+  return (frame->frame - 0x298); /* sizeof(struct sigcontext) */
 }
 
 static void
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index fa5bc5e..c170a37 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for OSF/1 on Alpha.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,6 @@
 #include "frame.h"
 #include "gdbcore.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "alpha-tdep.h"
 
@@ -42,7 +41,7 @@
 static int
 alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
 {
-  return (func_name != NULL && strcmp ("__sigtramp", func_name) == 0);
+  return (func_name != NULL && STREQ ("__sigtramp", func_name));
 }
 
 static CORE_ADDR
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 9cca20d..12dcc62 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for the ALPHA architecture, for GDB, the GNU Debugger.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -34,7 +34,6 @@
 #include "regcache.h"
 #include "doublest.h"
 #include "arch-utils.h"
-#include "osabi.h"
 
 #include "elf-bfd.h"
 
@@ -390,18 +389,18 @@
       for (ireg = 0; ireg < 32; ireg++)
 	{
 	  reg_position = sigcontext_addr + SIGFRAME_REGSAVE_OFF + ireg * 8;
-	  get_frame_saved_regs (frame)[ireg] = reg_position;
+	  frame->saved_regs[ireg] = reg_position;
 	}
       for (ireg = 0; ireg < 32; ireg++)
 	{
 	  reg_position = sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + ireg * 8;
-	  get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
+	  frame->saved_regs[FP0_REGNUM + ireg] = reg_position;
 	}
-      get_frame_saved_regs (frame)[PC_REGNUM] = sigcontext_addr + SIGFRAME_PC_OFF;
+      frame->saved_regs[PC_REGNUM] = sigcontext_addr + SIGFRAME_PC_OFF;
       return;
     }
 
-  proc_desc = get_frame_extra_info (frame)->proc_desc;
+  proc_desc = frame->extra_info->proc_desc;
   if (proc_desc == NULL)
     /* I'm not sure how/whether this can happen.  Normally when we can't
        find a proc_desc, we "synthesize" one using heuristic_proc_desc
@@ -411,7 +410,7 @@
   /* Fill in the offsets for the registers which gen_mask says
      were saved.  */
 
-  reg_position = get_frame_base (frame) + PROC_REG_OFFSET (proc_desc);
+  reg_position = frame->frame + PROC_REG_OFFSET (proc_desc);
   mask = PROC_REG_MASK (proc_desc);
 
   returnreg = PROC_PC_REG (proc_desc);
@@ -420,7 +419,7 @@
      register number.  */
   if (mask & (1 << returnreg))
     {
-      get_frame_saved_regs (frame)[returnreg] = reg_position;
+      frame->saved_regs[returnreg] = reg_position;
       reg_position += 8;
       mask &= ~(1 << returnreg);	/* Clear bit for RA so we
 					   don't save again later. */
@@ -429,57 +428,57 @@
   for (ireg = 0; ireg <= 31; ++ireg)
     if (mask & (1 << ireg))
       {
-	get_frame_saved_regs (frame)[ireg] = reg_position;
+	frame->saved_regs[ireg] = reg_position;
 	reg_position += 8;
       }
 
   /* Fill in the offsets for the registers which float_mask says
      were saved.  */
 
-  reg_position = get_frame_base (frame) + PROC_FREG_OFFSET (proc_desc);
+  reg_position = frame->frame + PROC_FREG_OFFSET (proc_desc);
   mask = PROC_FREG_MASK (proc_desc);
 
   for (ireg = 0; ireg <= 31; ++ireg)
     if (mask & (1 << ireg))
       {
-	get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
+	frame->saved_regs[FP0_REGNUM + ireg] = reg_position;
 	reg_position += 8;
       }
 
-  get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_saved_regs (frame)[returnreg];
+  frame->saved_regs[PC_REGNUM] = frame->saved_regs[returnreg];
 }
 
 static void
 alpha_frame_init_saved_regs (struct frame_info *fi)
 {
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     alpha_find_saved_regs (fi);
-  get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi);
+  fi->saved_regs[SP_REGNUM] = fi->frame;
 }
 
 static CORE_ADDR
 alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev)
 {
   return (fromleaf ? SAVED_PC_AFTER_CALL (get_next_frame (prev)) 
-	  : get_next_frame (prev) ? FRAME_SAVED_PC (get_next_frame (prev))
+	  : get_next_frame (prev) ? FRAME_SAVED_PC (prev->next)
 	  : read_pc ());
 }
 
 static CORE_ADDR
 read_next_frame_reg (struct frame_info *fi, int regno)
 {
-  for (; fi; fi = get_next_frame (fi))
+  for (; fi; fi = fi->next)
     {
       /* We have to get the saved sp from the sigcontext
          if it is a signal handler frame.  */
       if (regno == SP_REGNUM && !(get_frame_type (fi) == SIGTRAMP_FRAME))
-	return get_frame_base (fi);
+	return fi->frame;
       else
 	{
-	  if (get_frame_saved_regs (fi) == NULL)
+	  if (fi->saved_regs == NULL)
 	    alpha_find_saved_regs (fi);
-	  if (get_frame_saved_regs (fi)[regno])
-	    return read_memory_integer (get_frame_saved_regs (fi)[regno], 8);
+	  if (fi->saved_regs[regno])
+	    return read_memory_integer (fi->saved_regs[regno], 8);
 	}
     }
   return read_register (regno);
@@ -488,15 +487,14 @@
 static CORE_ADDR
 alpha_frame_saved_pc (struct frame_info *frame)
 {
-  alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+  alpha_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
   /* We have to get the saved pc from the sigcontext
      if it is a signal handler frame.  */
-  int pcreg = ((get_frame_type (frame) == SIGTRAMP_FRAME)
-	       ? PC_REGNUM
-	       : get_frame_extra_info (frame)->pc_reg);
+  int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM
+                                           : frame->extra_info->pc_reg;
 
   if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
-    return read_memory_integer  (get_frame_base (frame) - 8, 8);
+    return read_memory_integer (frame->frame - 8, 8);
 
   return read_next_frame_reg (frame, pcreg);
 }
@@ -504,7 +502,7 @@
 static CORE_ADDR
 alpha_saved_pc_after_call (struct frame_info *frame)
 {
-  CORE_ADDR pc = get_frame_pc (frame);
+  CORE_ADDR pc = frame->pc;
   CORE_ADDR tmp;
   alpha_extra_func_info_t proc_desc;
   int pcreg;
@@ -514,7 +512,7 @@
   if (tmp != 0)
     pc = tmp;
 
-  proc_desc = find_proc_desc (pc, get_next_frame (frame));
+  proc_desc = find_proc_desc (pc, frame->next);
   pcreg = proc_desc ? PROC_PC_REG (proc_desc) : ALPHA_RA_REGNUM;
 
   if ((get_frame_type (frame) == SIGTRAMP_FRAME))
@@ -968,12 +966,12 @@
 alpha_print_extra_frame_info (struct frame_info *fi)
 {
   if (fi
-      && get_frame_extra_info (fi)
-      && get_frame_extra_info (fi)->proc_desc
-      && get_frame_extra_info (fi)->proc_desc->pdr.framereg < NUM_REGS)
+      && fi->extra_info
+      && fi->extra_info->proc_desc
+      && fi->extra_info->proc_desc->pdr.framereg < NUM_REGS)
     printf_filtered (" frame pointer is at %s+%s\n",
-		     REGISTER_NAME (get_frame_extra_info (fi)->proc_desc->pdr.framereg),
-		     paddr_d (get_frame_extra_info (fi)->proc_desc->pdr.frameoffset));
+		     REGISTER_NAME (fi->extra_info->proc_desc->pdr.framereg),
+		     paddr_d (fi->extra_info->proc_desc->pdr.frameoffset));
 }
 
 static void
@@ -981,42 +979,39 @@
 {
   /* Use proc_desc calculated in frame_chain */
   alpha_extra_func_info_t proc_desc =
-    get_next_frame (frame)
-    ? cached_proc_desc
-    : find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
+  frame->next ? cached_proc_desc : find_proc_desc (frame->pc, frame->next);
 
-  frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
+  frame->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  /* NOTE: cagney/2003-01-03: No need to set saved_regs to NULL,
-     always NULL by default.  */
-  /* frame->saved_regs = NULL; */
-  get_frame_extra_info (frame)->localoff = 0;
-  get_frame_extra_info (frame)->pc_reg = ALPHA_RA_REGNUM;
-  get_frame_extra_info (frame)->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc;
+  frame->saved_regs = NULL;
+  frame->extra_info->localoff = 0;
+  frame->extra_info->pc_reg = ALPHA_RA_REGNUM;
+  frame->extra_info->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc;
   if (proc_desc)
     {
       /* Get the locals offset and the saved pc register from the
          procedure descriptor, they are valid even if we are in the
          middle of the prologue.  */
-      get_frame_extra_info (frame)->localoff = PROC_LOCALOFF (proc_desc);
-      get_frame_extra_info (frame)->pc_reg = PROC_PC_REG (proc_desc);
+      frame->extra_info->localoff = PROC_LOCALOFF (proc_desc);
+      frame->extra_info->pc_reg = PROC_PC_REG (proc_desc);
 
       /* Fixup frame-pointer - only needed for top frame */
 
       /* Fetch the frame pointer for a dummy frame from the procedure
          descriptor.  */
       if (PROC_DESC_IS_DUMMY (proc_desc))
-	deprecated_update_frame_base_hack (frame, (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc));
+	frame->frame = (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc);
 
       /* This may not be quite right, if proc has a real frame register.
          Get the value of the frame relative sp, procedure might have been
          interrupted by a signal at it's very start.  */
-      else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc)
+      else if (frame->pc == PROC_LOW_ADDR (proc_desc)
 	       && !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
-	deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), SP_REGNUM));
+	frame->frame = read_next_frame_reg (frame->next, SP_REGNUM);
       else
-	deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), PROC_FRAME_REG (proc_desc))
-					   + PROC_FRAME_OFFSET (proc_desc));
+	frame->frame = read_next_frame_reg (frame->next, PROC_FRAME_REG (proc_desc))
+	  + PROC_FRAME_OFFSET (proc_desc);
 
       if (proc_desc == &temp_proc_desc)
 	{
@@ -1029,15 +1024,16 @@
 	  /* FIXME: cagney/2002-11-18: This problem will go away once
              frame.c:get_prev_frame() is modified to set the frame's
              type before calling functions like this.  */
-	  find_pc_partial_function (get_frame_pc (frame), &name,
+	  find_pc_partial_function (frame->pc, &name,
 				    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-	  if (!PC_IN_SIGTRAMP (get_frame_pc (frame), name))
+	  if (!PC_IN_SIGTRAMP (frame->pc, name))
 	    {
-	      frame_saved_regs_zalloc (frame);
-	      memcpy (get_frame_saved_regs (frame), temp_saved_regs,
+	      frame->saved_regs = (CORE_ADDR *)
+		frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
+	      memcpy (frame->saved_regs, temp_saved_regs,
 	              SIZEOF_FRAME_SAVED_REGS);
-	      get_frame_saved_regs (frame)[PC_REGNUM]
-		= get_frame_saved_regs (frame)[ALPHA_RA_REGNUM];
+	      frame->saved_regs[PC_REGNUM]
+		= frame->saved_regs[ALPHA_RA_REGNUM];
 	    }
 	}
     }
@@ -1046,13 +1042,13 @@
 static CORE_ADDR
 alpha_frame_locals_address (struct frame_info *fi)
 {
-  return (get_frame_base (fi) - get_frame_extra_info (fi)->localoff);
+  return (fi->frame - fi->extra_info->localoff);
 }
 
 static CORE_ADDR
 alpha_frame_args_address (struct frame_info *fi)
 {
-  return (get_frame_base (fi) - (ALPHA_NUM_ARG_REGS * 8));
+  return (fi->frame - (ALPHA_NUM_ARG_REGS * 8));
 }
 
 /* ALPHA stack frames are almost impenetrable.  When execution stops,
@@ -1292,33 +1288,33 @@
 {
   register int regnum;
   struct frame_info *frame = get_current_frame ();
-  CORE_ADDR new_sp = get_frame_base (frame);
+  CORE_ADDR new_sp = frame->frame;
 
-  alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+  alpha_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
 
   /* we need proc_desc to know how to restore the registers;
      if it is NULL, construct (a temporary) one */
   if (proc_desc == NULL)
-    proc_desc = find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
+    proc_desc = find_proc_desc (frame->pc, frame->next);
 
   /* Question: should we copy this proc_desc and save it in
      frame->proc_desc?  If we do, who will free it?
      For now, we don't save a copy... */
 
   write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-  if (get_frame_saved_regs (frame) == NULL)
+  if (frame->saved_regs == NULL)
     alpha_find_saved_regs (frame);
   if (proc_desc)
     {
       for (regnum = 32; --regnum >= 0;)
 	if (PROC_REG_MASK (proc_desc) & (1 << regnum))
 	  write_register (regnum,
-			  read_memory_integer (get_frame_saved_regs (frame)[regnum],
+			  read_memory_integer (frame->saved_regs[regnum],
 					       8));
       for (regnum = 32; --regnum >= 0;)
 	if (PROC_FREG_MASK (proc_desc) & (1 << regnum))
 	  write_register (regnum + FP0_REGNUM,
-	   read_memory_integer (get_frame_saved_regs (frame)[regnum + FP0_REGNUM], 8));
+	   read_memory_integer (frame->saved_regs[regnum + FP0_REGNUM], 8));
     }
   write_register (SP_REGNUM, new_sp);
   flush_cached_frames ();
@@ -1772,23 +1768,37 @@
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
   /* Try to determine the ABI of the object we are loading.  */
-  if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
+
+  if (info.abfd != NULL)
     {
-      /* If it's an ECOFF file, assume it's OSF/1.  */
-      if (bfd_get_flavour (info.abfd) == bfd_target_ecoff_flavour)
-	info.osabi = GDB_OSABI_OSF1;
+      osabi = gdbarch_lookup_osabi (info.abfd);
+      if (osabi == GDB_OSABI_UNKNOWN)
+	{
+	  /* If it's an ECOFF file, assume it's OSF/1.  */
+	  if (bfd_get_flavour (info.abfd) == bfd_target_ecoff_flavour)
+	    osabi = GDB_OSABI_OSF1;
+	}
     }
 
   /* Find a candidate among extant architectures.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
 
   tdep = xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
 
+  tdep->osabi = osabi;
+
   /* Lowest text address.  This is used by heuristic_proc_start() to
      decide when to stop looking.  */
   tdep->vm_min_address = (CORE_ADDR) 0x120000000;
@@ -1844,6 +1854,7 @@
   set_gdbarch_saved_pc_after_call (gdbarch, alpha_saved_pc_after_call);
 
   set_gdbarch_frame_chain (gdbarch, alpha_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
@@ -1890,6 +1901,10 @@
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
 
+  /* Floats are always passed as doubles.  */
+  set_gdbarch_coerce_float_to_double (gdbarch,
+                                      standard_coerce_float_to_double);
+
   set_gdbarch_breakpoint_from_pc (gdbarch, alpha_breakpoint_from_pc);
   set_gdbarch_decr_pc_after_break (gdbarch, 4);
 
@@ -1897,7 +1912,7 @@
   set_gdbarch_frame_args_skip (gdbarch, 0);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   /* Now that we have tuned the configuration, set a few final things
      based on what the OS ABI has told us.  */
@@ -1916,6 +1931,9 @@
   if (tdep == NULL)
     return;
 
+  fprintf_unfiltered (file, "alpha_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+
   fprintf_unfiltered (file,
                       "alpha_dump_tdep: vm_min_address = 0x%lx\n",
 		      (long) tdep->vm_min_address);
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 6a75ca7..cea232b 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -1,5 +1,5 @@
 /* Common target dependent code for GDB on Alpha systems.
-   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003 Free
+   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002 Free
    Software Foundation, Inc.
 
    This file is part of GDB.
@@ -22,6 +22,8 @@
 #ifndef ALPHA_TDEP_H
 #define ALPHA_TDEP_H
 
+#include "osabi.h"
+
 /* Say how long (ordinary) registers are.  This is a piece of bogosity
    used in push_word and a few other places;  REGISTER_RAW_SIZE is the
    real way to know how big a register is.  */
@@ -79,6 +81,8 @@
 /* Target-dependent structure in gdbarch.  */
 struct gdbarch_tdep
 {
+  enum gdb_osabi osabi;		/* OS/ABI of inferior.  */
+
   CORE_ADDR vm_min_address;	/* used by heuristic_proc_start */
 
   /* If PC is inside a dynamically-generated signal trampoline function
diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c
index 6b1b068..6af3b4d 100644
--- a/gdb/alphafbsd-tdep.c
+++ b/gdb/alphafbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for FreeBSD/Alpha.
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,6 @@
 
 #include "defs.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "alpha-tdep.h"
 
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 6137c5e..e09b945 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for NetBSD/Alpha.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -24,7 +24,6 @@
 #include "frame.h"
 #include "regcache.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "solib-svr4.h"
 
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 1202df9..de3d284 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1,6 +1,6 @@
 /* Dynamic architecture support for GDB, the GNU debugger.
 
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
    Inc.
 
    This file is part of GDB.
@@ -911,7 +911,6 @@
 {
   memset (info, 0, sizeof (struct gdbarch_info));
   info->byte_order = BFD_ENDIAN_UNKNOWN;
-  info->osabi = GDB_OSABI_UNINITIALIZED;
 }
 
 /* */
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index e0d8a93..627ed8d 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1,5 +1,5 @@
 /* GNU/Linux on ARM target support.
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,6 @@
 #include "frame.h"
 #include "regcache.h"
 #include "doublest.h"
-#include "osabi.h"
 
 #include "arm-tdep.h"
 
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 7ff473f..3543cc1 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1,6 +1,6 @@
 /* Common target dependent code for GDB on ARM systems.
    Copyright 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1998, 1999, 2000,
-   2001, 2002, 2003 Free Software Foundation, Inc.
+   2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,7 +34,6 @@
 #include "value.h"
 #include "arch-utils.h"
 #include "solib-svr4.h"
-#include "osabi.h"
 
 #include "arm-tdep.h"
 #include "gdb/sim-arm.h"
@@ -159,7 +158,7 @@
 static int
 arm_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
 {
-  return (FRAME_SAVED_PC (thisframe) >= LOWEST_PC);
+  return (chain != 0 && (FRAME_SAVED_PC (thisframe) >= LOWEST_PC));
 }
 
 /* Set to true if the 32-bit mode is in use.  */
@@ -276,7 +275,7 @@
 	stmdb sp!, {}
 	sub sp, ip, #4.  */
 
-  func_start = (get_pc_function_start (get_frame_pc (fi)) + FUNCTION_START_OFFSET);
+  func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
   after_prologue = SKIP_PROLOGUE (func_start);
 
   /* There are some frameless functions whose first two instructions
@@ -291,14 +290,14 @@
 static CORE_ADDR
 arm_frame_args_address (struct frame_info *fi)
 {
-  return get_frame_base (fi);
+  return fi->frame;
 }
 
 /* The address of the local variables in the frame.  */
 static CORE_ADDR
 arm_frame_locals_address (struct frame_info *fi)
 {
-  return get_frame_base (fi);
+  return fi->frame;
 }
 
 /* The number of arguments being passed in the frame.  */
@@ -540,15 +539,15 @@
 
   /* Don't try to scan dummy frames.  */
   if (fi != NULL
-      && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
+      && DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
     return;
 
-  if (find_pc_partial_function (get_frame_pc (fi), NULL, &prologue_start, &prologue_end))
+  if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
     {
       struct symtab_and_line sal = find_pc_line (prologue_start, 0);
 
       if (sal.line == 0)		/* no line info, use current PC  */
-	prologue_end = get_frame_pc (fi);
+	prologue_end = fi->pc;
       else if (sal.end < prologue_end)	/* next line begins after fn end */
 	prologue_end = sal.end;		/* (probably means no prologue)  */
     }
@@ -557,7 +556,7 @@
        16 pushes, an add, and "mv fp,sp".  */
     prologue_end = prologue_start + 40;
 
-  prologue_end = min (prologue_end, get_frame_pc (fi));
+  prologue_end = min (prologue_end, fi->pc);
 
   /* Initialize the saved register map.  When register H is copied to
      register L, we will put H in saved_reg[L].  */
@@ -568,7 +567,7 @@
      frame pointer, adjust the stack pointer, and save registers.
      Do this until all basic prolog instructions are found.  */
 
-  get_frame_extra_info (fi)->framesize = 0;
+  fi->extra_info->framesize = 0;
   for (current_pc = prologue_start;
        (current_pc < prologue_end) && ((findmask & 7) != 7);
        current_pc += 2)
@@ -591,9 +590,9 @@
 	  for (regno = ARM_LR_REGNUM; regno >= 0; regno--)
 	    if (mask & (1 << regno))
 	      {
-		get_frame_extra_info (fi)->framesize += 4;
-		get_frame_saved_regs (fi)[saved_reg[regno]] =
-		  -(get_frame_extra_info (fi)->framesize);
+		fi->extra_info->framesize += 4;
+		fi->saved_regs[saved_reg[regno]] =
+		  -(fi->extra_info->framesize);
 		/* Reset saved register map.  */
 		saved_reg[regno] = regno;
 	      }
@@ -609,23 +608,23 @@
 	  offset = (insn & 0x7f) << 2;		/* get scaled offset */
 	  if (insn & 0x80)		/* is it signed? (==subtracting) */
 	    {
-	      get_frame_extra_info (fi)->frameoffset += offset;
+	      fi->extra_info->frameoffset += offset;
 	      offset = -offset;
 	    }
-	  get_frame_extra_info (fi)->framesize -= offset;
+	  fi->extra_info->framesize -= offset;
 	}
       else if ((insn & 0xff00) == 0xaf00)	/* add r7, sp, #imm */
 	{
 	  findmask |= 2;			/* setting of r7 found */
-	  get_frame_extra_info (fi)->framereg = THUMB_FP_REGNUM;
+	  fi->extra_info->framereg = THUMB_FP_REGNUM;
 	  /* get scaled offset */
-	  get_frame_extra_info (fi)->frameoffset = (insn & 0xff) << 2;
+	  fi->extra_info->frameoffset = (insn & 0xff) << 2;
 	}
       else if (insn == 0x466f)			/* mov r7, sp */
 	{
 	  findmask |= 2;			/* setting of r7 found */
-	  get_frame_extra_info (fi)->framereg = THUMB_FP_REGNUM;
-	  get_frame_extra_info (fi)->frameoffset = 0;
+	  fi->extra_info->framereg = THUMB_FP_REGNUM;
+	  fi->extra_info->frameoffset = 0;
 	  saved_reg[THUMB_FP_REGNUM] = ARM_SP_REGNUM;
 	}
       else if ((insn & 0xffc0) == 0x4640)	/* mov r0-r7, r8-r15 */
@@ -658,20 +657,20 @@
    in a row (once to get the frame chain, and once to fill in the
    extra frame information).  */
 
-static struct frame_info *prologue_cache;
+static struct frame_info prologue_cache;
 
 static int
 check_prologue_cache (struct frame_info *fi)
 {
   int i;
 
-  if (get_frame_pc (fi) == get_frame_pc (prologue_cache))
+  if (fi->pc == prologue_cache.pc)
     {
-      get_frame_extra_info (fi)->framereg = get_frame_extra_info (prologue_cache)->framereg;
-      get_frame_extra_info (fi)->framesize = get_frame_extra_info (prologue_cache)->framesize;
-      get_frame_extra_info (fi)->frameoffset = get_frame_extra_info (prologue_cache)->frameoffset;
+      fi->extra_info->framereg = prologue_cache.extra_info->framereg;
+      fi->extra_info->framesize = prologue_cache.extra_info->framesize;
+      fi->extra_info->frameoffset = prologue_cache.extra_info->frameoffset;
       for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
-	get_frame_saved_regs (fi)[i] = get_frame_saved_regs (prologue_cache)[i];
+	fi->saved_regs[i] = prologue_cache.saved_regs[i];
       return 1;
     }
   else
@@ -686,13 +685,13 @@
 {
   int i;
 
-  deprecated_update_frame_pc_hack (prologue_cache, get_frame_pc (fi));
-  get_frame_extra_info (prologue_cache)->framereg = get_frame_extra_info (fi)->framereg;
-  get_frame_extra_info (prologue_cache)->framesize = get_frame_extra_info (fi)->framesize;
-  get_frame_extra_info (prologue_cache)->frameoffset = get_frame_extra_info (fi)->frameoffset;
+  prologue_cache.pc = fi->pc;
+  prologue_cache.extra_info->framereg = fi->extra_info->framereg;
+  prologue_cache.extra_info->framesize = fi->extra_info->framesize;
+  prologue_cache.extra_info->frameoffset = fi->extra_info->frameoffset;
 
   for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
-    get_frame_saved_regs (prologue_cache)[i] = get_frame_saved_regs (fi)[i];
+    prologue_cache.saved_regs[i] = fi->saved_regs[i];
 }
 
 
@@ -775,12 +774,12 @@
     return;
 
   /* Assume there is no frame until proven otherwise.  */
-  get_frame_extra_info (fi)->framereg = ARM_SP_REGNUM;
-  get_frame_extra_info (fi)->framesize = 0;
-  get_frame_extra_info (fi)->frameoffset = 0;
+  fi->extra_info->framereg = ARM_SP_REGNUM;
+  fi->extra_info->framesize = 0;
+  fi->extra_info->frameoffset = 0;
 
   /* Check for Thumb prologue.  */
-  if (arm_pc_is_thumb (get_frame_pc (fi)))
+  if (arm_pc_is_thumb (fi->pc))
     {
       thumb_scan_prologue (fi);
       save_prologue_cache (fi);
@@ -789,7 +788,7 @@
 
   /* Find the function prologue.  If we can't find the function in
      the symbol table, peek in the stack frame to find the PC.  */
-  if (find_pc_partial_function (get_frame_pc (fi), NULL, &prologue_start, &prologue_end))
+  if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
     {
       /* One way to find the end of the prologue (which works well
          for unoptimized code) is to do the following:
@@ -797,7 +796,7 @@
 	    struct symtab_and_line sal = find_pc_line (prologue_start, 0);
 
 	    if (sal.line == 0)
-	      prologue_end = get_frame_pc (fi);
+	      prologue_end = fi->pc;
 	    else if (sal.end < prologue_end)
 	      prologue_end = sal.end;
 
@@ -832,7 +831,7 @@
     {
       /* Get address of the stmfd in the prologue of the callee; 
          the saved PC is the address of the stmfd + 8.  */
-      if (!safe_read_memory_integer (get_frame_base (fi), 4,  &return_value))
+      if (!safe_read_memory_integer (fi->frame, 4,  &return_value))
         return;
       else
         {
@@ -891,7 +890,7 @@
 	    if (mask & (1 << regno))
 	      {
 		sp_offset -= 4;
-		get_frame_saved_regs (fi)[regno] = sp_offset;
+		fi->saved_regs[regno] = sp_offset;
 	      }
 	}
       else if ((insn & 0xffffc000) == 0xe54b0000 ||	/* strb rx,[r11,#-n] */
@@ -914,7 +913,7 @@
 	  unsigned rot = (insn & 0xf00) >> 7;		/* rotate amount */
 	  imm = (imm >> rot) | (imm << (32 - rot));
 	  fp_offset = -imm;
-	  get_frame_extra_info (fi)->framereg = ARM_FP_REGNUM;
+	  fi->extra_info->framereg = ARM_FP_REGNUM;
 	}
       else if ((insn & 0xfffff000) == 0xe24dd000)	/* sub sp, sp #n */
 	{
@@ -927,7 +926,7 @@
 	{
 	  sp_offset -= 12;
 	  regno = ARM_F0_REGNUM + ((insn >> 12) & 0x07);
-	  get_frame_saved_regs (fi)[regno] = sp_offset;
+	  fi->saved_regs[regno] = sp_offset;
 	}
       else if ((insn & 0xffbf0fff) == 0xec2d0200)	/* sfmfd f0, 4, [sp!] */
 	{
@@ -954,7 +953,7 @@
 	  for (; fp_start_reg < fp_bound_reg; fp_start_reg++)
 	    {
 	      sp_offset -= 12;
-	      get_frame_saved_regs (fi)[fp_start_reg++] = sp_offset;
+	      fi->saved_regs[fp_start_reg++] = sp_offset;
 	    }
 	}
       else if ((insn & 0xf0000000) != 0xe0000000)
@@ -970,11 +969,11 @@
   /* The frame size is just the negative of the offset (from the
      original SP) of the last thing thing we pushed on the stack. 
      The frame offset is [new FP] - [new SP].  */
-  get_frame_extra_info (fi)->framesize = -sp_offset;
-  if (get_frame_extra_info (fi)->framereg == ARM_FP_REGNUM)
-    get_frame_extra_info (fi)->frameoffset = fp_offset - sp_offset;
+  fi->extra_info->framesize = -sp_offset;
+  if (fi->extra_info->framereg == ARM_FP_REGNUM)
+    fi->extra_info->frameoffset = fp_offset - sp_offset;
   else
-    get_frame_extra_info (fi)->frameoffset = 0;
+    fi->extra_info->frameoffset = 0;
 
   save_prologue_cache (fi);
 }
@@ -992,21 +991,20 @@
   /* NOTE: cagney/2002-05-03: This function really shouldn't be
      needed.  Instead the (still being written) register unwind
      function could be called directly.  */
-  for (; fi; fi = get_next_frame (fi))
+  for (; fi; fi = fi->next)
     {
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
+      if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
 	{
-	  return deprecated_read_register_dummy (get_frame_pc (fi),
-						 get_frame_base (fi), regnum);
+	  return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
 	}
-      else if (get_frame_saved_regs (fi)[regnum] != 0)
+      else if (fi->saved_regs[regnum] != 0)
 	{
 	  /* NOTE: cagney/2002-05-03: This would normally need to
              handle ARM_SP_REGNUM as a special case as, according to
              the frame.h comments, saved_regs[SP_REGNUM] contains the
              SP value not its address.  It appears that the ARM isn't
              doing this though.  */
-	  return read_memory_integer (get_frame_saved_regs (fi)[regnum],
+	  return read_memory_integer (fi->saved_regs[regnum],
 				      REGISTER_RAW_SIZE (regnum));
 	}
     }
@@ -1022,13 +1020,13 @@
 arm_frame_chain (struct frame_info *fi)
 {
   CORE_ADDR caller_pc;
-  int framereg = get_frame_extra_info (fi)->framereg;
+  int framereg = fi->extra_info->framereg;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
     /* A generic call dummy's frame is the same as caller's.  */
-    return get_frame_base (fi);
+    return fi->frame;
 
-  if (get_frame_pc (fi) < LOWEST_PC)
+  if (fi->pc < LOWEST_PC)
     return 0;
 
   /* If the caller is the startup code, we're at the end of the chain.  */
@@ -1040,17 +1038,25 @@
      frame register number.  */
   /* XXX Fixme, we should try to do this without creating a temporary
      caller_fi.  */
-  if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (get_frame_pc (fi)))
+  if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (fi->pc))
     {
-      struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-      struct frame_info *caller_fi =
-	deprecated_frame_xmalloc_with_cleanup (SIZEOF_FRAME_SAVED_REGS,
-					       sizeof (struct frame_extra_info));
+      struct frame_info caller_fi;
+      struct cleanup *old_chain;
+
+      /* Create a temporary frame suitable for scanning the caller's
+	 prologue.  (Ugh.)  */
+      memset (&caller_fi, 0, sizeof (caller_fi));
+      caller_fi.extra_info = (struct frame_extra_info *)
+	xcalloc (1, sizeof (struct frame_extra_info));
+      old_chain = make_cleanup (xfree, caller_fi.extra_info);
+      caller_fi.saved_regs = (CORE_ADDR *)
+	xcalloc (1, SIZEOF_FRAME_SAVED_REGS);
+      make_cleanup (xfree, caller_fi.saved_regs);
 
       /* Now, scan the prologue and obtain the frame register.  */
-      deprecated_update_frame_pc_hack (caller_fi, caller_pc);
-      arm_scan_prologue (caller_fi);
-      framereg = get_frame_extra_info (caller_fi)->framereg;
+      caller_fi.pc = caller_pc;
+      arm_scan_prologue (&caller_fi);
+      framereg = caller_fi.extra_info->framereg;
 
       /* Deallocate the storage associated with the temporary frame
 	 created above.  */
@@ -1062,7 +1068,7 @@
   if (framereg == ARM_FP_REGNUM || framereg == THUMB_FP_REGNUM)
     return arm_find_callers_reg (fi, framereg);
   else
-    return get_frame_base (fi) + get_frame_extra_info (fi)->framesize;
+    return fi->frame + fi->extra_info->framesize;
 }
 
 /* This function actually figures out the frame address for a given pc
@@ -1080,34 +1086,33 @@
   int reg;
   CORE_ADDR sp;
 
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  get_frame_extra_info (fi)->framesize = 0;
-  get_frame_extra_info (fi)->frameoffset = 0;
-  get_frame_extra_info (fi)->framereg = 0;
+  fi->extra_info->framesize = 0;
+  fi->extra_info->frameoffset = 0;
+  fi->extra_info->framereg = 0;
 
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
-  memset (get_frame_saved_regs (fi), '\000', sizeof get_frame_saved_regs (fi));
+  memset (fi->saved_regs, '\000', sizeof fi->saved_regs);
 
   /* Compute stack pointer for this frame.  We use this value for both
      the sigtramp and call dummy cases.  */
-  if (!get_next_frame (fi))
+  if (!fi->next)
     sp = read_sp();
-  else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0))
+  else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
     /* For generic dummy frames, pull the value direct from the frame.
        Having an unwind function to do this would be nice.  */
-    sp = deprecated_read_register_dummy (get_frame_pc (get_next_frame (fi)),
-					 get_frame_base (get_next_frame (fi)),
+    sp = deprecated_read_register_dummy (fi->next->pc, fi->next->frame,
 					 ARM_SP_REGNUM);
   else
-    sp = (get_frame_base (get_next_frame (fi))
-	  - get_frame_extra_info (get_next_frame (fi))->frameoffset
-	  + get_frame_extra_info (get_next_frame (fi))->framesize);
+    sp = (fi->next->frame - fi->next->extra_info->frameoffset
+	  + fi->next->extra_info->framesize);
 
   /* Determine whether or not we're in a sigtramp frame.
      Unfortunately, it isn't sufficient to test (get_frame_type (fi)
@@ -1127,50 +1132,52 @@
      before calling functions like this.  */
 
   if (SIGCONTEXT_REGISTER_ADDRESS_P () 
-      && ((get_frame_type (fi) == SIGTRAMP_FRAME) || PC_IN_SIGTRAMP (get_frame_pc (fi), (char *)0)))
+      && ((get_frame_type (fi) == SIGTRAMP_FRAME) || PC_IN_SIGTRAMP (fi->pc, (char *)0)))
     {
       for (reg = 0; reg < NUM_REGS; reg++)
-	get_frame_saved_regs (fi)[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, get_frame_pc (fi), reg);
+	fi->saved_regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, fi->pc, reg);
 
       /* FIXME: What about thumb mode?  */
-      get_frame_extra_info (fi)->framereg = ARM_SP_REGNUM;
-      deprecated_update_frame_base_hack (fi, read_memory_integer (get_frame_saved_regs (fi)[get_frame_extra_info (fi)->framereg], REGISTER_RAW_SIZE (get_frame_extra_info (fi)->framereg)));
-      get_frame_extra_info (fi)->framesize = 0;
-      get_frame_extra_info (fi)->frameoffset = 0;
+      fi->extra_info->framereg = ARM_SP_REGNUM;
+      fi->frame =
+	read_memory_integer (fi->saved_regs[fi->extra_info->framereg],
+			     REGISTER_RAW_SIZE (fi->extra_info->framereg));
+      fi->extra_info->framesize = 0;
+      fi->extra_info->frameoffset = 0;
 
     }
   else
     {
       arm_scan_prologue (fi);
 
-      if (!get_next_frame (fi))
+      if (!fi->next)
 	/* This is the innermost frame?  */
-	deprecated_update_frame_base_hack (fi, read_register (get_frame_extra_info (fi)->framereg));
-      else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0))
+	fi->frame = read_register (fi->extra_info->framereg);
+      else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0))
 	/* Next inner most frame is a dummy, just grab its frame.
            Dummy frames always have the same FP as their caller.  */
-	deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
-      else if (get_frame_extra_info (fi)->framereg == ARM_FP_REGNUM
-	       || get_frame_extra_info (fi)->framereg == THUMB_FP_REGNUM)
+	fi->frame = fi->next->frame;
+      else if (fi->extra_info->framereg == ARM_FP_REGNUM
+	       || fi->extra_info->framereg == THUMB_FP_REGNUM)
 	{
 	  /* not the innermost frame */
 	  /* If we have an FP, the callee saved it.  */
-	  if (get_frame_saved_regs (get_next_frame (fi))[get_frame_extra_info (fi)->framereg] != 0)
-	    deprecated_update_frame_base_hack (fi, read_memory_integer (get_frame_saved_regs (get_next_frame (fi))[get_frame_extra_info (fi)->framereg], 4));
+	  if (fi->next->saved_regs[fi->extra_info->framereg] != 0)
+	    fi->frame =
+	      read_memory_integer (fi->next
+				   ->saved_regs[fi->extra_info->framereg], 4);
 	  else if (fromleaf)
 	    /* If we were called by a frameless fn.  then our frame is
 	       still in the frame pointer register on the board...  */
-	    deprecated_update_frame_base_hack (fi, read_fp ());
+	    fi->frame = read_fp ();
 	}
 
       /* Calculate actual addresses of saved registers using offsets
          determined by arm_scan_prologue.  */
       for (reg = 0; reg < NUM_REGS; reg++)
-	if (get_frame_saved_regs (fi)[reg] != 0)
-	  get_frame_saved_regs (fi)[reg]
-	    += (get_frame_base (fi)
-		+ get_frame_extra_info (fi)->framesize
-		- get_frame_extra_info (fi)->frameoffset);
+	if (fi->saved_regs[reg] != 0)
+	  fi->saved_regs[reg] += (fi->frame + fi->extra_info->framesize
+				  - fi->extra_info->frameoffset);
     }
 }
 
@@ -1187,16 +1194,13 @@
 arm_frame_saved_pc (struct frame_info *fi)
 {
   /* If a dummy frame, pull the PC out of the frame's register buffer.  */
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
-    return deprecated_read_register_dummy (get_frame_pc (fi),
-					   get_frame_base (fi), ARM_PC_REGNUM);
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
+    return deprecated_read_register_dummy (fi->pc, fi->frame, ARM_PC_REGNUM);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
-				   (get_frame_base (fi)
-				    - get_frame_extra_info (fi)->frameoffset),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame - fi->extra_info->frameoffset,
+			fi->frame))
     {
-      return read_memory_integer (get_frame_saved_regs (fi)[ARM_PC_REGNUM],
+      return read_memory_integer (fi->saved_regs[ARM_PC_REGNUM],
 				  REGISTER_RAW_SIZE (ARM_PC_REGNUM));
     }
   else
@@ -1228,7 +1232,7 @@
 arm_frame_init_saved_regs (struct frame_info *fip)
 {
 
-  if (get_frame_saved_regs (fip))
+  if (fip->saved_regs)
     return;
 
   arm_init_extra_frame_info (0, fip);
@@ -1516,13 +1520,10 @@
 {
   int regnum;
   struct frame_info *frame = get_current_frame ();
-  CORE_ADDR old_SP = (get_frame_base (frame)
-		      - get_frame_extra_info (frame)->frameoffset
-		      + get_frame_extra_info (frame)->framesize);
+  CORE_ADDR old_SP = (frame->frame - frame->extra_info->frameoffset
+		      + frame->extra_info->framesize);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     {
       generic_pop_dummy_frame ();
       flush_cached_frames ();
@@ -1530,9 +1531,9 @@
     }
 
   for (regnum = 0; regnum < NUM_REGS; regnum++)
-    if (get_frame_saved_regs (frame)[regnum] != 0)
+    if (frame->saved_regs[regnum] != 0)
       write_register (regnum,
-		  read_memory_integer (get_frame_saved_regs (frame)[regnum],
+		  read_memory_integer (frame->saved_regs[regnum],
 				       REGISTER_RAW_SIZE (regnum)));
 
   write_register (ARM_PC_REGNUM, FRAME_SAVED_PC (frame));
@@ -2814,33 +2815,44 @@
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
   /* Try to deterimine the ABI of the object we are loading.  */
 
-  if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
+  if (info.abfd != NULL)
     {
-      switch (bfd_get_flavour (info.abfd))
+      osabi = gdbarch_lookup_osabi (info.abfd);
+      if (osabi == GDB_OSABI_UNKNOWN)
 	{
-	case bfd_target_aout_flavour:
-	  /* Assume it's an old APCS-style ABI.  */
-	  info.osabi = GDB_OSABI_ARM_APCS;
-	  break;
+	  switch (bfd_get_flavour (info.abfd))
+	    {
+	    case bfd_target_aout_flavour:
+	      /* Assume it's an old APCS-style ABI.  */
+	      osabi = GDB_OSABI_ARM_APCS;
+	      break;
 
-	case bfd_target_coff_flavour:
-	  /* Assume it's an old APCS-style ABI.  */
-	  /* XXX WinCE?  */
-	  info.osabi = GDB_OSABI_ARM_APCS;
-	  break;
+	    case bfd_target_coff_flavour:
+	      /* Assume it's an old APCS-style ABI.  */
+	      /* XXX WinCE?  */
+	      osabi = GDB_OSABI_ARM_APCS;
+	      break;
 
-	default:
-	  /* Leave it as "unknown".  */
+	    default:
+	      /* Leave it as "unknown".  */
+	    }
 	}
     }
 
-  /* If there is already a candidate, use it.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  /* Find a candidate among extant architectures.  */
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
 
   tdep = xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
@@ -2849,6 +2861,8 @@
      ready to unwind the PC first (see frame.c:get_prev_frame()).  */
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
 
+  tdep->osabi = osabi;
+
   /* This is the way it has always defaulted.  */
   tdep->fp_model = ARM_FLOAT_FPA;
 
@@ -2900,6 +2914,8 @@
   set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
 
   set_gdbarch_push_arguments (gdbarch, arm_push_arguments);
+  set_gdbarch_coerce_float_to_double (gdbarch,
+				      standard_coerce_float_to_double);
 
   /* Frame handling.  */
   set_gdbarch_frame_chain_valid (gdbarch, arm_frame_chain_valid);
@@ -2979,7 +2995,7 @@
 					 arm_coff_make_msymbol_special);
 
   /* Hook in the ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   /* Now we have tuned the configuration, set a few final things,
      based on what the OS ABI has told us.  */
@@ -3023,18 +3039,16 @@
   /* We can't use SIZEOF_FRAME_SAVED_REGS here, since that still
      references the old architecture vector, not the one we are
      building here.  */
-  if (get_frame_saved_regs (prologue_cache) != NULL)
-    xfree (get_frame_saved_regs (prologue_cache));
+  if (prologue_cache.saved_regs != NULL)
+    xfree (prologue_cache.saved_regs);
 
   /* We can't use NUM_REGS nor NUM_PSEUDO_REGS here, since that still
      references the old architecture vector, not the one we are
      building here.  */
-  {
-    CORE_ADDR *saved_regs = xcalloc (1, (sizeof (CORE_ADDR)
-					 * (gdbarch_num_regs (gdbarch)
-					    + gdbarch_num_pseudo_regs (gdbarch))));
-    deprecated_set_frame_saved_regs_hack (prologue_cache, saved_regs);
-  }
+  prologue_cache.saved_regs = (CORE_ADDR *)
+    xcalloc (1, (sizeof (CORE_ADDR)
+		 * (gdbarch_num_regs (gdbarch)
+		    + gdbarch_num_pseudo_regs (gdbarch))));
 
   return gdbarch;
 }
@@ -3047,6 +3061,9 @@
   if (tdep == NULL)
     return;
 
+  fprintf_unfiltered (file, "arm_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+
   fprintf_unfiltered (file, "arm_dump_tdep: Lowest pc = 0x%lx",
 		      (unsigned long) tdep->lowest_pc);
 }
@@ -3159,9 +3176,10 @@
   add_com ("othernames", class_obscure, arm_othernames,
 	   "Switch to the next set of register names.");
 
-  /* Allocate the prologue_cache.  */
-  prologue_cache = deprecated_frame_xmalloc ();
-  deprecated_set_frame_extra_info_hack (prologue_cache, xcalloc (1, sizeof (struct frame_extra_info)));
+  /* Fill in the prologue_cache fields.  */
+  prologue_cache.saved_regs = NULL;
+  prologue_cache.extra_info = (struct frame_extra_info *)
+    xcalloc (1, sizeof (struct frame_extra_info));
 
   /* Debugging flag.  */
   add_show_from_set (add_set_cmd ("arm", class_maintenance, var_zinteger,
diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h
index b8c4711..a8f1514 100644
--- a/gdb/arm-tdep.h
+++ b/gdb/arm-tdep.h
@@ -1,5 +1,5 @@
 /* Common target dependent code for GDB on ARM systems.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,8 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include "osabi.h"
+
 /* Register numbers of various important registers.  Note that some of
    these values are "real" register numbers, and correspond to the
    general registers of the machine, and some are "phony" register
@@ -122,6 +124,8 @@
 /* Target-dependent structure in gdbarch.  */
 struct gdbarch_tdep
 {
+  enum gdb_osabi osabi;		/* OS/ABI of inferior.  */
+
   enum arm_float_model fp_model; /* Floating point calling conventions.  */
 
   CORE_ADDR lowest_pc;		/* Lowest address at which instructions 
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index d12fda0..80113f5 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-specific functions for ARM running under NetBSD.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,6 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "osabi.h"
 
 #include "arm-tdep.h"
 #include "nbsd-tdep.h"
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index a4893ba..1c93860 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for Atmel AVR, for GDB.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -322,7 +322,7 @@
 }
 
 static CORE_ADDR
-avr_pointer_to_address (struct type *type, const void *buf)
+avr_pointer_to_address (struct type *type, void *buf)
 {
   CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
 
@@ -469,15 +469,15 @@
   unsigned char prologue[AVR_MAX_PROLOGUE_SIZE];
   int vpc = 0;
 
-  get_frame_extra_info (fi)->framereg = AVR_SP_REGNUM;
+  fi->extra_info->framereg = AVR_SP_REGNUM;
 
   if (find_pc_partial_function
-      (get_frame_pc (fi), &name, &prologue_start, &prologue_end))
+      (fi->pc, &name, &prologue_start, &prologue_end))
     {
       struct symtab_and_line sal = find_pc_line (prologue_start, 0);
 
       if (sal.line == 0)	/* no line info, use current PC */
-	prologue_end = get_frame_pc (fi);
+	prologue_end = fi->pc;
       else if (sal.end < prologue_end)	/* next line begins after fn end */
 	prologue_end = sal.end;	/* (probably means no prologue)  */
     }
@@ -486,12 +486,12 @@
     /* 19 pushes, an add, and "mv fp,sp" */
     prologue_end = prologue_start + AVR_MAX_PROLOGUE_SIZE;
 
-  prologue_end = min (prologue_end, get_frame_pc (fi));
+  prologue_end = min (prologue_end, fi->pc);
 
   /* Search the prologue looking for instructions that set up the
      frame pointer, adjust the stack pointer, and save registers.  */
 
-  get_frame_extra_info (fi)->framesize = 0;
+  fi->extra_info->framesize = 0;
   prologue_len = prologue_end - prologue_start;
   read_memory (prologue_start, prologue, prologue_len);
 
@@ -509,7 +509,7 @@
 	0xcd, 0xbf		/* out __SP_L__,r28 */
       };
 
-      get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
+      fi->extra_info->framereg = AVR_FP_REGNUM;
       insn = EXTRACT_INSN (&prologue[vpc]);
       /* ldi r28,lo8(<RAM_ADDR> - <LOCALS_SIZE>) */
       if ((insn & 0xf0f0) == 0xe0c0)
@@ -522,9 +522,9 @@
 	      locals |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
 	      if (memcmp (prologue + vpc + 4, img, sizeof (img)) == 0)
 		{
-		  deprecated_update_frame_base_hack (fi, locals);
+		  fi->frame = locals;
 
-		  get_frame_extra_info (fi)->is_main = 1;
+		  fi->extra_info->is_main = 1;
 		  return;
 		}
 	    }
@@ -593,17 +593,17 @@
       if (num_pushes)
 	{
 	  int from;
-	  get_frame_saved_regs (fi)[AVR_FP_REGNUM + 1] = num_pushes;
+	  fi->saved_regs[AVR_FP_REGNUM + 1] = num_pushes;
 	  if (num_pushes >= 2)
-	    get_frame_saved_regs (fi)[AVR_FP_REGNUM] = num_pushes - 1;
+	    fi->saved_regs[AVR_FP_REGNUM] = num_pushes - 1;
 	  i = 0;
 	  for (from = AVR_LAST_PUSHED_REGNUM + 1 - (num_pushes - 2);
 	       from <= AVR_LAST_PUSHED_REGNUM; ++from)
-	    get_frame_saved_regs (fi)[from] = ++i;
+	    fi->saved_regs[from] = ++i;
 	}
-      get_frame_extra_info (fi)->locals_size = loc_size;
-      get_frame_extra_info (fi)->framesize = loc_size + num_pushes;
-      get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
+      fi->extra_info->locals_size = loc_size;
+      fi->extra_info->framesize = loc_size + num_pushes;
+      fi->extra_info->framereg = AVR_FP_REGNUM;
       return;
     }
 
@@ -622,16 +622,16 @@
       if (memcmp (prologue, img, sizeof (img)) == 0)
 	{
 	  vpc += sizeof (img);
-	  get_frame_saved_regs (fi)[0] = 2;
-	  get_frame_saved_regs (fi)[1] = 1;
-	  get_frame_extra_info (fi)->framesize += 3;
+	  fi->saved_regs[0] = 2;
+	  fi->saved_regs[1] = 1;
+	  fi->extra_info->framesize += 3;
 	}
       else if (memcmp (img + 1, prologue, sizeof (img) - 1) == 0)
 	{
 	  vpc += sizeof (img) - 1;
-	  get_frame_saved_regs (fi)[0] = 2;
-	  get_frame_saved_regs (fi)[1] = 1;
-	  get_frame_extra_info (fi)->framesize += 3;
+	  fi->saved_regs[0] = 2;
+	  fi->saved_regs[1] = 1;
+	  fi->extra_info->framesize += 3;
 	}
     }
 
@@ -645,8 +645,8 @@
 	{
 	  /* Bits 4-9 contain a mask for registers R0-R32. */
 	  regno = (insn & 0x1f0) >> 4;
-	  ++get_frame_extra_info (fi)->framesize;
-	  get_frame_saved_regs (fi)[regno] = get_frame_extra_info (fi)->framesize;
+	  ++fi->extra_info->framesize;
+	  fi->saved_regs[regno] = fi->extra_info->framesize;
 	  scan_stage = 1;
 	}
       else
@@ -669,7 +669,7 @@
       if (memcmp (prologue + vpc, img, sizeof (img)) == 0)
 	{
 	  vpc += 4;
-	  get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
+	  fi->extra_info->framereg = AVR_FP_REGNUM;
 	  scan_stage = 2;
 	}
     }
@@ -718,8 +718,8 @@
 	}
       else
 	return;
-      get_frame_extra_info (fi)->locals_size = locals_size;
-      get_frame_extra_info (fi)->framesize += locals_size;
+      fi->extra_info->locals_size = locals_size;
+      fi->extra_info->framesize += locals_size;
     }
 }
 
@@ -734,41 +734,38 @@
 {
   int reg;
 
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
   frame_saved_regs_zalloc (fi);
 
-  get_frame_extra_info (fi)->return_pc = 0;
-  get_frame_extra_info (fi)->args_pointer = 0;
-  get_frame_extra_info (fi)->locals_size = 0;
-  get_frame_extra_info (fi)->framereg = 0;
-  get_frame_extra_info (fi)->framesize = 0;
-  get_frame_extra_info (fi)->is_main = 0;
+  fi->extra_info->return_pc = 0;
+  fi->extra_info->args_pointer = 0;
+  fi->extra_info->locals_size = 0;
+  fi->extra_info->framereg = 0;
+  fi->extra_info->framesize = 0;
+  fi->extra_info->is_main = 0;
 
   avr_scan_prologue (fi);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
          by assuming it's always FP.  */
-      deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi),
-									     AVR_PC_REGNUM));
+      fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
+						  AVR_PC_REGNUM);
     }
-  else if (!get_next_frame (fi))
-    /* this is the innermost frame? */
-    deprecated_update_frame_base_hack (fi, read_register (get_frame_extra_info (fi)->framereg));
-  else if (get_frame_extra_info (fi)->is_main != 1)
-    /* not the innermost frame, not `main' */
+  else if (!fi->next)		/* this is the innermost frame? */
+    fi->frame = read_register (fi->extra_info->framereg);
+  else if (fi->extra_info->is_main != 1)	/* not the innermost frame, not `main' */
     /* If we have an next frame,  the callee saved it. */
     {
-      struct frame_info *next_fi = get_next_frame (fi);
-      if (get_frame_extra_info (fi)->framereg == AVR_SP_REGNUM)
-	deprecated_update_frame_base_hack (fi, (get_frame_base (next_fi)
-						+ 2 /* ret addr */
-						+ get_frame_extra_info (next_fi)->framesize));
+      struct frame_info *next_fi = fi->next;
+      if (fi->extra_info->framereg == AVR_SP_REGNUM)
+	fi->frame =
+	  next_fi->frame + 2 /* ret addr */  + next_fi->extra_info->framesize;
       /* FIXME: I don't analyse va_args functions  */
       else
 	{
@@ -777,51 +774,50 @@
 	  unsigned int fp_low, fp_high;
 
 	  /* Scan all frames */
-	  for (; next_fi; next_fi = get_next_frame (next_fi))
+	  for (; next_fi; next_fi = next_fi->next)
 	    {
 	      /* look for saved AVR_FP_REGNUM */
-	      if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM] && !fp)
-		fp = get_frame_saved_regs (next_fi)[AVR_FP_REGNUM];
+	      if (next_fi->saved_regs[AVR_FP_REGNUM] && !fp)
+		fp = next_fi->saved_regs[AVR_FP_REGNUM];
 	      /* look for saved AVR_FP_REGNUM + 1 */
-	      if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM + 1] && !fp1)
-		fp1 = get_frame_saved_regs (next_fi)[AVR_FP_REGNUM + 1];
+	      if (next_fi->saved_regs[AVR_FP_REGNUM + 1] && !fp1)
+		fp1 = next_fi->saved_regs[AVR_FP_REGNUM + 1];
 	    }
 	  fp_low = (fp ? read_memory_unsigned_integer (avr_make_saddr (fp), 1)
 		    : read_register (AVR_FP_REGNUM)) & 0xff;
 	  fp_high =
 	    (fp1 ? read_memory_unsigned_integer (avr_make_saddr (fp1), 1) :
 	     read_register (AVR_FP_REGNUM + 1)) & 0xff;
-	  deprecated_update_frame_base_hack (fi, fp_low | (fp_high << 8));
+	  fi->frame = fp_low | (fp_high << 8);
 	}
     }
 
   /* TRoth: Do we want to do this if we are in main? I don't think we should
      since return_pc makes no sense when we are in main. */
 
-  if ((get_frame_pc (fi)) && (get_frame_extra_info (fi)->is_main == 0))
-    /* We are not in CALL_DUMMY */
+  if ((fi->pc) && (fi->extra_info->is_main == 0))	/* We are not in CALL_DUMMY */
     {
       CORE_ADDR addr;
       int i;
 
-      addr = get_frame_base (fi) + get_frame_extra_info (fi)->framesize + 1;
+      addr = fi->frame + fi->extra_info->framesize + 1;
 
       /* Return address in stack in different endianness */
 
-      get_frame_extra_info (fi)->return_pc =
+      fi->extra_info->return_pc =
 	read_memory_unsigned_integer (avr_make_saddr (addr), 1) << 8;
-      get_frame_extra_info (fi)->return_pc |=
+      fi->extra_info->return_pc |=
 	read_memory_unsigned_integer (avr_make_saddr (addr + 1), 1);
 
       /* This return address in words,
          must be converted to the bytes address */
-      get_frame_extra_info (fi)->return_pc *= 2;
+      fi->extra_info->return_pc *= 2;
 
       /* Resolve a pushed registers addresses */
       for (i = 0; i < NUM_REGS; i++)
 	{
-	  if (get_frame_saved_regs (fi)[i])
-	    get_frame_saved_regs (fi)[i] = addr - get_frame_saved_regs (fi)[i];
+	  if (fi->saved_regs[i])
+	    fi->saved_regs[i] = addr - fi->saved_regs[i];
 	}
     }
 }
@@ -837,9 +833,7 @@
   CORE_ADDR saddr;
   struct frame_info *frame = get_current_frame ();
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     {
       generic_pop_dummy_frame ();
     }
@@ -851,18 +845,18 @@
 	{
 	  /* Don't forget AVR_SP_REGNUM in a frame_saved_regs struct is the
 	     actual value we want, not the address of the value we want.  */
-	  if (get_frame_saved_regs (frame)[regnum] && regnum != AVR_SP_REGNUM)
+	  if (frame->saved_regs[regnum] && regnum != AVR_SP_REGNUM)
 	    {
-	      saddr = avr_make_saddr (get_frame_saved_regs (frame)[regnum]);
+	      saddr = avr_make_saddr (frame->saved_regs[regnum]);
 	      write_register (regnum,
 			      read_memory_unsigned_integer (saddr, 1));
 	    }
-	  else if (get_frame_saved_regs (frame)[regnum] && regnum == AVR_SP_REGNUM)
-	    write_register (regnum, get_frame_base (frame) + 2);
+	  else if (frame->saved_regs[regnum] && regnum == AVR_SP_REGNUM)
+	    write_register (regnum, frame->frame + 2);
 	}
 
       /* Don't forget the update the PC too!  */
-      write_pc (get_frame_extra_info (frame)->return_pc);
+      write_pc (frame->extra_info->return_pc);
     }
   flush_cached_frames ();
 }
@@ -872,14 +866,11 @@
 static CORE_ADDR
 avr_frame_saved_pc (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
-    return deprecated_read_register_dummy (get_frame_pc (frame),
-					   get_frame_base (frame),
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return deprecated_read_register_dummy (frame->pc, frame->frame,
 					   AVR_PC_REGNUM);
   else
-    return get_frame_extra_info (frame)->return_pc;
+    return frame->extra_info->return_pc;
 }
 
 static CORE_ADDR
@@ -1026,7 +1017,7 @@
 static CORE_ADDR
 avr_frame_address (struct frame_info *fi)
 {
-  return avr_make_saddr (get_frame_base (fi));
+  return avr_make_saddr (fi->frame);
 }
 
 /* Given a GDB frame, determine the address of the calling function's
@@ -1040,19 +1031,16 @@
 static CORE_ADDR
 avr_frame_chain (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     {
       /* initialize the return_pc now */
-      get_frame_extra_info (frame)->return_pc
-	= deprecated_read_register_dummy (get_frame_pc (frame),
-					  get_frame_base (frame),
+      frame->extra_info->return_pc
+	= deprecated_read_register_dummy (frame->pc, frame->frame,
 					  AVR_PC_REGNUM);
-      return get_frame_base (frame);
+      return frame->frame;
     }
-  return (get_frame_extra_info (frame)->is_main ? 0
-	  : get_frame_base (frame) + get_frame_extra_info (frame)->framesize + 2 /* ret addr */ );
+  return (frame->extra_info->is_main ? 0
+	  : frame->frame + frame->extra_info->framesize + 2 /* ret addr */ );
 }
 
 /* Store the address of the place in which to copy the structure the
@@ -1275,6 +1263,7 @@
   set_gdbarch_frame_args_skip (gdbarch, 0);
   set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);	/* ??? */
   set_gdbarch_frame_chain (gdbarch, avr_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, avr_frame_saved_pc);
   set_gdbarch_frame_args_address (gdbarch, avr_frame_address);
   set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index f2255f5..fa7066c 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -1157,7 +1157,7 @@
     {
       char *this_name = TYPE_FIELD_NAME (type, i);
 
-      if (this_name && strcmp (name, this_name) == 0)
+      if (this_name && STREQ (name, this_name))
 	return i;
 
       if (this_name[0] == '\0')
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 35fc798..665b1ba 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -2,7 +2,7 @@
    functions and pc values.
 
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
    Foundation, Inc.
 
    This file is part of GDB.
@@ -36,17 +36,42 @@
 #include "regcache.h"
 #include "gdb_assert.h"
 #include "dummy-frame.h"
-#include "command.h"
-#include "gdbcmd.h"
-
-/* Flag to indicate whether backtraces should stop at main.  */
-
-static int backtrace_below_main;
 
 /* Prototypes for exported functions. */
 
 void _initialize_blockframe (void);
 
+/* A default FRAME_CHAIN_VALID, in the form that is suitable for most
+   targets.  If FRAME_CHAIN_VALID returns zero it means that the given
+   frame is the outermost one and has no caller. */
+
+int
+file_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
+{
+  return ((chain) != 0
+	  && !inside_entry_file (frame_pc_unwind (thisframe)));
+}
+
+/* Use the alternate method of avoiding running up off the end of the
+   frame chain or following frames back into the startup code.  See
+   the comments in objfiles.h. */
+
+int
+func_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
+{
+  return ((chain) != 0
+	  && !inside_main_func (get_frame_pc (thisframe))
+	  && !inside_entry_func (get_frame_pc (thisframe)));
+}
+
+/* A very simple method of determining a valid frame */
+
+int
+nonnull_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
+{
+  return ((chain) != 0);
+}
+
 /* Is ADDR inside the startup file?  Note that if your machine
    has a way to detect the bottom of the stack, there is no need
    to call this function from FRAME_CHAIN_VALID; the reason for
@@ -664,86 +689,34 @@
 	  && (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
 }
 
+
 /* Function: frame_chain_valid 
    Returns true for a user frame or a call_function_by_hand dummy frame,
-   and false for the CRT0 start-up frame.  Purpose is to terminate backtrace.  */
+   and false for the CRT0 start-up frame.  Purpose is to terminate backtrace */
 
 int
-frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
+generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
 {
-  /* Don't prune CALL_DUMMY frames.  */
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame_pc_unwind (fi), fp, fp))
+    return 1;			/* don't prune CALL_DUMMY frames */
+  else				/* fall back to default algorithm (see frame.h) */
+    return (fp != 0
+	    && (INNER_THAN (get_frame_base (fi), fp)
+		|| get_frame_base (fi) == fp)
+	    && !inside_entry_file (frame_pc_unwind (fi)));
+}
+
+int
+generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
+{
   if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
       && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
-    return 1;
-
-  /* If the new frame pointer is zero, then it isn't valid.  */
-  if (fp == 0)
-    return 0;
-  
-  /* If the new frame would be inside (younger than) the previous frame,
-     then it isn't valid.  */
-  if (INNER_THAN (fp, get_frame_base (fi)))
-    return 0;
-  
-  /* If we're already inside the entry function for the main objfile, then it
-     isn't valid.  */
-  if (inside_entry_func (get_frame_pc (fi)))
-    return 0;
-
-  /* If we're inside the entry file, it isn't valid.  */
-  /* NOTE/drow 2002-12-25: should there be a way to disable this check?  It
-     assumes a single small entry file, and the way some debug readers (e.g.
-     dbxread) figure out which object is the entry file is somewhat hokey.  */
-  if (inside_entry_file (frame_pc_unwind (fi)))
-      return 0;
-
-  /* If we want backtraces to stop at main, and we're inside main, then it
-     isn't valid.  */
-  if (!backtrace_below_main && inside_main_func (get_frame_pc (fi)))
-    return 0;
-
-  /* If the architecture has a custom FRAME_CHAIN_VALID, call it now.  */
-  if (FRAME_CHAIN_VALID_P ())
-    return FRAME_CHAIN_VALID (fp, fi);
-
-  return 1;
+    return 1;			/* don't prune CALL_DUMMY frames */
+  else				/* fall back to default algorithm (see frame.h) */
+    return (fp != 0
+	    && (INNER_THAN (get_frame_base (fi), fp)
+		|| get_frame_base (fi) == fp)
+	    && !inside_main_func (get_frame_pc (fi))
+	    && !inside_entry_func (get_frame_pc (fi)));
 }
 
-void
-do_flush_frames_sfunc (char *args, int from_tty, struct cmd_list_element *c)
-{
-  int saved_level;
-  struct frame_info *cur_frame;
-
-  if (! target_has_stack)
-    return;
-
-  saved_level = frame_relative_level (get_selected_frame ());
-
-  flush_cached_frames ();
-
-  cur_frame = find_relative_frame (get_current_frame (), &saved_level);
-  select_frame (cur_frame);
-
-  /* If we were below main and backtrace-below-main was turned off,
-     SAVED_LEVEL will be non-zero.  CUR_FRAME will point to main.
-     Accept this but print the new frame.  */
-  if (saved_level != 0)
-    print_stack_frame (get_selected_frame (), -1, 0);
-}
-
-void
-_initialize_blockframe (void)
-{
-  add_setshow_boolean_cmd ("backtrace-below-main", class_obscure,
-			   &backtrace_below_main,
- "Set whether backtraces should continue past \"main\".\n"
- "Normally the caller of \"main\" is not of interest, so GDB will terminate\n"
- "the backtrace at \"main\".  Set this variable if you need to see the rest\n"
- "of the stack trace.",
- "Show whether backtraces should continue past \"main\".\n"
- "Normally the caller of \"main\" is not of interest, so GDB will terminate\n"
- "the backtrace at \"main\".  Set this variable if you need to see the rest\n"
- "of the stack trace.",
-			   do_flush_frames_sfunc, NULL, &setlist, &showlist);
-}
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 10c2bc6..88eb634 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1,7 +1,7 @@
 /* Everything about breakpoints, for GDB.
 
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
    Foundation, Inc.
 
    This file is part of GDB.
@@ -735,11 +735,9 @@
 
   ALL_BREAKPOINTS_SAFE (b, temp)
   {
-    /* Permanent breakpoints cannot be inserted or removed.  Disabled
-       breakpoints should not be inserted.  */
-    if (b->enable_state != bp_enabled)
+    if (b->enable_state == bp_permanent)
+      /* Permanent breakpoints cannot be inserted or removed.  */
       continue;
-
     if ((b->type == bp_watchpoint
 	 || b->type == bp_hardware_watchpoint
 	 || b->type == bp_read_watchpoint
@@ -761,6 +759,9 @@
 	&& b->type != bp_catch_exec
 	&& b->type != bp_catch_throw
 	&& b->type != bp_catch_catch
+	&& b->enable_state != bp_disabled
+	&& b->enable_state != bp_shlib_disabled
+	&& b->enable_state != bp_call_disabled
 	&& !b->inserted
 	&& !b->duplicate)
       {
@@ -879,6 +880,9 @@
 	  return_val = val;	/* remember failure */
       }
     else if (ep_is_exception_catchpoint (b)
+	     && b->enable_state != bp_disabled
+	     && b->enable_state != bp_shlib_disabled
+	     && b->enable_state != bp_call_disabled
 	     && !b->inserted
 	     && !b->duplicate)
 
@@ -936,6 +940,7 @@
     else if ((b->type == bp_hardware_watchpoint ||
 	      b->type == bp_read_watchpoint ||
 	      b->type == bp_access_watchpoint)
+	     && b->enable_state == bp_enabled
 	     && b->disposition != disp_del_at_next_stop
 	     && !b->inserted
 	     && !b->duplicate)
@@ -1054,6 +1059,7 @@
     else if ((b->type == bp_catch_fork
 	      || b->type == bp_catch_vfork
 	      || b->type == bp_catch_exec)
+	     && b->enable_state == bp_enabled
 	     && !b->inserted
 	     && !b->duplicate)
       {
@@ -7043,7 +7049,7 @@
 	value_free (b->val);
       b->val = evaluate_expression (b->exp);
       release_value (b->val);
-      if (VALUE_LAZY (b->val) && b->enable_state == bp_enabled)
+      if (VALUE_LAZY (b->val))
 	value_fetch_lazy (b->val);
 
       if (b->cond_string != NULL)
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index eabf8a8..8fdba5e 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -152,7 +152,7 @@
 
 /* ARGSUSED */
 void
-really_free_pendings (void *dummy)
+really_free_pendings (PTR dummy)
 {
   struct pending *next, *next1;
 
@@ -480,6 +480,10 @@
     }
 }
 
+/* OBSOLETE Note that this is only used in this file and in dstread.c, which */
+/* OBSOLETE should be fixed to not need direct access to this function.  When */
+/* OBSOLETE that is done, it can be made static again. */
+
 static struct blockvector *
 make_blockvector (struct objfile *objfile)
 {
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index b2a249c..25fe9b1 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -1,6 +1,6 @@
 /* Build symbol tables in GDB's internal format.
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1996,
-   1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+   1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -83,6 +83,16 @@
 
 EXTERN unsigned char processing_acc_compilation;
 
+/* elz: added this flag to know when a block is compiled with HP
+   compilers (cc, aCC). This is necessary because of the macro
+   COERCE_FLOAT_TO_DOUBLE defined in tm_hppa.h, which causes a
+   coercion of float to double to always occur in parameter passing
+   for a function called by gdb (see the function value_arg_coerce in
+   valops.c). This is necessary only if the target was compiled with
+   gcc, not with HP compilers or with g++ */
+
+EXTERN unsigned char processing_hp_compilation;
+
 /* Count symbols as they are processed, for error messages.  */
 
 EXTERN unsigned int symnum;
@@ -233,7 +243,7 @@
 			  CORE_ADDR start, CORE_ADDR end,
 			  struct objfile *objfile);
 
-extern void really_free_pendings (void *dummy);
+extern void really_free_pendings (PTR dummy);
 
 extern void start_subfile (char *name, char *dirname);
 
@@ -266,6 +276,12 @@
 
 extern void free_pending_blocks (void);
 
+/* OBSOLETE FIXME: Note that this is used only in buildsym.c and dstread.c, */
+/* OBSOLETE which should be fixed to not need direct access to */
+/* OBSOLETE make_blockvector. */
+
+/* OBSOLETE extern struct blockvector *make_blockvector (struct objfile *objfile); */
+
 /* FIXME: Note that this is used only in buildsym.c and dstread.c,
    which should be fixed to not need direct access to
    record_pending_block. */
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index b1e3019..fa4683a 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -1,6 +1,6 @@
 /* Support for printing C and C++ types for GDB, the GNU debugger.
    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-   1999, 2000, 2001, 2002, 2003
+   1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -216,7 +216,7 @@
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_PTR:
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 1, 1);
+      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 1);
       fprintf_filtered (stream, "*");
       c_type_print_modifier (type, stream, 1, need_post_space);
       break;
@@ -224,7 +224,7 @@
     case TYPE_CODE_MEMBER:
       if (passed_a_ptr)
 	fprintf_filtered (stream, "(");
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
+      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       fprintf_filtered (stream, " ");
       name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
       if (name)
@@ -237,7 +237,7 @@
     case TYPE_CODE_METHOD:
       if (passed_a_ptr)
 	fprintf_filtered (stream, "(");
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
+      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       if (passed_a_ptr)
 	{
 	  fprintf_filtered (stream, " ");
@@ -247,27 +247,23 @@
       break;
 
     case TYPE_CODE_REF:
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 1, 0);
+      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
       fprintf_filtered (stream, "&");
       c_type_print_modifier (type, stream, 1, need_post_space);
       break;
 
     case TYPE_CODE_FUNC:
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
+      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       if (passed_a_ptr)
 	fprintf_filtered (stream, "(");
       break;
 
     case TYPE_CODE_ARRAY:
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
+      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       if (passed_a_ptr)
 	fprintf_filtered (stream, "(");
       break;
 
-    case TYPE_CODE_TYPEDEF:
-      c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, show, 0, 0);
-      break;
-
     case TYPE_CODE_UNDEF:
     case TYPE_CODE_STRUCT:
     case TYPE_CODE_UNION:
@@ -283,6 +279,7 @@
     case TYPE_CODE_STRING:
     case TYPE_CODE_BITSTRING:
     case TYPE_CODE_COMPLEX:
+    case TYPE_CODE_TYPEDEF:
     case TYPE_CODE_TEMPLATE:
       /* These types need no prefix.  They are listed here so that
          gcc -Wall will reveal any types that haven't been handled.  */
@@ -546,22 +543,19 @@
 			   / TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
       fprintf_filtered (stream, "]");
 
-      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
-				   0, 0);
+      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       break;
 
     case TYPE_CODE_MEMBER:
       if (passed_a_ptr)
 	fprintf_filtered (stream, ")");
-      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
-				   0, 0);
+      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       break;
 
     case TYPE_CODE_METHOD:
       if (passed_a_ptr)
 	fprintf_filtered (stream, ")");
-      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
-				   0, 0);
+      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
       if (passed_a_ptr)
 	{
 	  c_type_print_args (type, stream);
@@ -570,8 +564,7 @@
 
     case TYPE_CODE_PTR:
     case TYPE_CODE_REF:
-      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
-				   1, 0);
+      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
       break;
 
     case TYPE_CODE_FUNC:
@@ -599,12 +592,7 @@
 	      }
 	  fprintf_filtered (stream, ")");
 	}
-      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
-				   passed_a_ptr, 0);
-      break;
-
-    case TYPE_CODE_TYPEDEF:
-      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, show,
+      c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
 				   passed_a_ptr, 0);
       break;
 
@@ -623,6 +611,7 @@
     case TYPE_CODE_STRING:
     case TYPE_CODE_BITSTRING:
     case TYPE_CODE_COMPLEX:
+    case TYPE_CODE_TYPEDEF:
     case TYPE_CODE_TEMPLATE:
       /* These types do not need a suffix.  They are listed so that
          gcc -Wall will report types that may not have been considered.  */
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index e7c02cc..925d9c5 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -515,7 +515,7 @@
       if (TYPE_CODE (type) == TYPE_CODE_PTR &&
 	  TYPE_NAME (type) == NULL &&
 	  TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
-	  strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
+	  STREQ (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char"))
 	{
 	  /* Print nothing */
 	}
diff --git a/gdb/charset.c b/gdb/charset.c
index d24eb70..00e1065 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -24,7 +24,7 @@
 #include "gdb_assert.h"
 
 #include <stddef.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 
 #ifdef HAVE_ICONV
@@ -442,7 +442,7 @@
 
 
 static void
-register_iconv_charsets (void)
+register_iconv_charsets ()
 {
   /* Here we should check whether various character sets were
      recognized by the local iconv implementation.
@@ -479,7 +479,7 @@
 }
 
 static void
-register_iconv_charsets (void)
+register_iconv_charsets ()
 {
 }
 
@@ -1016,7 +1016,7 @@
 
 
 const char *
-host_charset (void)
+host_charset ()
 {
   return current_host_charset->name;
 }
@@ -1032,7 +1032,7 @@
 
 
 const char *
-target_charset (void)
+target_charset ()
 {
   return current_target_charset->name;
 }
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index cb54721..e8563ff 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -19,10 +19,9 @@
 #if !defined (CLI_DECODE_H)
 #define CLI_DECODE_H 1
 
+#include "gdb_regex.h"		/* Needed by apropos_cmd.  */
 #include "command.h"
 
-struct re_pattern_buffer;
-
 #if 0
 /* FIXME: cagney/2002-03-17: Once cmd_type() has been removed, ``enum
    cmd_types'' can be moved from "command.h" to "cli-decode.h".  */
diff --git a/gdb/config.in b/gdb/config.in
index 2e49e00..921b168 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -71,10 +71,8 @@
 /* Define vfork as fork if vfork does not work.  */
 #undef vfork
 
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
+/* Define if compiling on Solaris 7. */
+#undef _MSE_INT_H
 
 /* Define if your struct reg has r_fs.  */
 #undef HAVE_STRUCT_REG_R_FS
@@ -82,6 +80,9 @@
 /* Define if your struct reg has r_gs.  */
 #undef HAVE_STRUCT_REG_R_GS
 
+/* Define if the pread64 function is available.  */
+#undef HAVE_PREAD64
+
 /* Define if <link.h> exists and defines struct link_map which has
    members with an ``l_'' prefix.  (For Solaris, SVR4, and
    SVR4-like systems.) */
@@ -146,6 +147,10 @@
    size_t, and assorted other type changes. */
 #undef PROC_SERVICE_IS_OLD
 
+/* If you want to specify a default CPU variant, define this to be its
+   name, as a C string.  */
+#undef TARGET_CPU_DEFAULT
+
 /* Define if the simulator is being linked in.  */
 #undef WITH_SIM
 
@@ -167,6 +172,15 @@
 /* Define if <sys/ptrace.h> defines the PT_GETXMMREGS request.  */
 #undef HAVE_PT_GETXMMREGS
 
+/* Define if gnu-regex.c included with GDB should be used. */
+#undef USE_INCLUDED_REGEX
+
+/* BFD's default architecture. */
+#undef DEFAULT_BFD_ARCH
+
+/* BFD's default target vector. */
+#undef DEFAULT_BFD_VEC
+
 /* Multi-arch enabled. */
 #undef GDB_MULTI_ARCH
 
@@ -188,6 +202,15 @@
 /* Define if you have the __argz_stringify function.  */
 #undef HAVE___ARGZ_STRINGIFY
 
+/* Define if you have the bcopy function.  */
+#undef HAVE_BCOPY
+
+/* Define if you have the btowc function.  */
+#undef HAVE_BTOWC
+
+/* Define if you have the bzero function.  */
+#undef HAVE_BZERO
+
 /* Define if you have the canonicalize_file_name function.  */
 #undef HAVE_CANONICALIZE_FILE_NAME
 
@@ -200,15 +223,15 @@
 /* Define if you have the getpagesize function.  */
 #undef HAVE_GETPAGESIZE
 
+/* Define if you have the isascii function.  */
+#undef HAVE_ISASCII
+
 /* Define if you have the munmap function.  */
 #undef HAVE_MUNMAP
 
 /* Define if you have the poll function.  */
 #undef HAVE_POLL
 
-/* Define if you have the pread64 function.  */
-#undef HAVE_PREAD64
-
 /* Define if you have the putenv function.  */
 #undef HAVE_PUTENV
 
@@ -254,6 +277,9 @@
 /* Define if you have the <argz.h> header file.  */
 #undef HAVE_ARGZ_H
 
+/* Define if you have the <asm/debugreg.h> header file.  */
+#undef HAVE_ASM_DEBUGREG_H
+
 /* Define if you have the <ctype.h> header file.  */
 #undef HAVE_CTYPE_H
 
@@ -290,6 +316,9 @@
 /* Define if you have the <nlist.h> header file.  */
 #undef HAVE_NLIST_H
 
+/* Define if you have the <objlist.h> header file.  */
+#undef HAVE_OBJLIST_H
+
 /* Define if you have the <poll.h> header file.  */
 #undef HAVE_POLL_H
 
@@ -314,9 +343,6 @@
 /* Define if you have the <string.h> header file.  */
 #undef HAVE_STRING_H
 
-/* Define if you have the <strings.h> header file.  */
-#undef HAVE_STRINGS_H
-
 /* Define if you have the <sys/debugreg.h> header file.  */
 #undef HAVE_SYS_DEBUGREG_H
 
@@ -392,12 +418,21 @@
 /* Define if you have the <wait.h> header file.  */
 #undef HAVE_WAIT_H
 
+/* Define if you have the <wchar.h> header file.  */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the <wctype.h> header file.  */
+#undef HAVE_WCTYPE_H
+
 /* Define if you have the dl library (-ldl).  */
 #undef HAVE_LIBDL
 
 /* Define if you have the m library (-lm).  */
 #undef HAVE_LIBM
 
+/* Define if you have the socket library (-lsocket).  */
+#undef HAVE_LIBSOCKET
+
 /* Define if you have the w library (-lw).  */
 #undef HAVE_LIBW
 
@@ -416,22 +451,9 @@
 /* Name of this package.  */
 #undef PACKAGE
 
-/* Define to BFD's default architecture.  */
-#undef DEFAULT_BFD_ARCH
-
-/* Define to BFD's default target vector.  */
-#undef DEFAULT_BFD_VEC
-
-/* Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
-   Solaris 2.[78] when using GCC.  */
-#undef _MSE_INT_H
-
 /* Define if sigsetjmp is available.  */
 #undef HAVE_SIGSETJMP
 
-/* Define to 1 if the regex included in libiberty should be used. */
-#undef USE_INCLUDED_REGEX
-
 /* Define if malloc is not declared in system header files. */
 #undef NEED_DECLARATION_MALLOC
 
@@ -498,9 +520,6 @@
 /* Define if <thread_db.h> has the TD_NOTALLOC error code. */
 #undef THREAD_DB_HAS_TD_NOTALLOC
 
-/* Define to the default OS ABI for this configuration. */
-#undef GDB_OSABI_DEFAULT
-
 /* Define to be a string naming the default host character set. */
 #undef GDB_DEFAULT_HOST_CHARSET
 
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
index 6b91a71..4f8f347 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -215,9 +215,9 @@
 #define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME)
 extern CORE_ADDR frame_saved_pc (struct frame_info *frame);
 
-#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
 
-#define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
+#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
 
 /* Set VAL to the number of args passed to frame described by FI.
    Can set VAL to -1, meaning no way to tell.  */
diff --git a/gdb/config/i386/go32.mh b/gdb/config/i386/go32.mh
index 846896b..94a7a9d 100644
--- a/gdb/config/i386/go32.mh
+++ b/gdb/config/i386/go32.mh
@@ -9,6 +9,7 @@
 NAT_FILE= nm-go32.h
 NATDEPFILES= go32-nat.o i386-nat.o
 
+TERMCAP=
 HOST_IPC=
 CC= gcc
 XM_CLIBS= -ldbg
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
index aa92499..70a30a8 100644
--- a/gdb/config/m32r/tm-m32r.h
+++ b/gdb/config/m32r/tm-m32r.h
@@ -1,6 +1,5 @@
 /* Parameters for execution on a Mitsubishi m32r processor.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-   Free Software Foundation, Inc. 
+   Copyright 1996, 1997 Free Software Foundation, Inc. 
 
    This file is part of GDB.
 
@@ -131,6 +130,8 @@
 /* mvs_check  FRAME_CHAIN */
 #define FRAME_CHAIN(fi) 		m32r_frame_chain (fi)
 
+#define FRAME_CHAIN_VALID(fp, frame)	generic_file_frame_chain_valid (fp, frame)
+
 extern CORE_ADDR m32r_find_callers_reg (struct frame_info *fi, int regnum);
 extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
 /* mvs_check  FRAME_SAVED_PC */
@@ -163,6 +164,8 @@
 /* mvs_no_check  FRAME_NUM_ARGS */
 #define FRAME_NUM_ARGS(fi) (-1)
 
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
+
 extern void m32r_write_sp (CORE_ADDR val);
 #define TARGET_WRITE_SP m32r_write_sp
 
diff --git a/gdb/config/m68k/tm-apollo68b.h b/gdb/config/m68k/tm-apollo68b.h
index f0b7488..d43eec9 100644
--- a/gdb/config/m68k/tm-apollo68b.h
+++ b/gdb/config/m68k/tm-apollo68b.h
@@ -1,5 +1,5 @@
 /* Parameters for execution on Apollo 68k running BSD.
-   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1998, 2003
+   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1998
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
@@ -26,6 +26,8 @@
 
 #include "m68k/tm-m68k.h"
 
+#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
+
 /* These are the jmp_buf registers I could guess. There are 13 registers
  * in the buffer. There are 8 data registers, 6 general address registers,
  * the Frame Pointer, the Stack Pointer, the PC and the SR in the chip. I would
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
index 11bb122..275ab62 100644
--- a/gdb/config/m68k/tm-m68kv4.h
+++ b/gdb/config/m68k/tm-m68kv4.h
@@ -1,6 +1,6 @@
 /* Target definitions for GDB on a Motorola 680x0 running SVR4.
    (Commodore Amiga with amix or Atari TT with ASV)
-   Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2003
+   Copyright 1991, 1994, 1995, 1996, 1998, 1999, 2000
    Free Software Foundation, Inc.
    Written by Fred Fish at Cygnus Support (fnf@cygint)
 
@@ -30,6 +30,10 @@
 
 #define DECR_PC_AFTER_BREAK 0	/* No decrement required */
 
+/* Use the alternate method of determining valid frame chains. */
+
+#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
+
 #include "config/tm-sysv4.h"
 #include "m68k/tm-m68k.h"
 
diff --git a/gdb/config/m68k/tm-monitor.h b/gdb/config/m68k/tm-monitor.h
index 1b00a8f..6d38b55 100644
--- a/gdb/config/m68k/tm-monitor.h
+++ b/gdb/config/m68k/tm-monitor.h
@@ -1,5 +1,5 @@
 /* Target machine definitions for a generic m68k monitor/emulator.
-   Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999, 2003
+   Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -38,4 +38,9 @@
 
 #include "m68k/tm-m68k.h"
 
+/* Need to do this for ELF targets, where we can't figure out the boundaries of
+   the entry file.  This method stops the backtrace when we reach main.  */
+
+#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
+
 /* FIXME, should do GET_LONGJMP_TARGET for newlib.  */
diff --git a/gdb/config/m68k/tm-os68k.h b/gdb/config/m68k/tm-os68k.h
index 2954570..ed1d5c8 100644
--- a/gdb/config/m68k/tm-os68k.h
+++ b/gdb/config/m68k/tm-os68k.h
@@ -1,5 +1,5 @@
 /* Parameters for execution on VxWorks m68k's, for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1989, 1991, 1998, 2003 Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1991, 1998 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
@@ -37,3 +37,11 @@
 
 #undef	FRAME_CHAIN
 #define FRAME_CHAIN(thisframe) ((thisframe)->frame? read_memory_integer ((thisframe)->frame, 4): 0)
+
+/* If the chain pointer is zero (either because the saved value fetched
+   by FRAME_CHAIN was zero, or because the current FP was zero so FRAME_CHAIN
+   never fetched anything), we are at the top of the stack.  */
+/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
+
+#undef FRAME_CHAIN_VALID
+#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index 76ac6fd..ea27ac4 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -1,6 +1,5 @@
 /* Target machine description for VxWorks m68k's, for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000,
-   2002, 2003
+   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
@@ -42,6 +41,14 @@
 #undef	FRAME_CHAIN
 #define FRAME_CHAIN(thisframe) ((thisframe)->frame? read_memory_integer ((thisframe)->frame, 4): 0)
 
+/* If the chain pointer is zero (either because the saved value fetched
+   by FRAME_CHAIN was zero, or because the current FP was zero so FRAME_CHAIN
+   never fetched anything), we are at the top of the stack.  */
+/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
+
+#undef	FRAME_CHAIN_VALID
+#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
+
 /* FIXME, Longjmp information stolen from Sun-3 config.  Dunno if right.  */
 /* Offsets (in target ints) into jmp_buf.  Not defined by Sun, but at least
    documented in a comment in <machine/setjmp.h>! */
diff --git a/gdb/config/mips/linux64.mt b/gdb/config/mips/linux64.mt
deleted file mode 100644
index 985d8f5..0000000
--- a/gdb/config/mips/linux64.mt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Target: Linux/MIPS w/ support for 64-bit ABIs
-TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
-	solib.o solib-svr4.o
-TM_FILE= tm-linux64.h
-
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/tm-linux64.h b/gdb/config/mips/tm-linux64.h
deleted file mode 100644
index 92226d7..0000000
--- a/gdb/config/mips/tm-linux64.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Target-dependent definitions for 64-bit GNU/Linux MIPS.
-
-   Copyright 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-#ifndef TM_MIPS64LINUX_H
-#define TM_MIPS64LINUX_H
-
-#include "mips/tm-mips64.h"
-#include "mips/tm-linux.h"
-
-#endif /* TM_MIPS64LINUX_H */
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index beb063e..b2d0385 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -1,6 +1,6 @@
 /* Parameters for execution on a Matsushita mn10200 processor.
 
-   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software
    Foundation, Inc.
 
    Contributed by Geoffrey Noer <noer@cygnus.com>
@@ -116,6 +116,7 @@
 
 extern CORE_ADDR mn10200_frame_chain (struct frame_info *);
 #define FRAME_CHAIN(fi) mn10200_frame_chain (fi)
+#define FRAME_CHAIN_VALID(FP, FI)	generic_file_frame_chain_valid (FP, FI)
 
 extern CORE_ADDR mn10200_find_callers_reg (struct frame_info *, int);
 extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
@@ -177,8 +178,8 @@
 
 #define FRAME_ARGS_SKIP 0
 
-#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
-#define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
+#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
 #define FRAME_NUM_ARGS(fi) (-1)
 
 extern void mn10200_pop_frame (struct frame_info *);
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 6262008..ce35906 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -1,6 +1,6 @@
 /* Parameters for execution on any Hewlett-Packard PA-RISC machine.
    Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1998, 1999, 2000 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -58,67 +58,47 @@
   ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
 #endif
 
-#if !GDB_MULTI_ARCH
 extern int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
 #define REG_STRUCT_HAS_ADDR(gcc_p,type) hppa_reg_struct_has_addr (gcc_p,type)
-#endif
 
 /* Offset from address of function to start of its code.
    Zero on most machines.  */
 
-#if !GDB_MULTI_ARCH
 #define FUNCTION_START_OFFSET 0
-#endif
 
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
-#if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_skip_prologue (CORE_ADDR);
 #define SKIP_PROLOGUE(pc) (hppa_skip_prologue (pc))
-#endif
 
 /* If PC is in some function-call trampoline code, return the PC
    where the function itself actually starts.  If not, return NULL.  */
 
-#if !GDB_MULTI_ARCH
-#define	SKIP_TRAMPOLINE_CODE(pc) hppa_skip_trampoline_code (pc)
-extern CORE_ADDR hppa_skip_trampoline_code (CORE_ADDR);
-#endif
+#define	SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, NULL)
+extern CORE_ADDR skip_trampoline_code (CORE_ADDR, char *);
 
 /* Return non-zero if we are in an appropriate trampoline. */
 
-#if !GDB_MULTI_ARCH
 #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
-   hppa_in_solib_call_trampoline (pc, name)
-extern int hppa_in_solib_call_trampoline (CORE_ADDR, char *);
-#endif
+   in_solib_call_trampoline (pc, name)
+extern int in_solib_call_trampoline (CORE_ADDR, char *);
 
-#if !GDB_MULTI_ARCH
 #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) \
-  hppa_in_solib_return_trampoline (pc, name)
-extern int hppa_in_solib_return_trampoline (CORE_ADDR, char *);
-#endif
+  in_solib_return_trampoline (pc, name)
+extern int in_solib_return_trampoline (CORE_ADDR, char *);
 
-#if !GDB_MULTI_ARCH
 #undef	SAVED_PC_AFTER_CALL
-#define SAVED_PC_AFTER_CALL(frame) hppa_saved_pc_after_call (frame)
-extern CORE_ADDR hppa_saved_pc_after_call (struct frame_info *);
-#endif
+#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call (frame)
+extern CORE_ADDR saved_pc_after_call (struct frame_info *);
 
-#if !GDB_MULTI_ARCH
 extern int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
 #define INNER_THAN(lhs,rhs) hppa_inner_than(lhs,rhs)
-#endif
 
-#if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_stack_align (CORE_ADDR sp);
 #define STACK_ALIGN(sp) hppa_stack_align (sp)
-#endif
 
-#if !GDB_MULTI_ARCH
 #define EXTRA_STACK_ALIGNMENT_NEEDED 0
-#endif
 
 /* Sequence of bytes for breakpoint instruction.  */
 
@@ -131,9 +111,7 @@
 
    Not on the PA-RISC */
 
-#if !GDB_MULTI_ARCH
 #define DECR_PC_AFTER_BREAK 0
-#endif
 
 extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
 #define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
@@ -142,15 +120,11 @@
    used in push_word and a few other places; REGISTER_RAW_SIZE is the
    real way to know how big a register is.  */
 
-#if !GDB_MULTI_ARCH
 #define REGISTER_SIZE 4
-#endif
 
 /* Number of machine registers */
 
-#if !GDB_MULTI_ARCH
 #define NUM_REGS 128
-#endif
 
 /* Initializer for an array of names of registers.
    There should be NUM_REGS strings in this initializer.
@@ -185,13 +159,9 @@
 				   other r registers.  */
 #define FLAGS_REGNUM 0		/* Various status flags */
 #define RP_REGNUM 2		/* return pointer */
-#if !GDB_MULTI_ARCH
 #define FP_REGNUM 3		/* Contains address of executing stack */
 				/* frame */
-#endif
-#if !GDB_MULTI_ARCH
 #define SP_REGNUM 30		/* Contains address of top of stack */
-#endif
 #define SAR_REGNUM 32		/* Shift Amount Register */
 #define IPSW_REGNUM 41		/* Interrupt Processor Status Word */
 #define PCOQ_HEAD_REGNUM 33	/* instruction offset queue head */
@@ -206,9 +176,7 @@
 #define CCR_REGNUM 54		/* Coprocessor Configuration Register */
 #define TR0_REGNUM 57		/* Temporary Registers (cr24 -> cr31) */
 #define CR27_REGNUM 60		/* Base register for thread-local storage, cr27 */
-#if !GDB_MULTI_ARCH
 #define FP0_REGNUM 64		/* floating point reg. 0 (fspr) */
-#endif
 #define FP4_REGNUM 72
 
 #define ARG0_REGNUM 26		/* The first argument of a callee. */
@@ -217,12 +185,8 @@
 #define ARG3_REGNUM 23		/* The fourth argument of a callee. */
 
 /* compatibility with the rest of gdb. */
-#if !GDB_MULTI_ARCH
 #define PC_REGNUM PCOQ_HEAD_REGNUM
-#endif
-#if !GDB_MULTI_ARCH
 #define NPC_REGNUM PCOQ_TAIL_REGNUM
-#endif
 
 /*
  * Processor Status Word Masks
@@ -276,60 +240,41 @@
    for register N.  On the PA-RISC, all regs are 4 bytes, including
    the FP registers (they're accessed as two 4 byte halves).  */
 
-#if !GDB_MULTI_ARCH
-extern int hppa_register_raw_size (int reg_nr);
-#define REGISTER_RAW_SIZE(N) hppa_register_raw_size (N)
-#endif
+#define REGISTER_RAW_SIZE(N) 4
 
 /* Total amount of space needed to store our copies of the machine's
    register state, the array `registers'.  */
-#if !GDB_MULTI_ARCH
 #define REGISTER_BYTES (NUM_REGS * 4)
-#endif
 
-#if !GDB_MULTI_ARCH
 extern int hppa_register_byte (int reg_nr);
 #define REGISTER_BYTE(N) hppa_register_byte (N)
-#endif
 
 /* Number of bytes of storage in the program's representation
    for register N. */
 
-#if !GDB_MULTI_ARCH
 #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
-#endif
 
 /* Largest value REGISTER_RAW_SIZE can have.  */
 
-#if !GDB_MULTI_ARCH
 #define MAX_REGISTER_RAW_SIZE 4
-#endif
 
 /* Largest value REGISTER_VIRTUAL_SIZE can have.  */
 
-#if !GDB_MULTI_ARCH
 #define MAX_REGISTER_VIRTUAL_SIZE 8
-#endif
 
-#if !GDB_MULTI_ARCH
 extern struct type * hppa_register_virtual_type (int reg_nr);
 #define REGISTER_VIRTUAL_TYPE(N) hppa_register_virtual_type (N)
-#endif
 
-#if !GDB_MULTI_ARCH
 extern void hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
 #define STORE_STRUCT_RETURN(ADDR, SP) hppa_store_struct_return (ADDR, SP)
-#endif
 
 /* Extract from an array REGBUF containing the (raw) register state
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-#if !GDB_MULTI_ARCH
 void hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf);
 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   hppa_extract_return_value (TYPE, REGBUF, VALBUF);
-#endif
 
  /* elz: decide whether the function returning a value of type type
     will put it on the stack or in the registers.
@@ -342,25 +287,23 @@
     sr1: space identifier (32-bit)
     stack: any lager than 64-bit, with the address in r28
   */
-#if !GDB_MULTI_ARCH
 extern use_struct_convention_fn hppa_use_struct_convention;
 #define USE_STRUCT_CONVENTION(gcc_p,type) hppa_use_struct_convention (gcc_p,type)
-#endif
 
 /* Write into appropriate registers a function return value
    of type TYPE, given in virtual format.  */
 
-#if !GDB_MULTI_ARCH
+
 extern void hppa_store_return_value (struct type *type, char *valbuf);
 #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
   hppa_store_return_value (TYPE, VALBUF);
-#endif
 
-#if !GDB_MULTI_ARCH
-extern CORE_ADDR hppa_extract_struct_value_address (char *regbuf);
+/* Extract from an array REGBUF containing the (raw) register state
+   the address in which a function should return its structure value,
+   as a CORE_ADDR (or an expression that can be used as one).  */
+
 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-  hppa_extract_struct_value_address (REGBUF)
-#endif
+  (*(int *)((REGBUF) + REGISTER_BYTE (28)))
 
 /* elz: Return a large value, which is stored on the stack at addr.
    This is defined only for the hppa, at this moment.  The above macro
@@ -377,15 +320,11 @@
 #define VALUE_RETURNED_FROM_STACK(valtype,addr) \
   hppa_value_returned_from_stack (valtype, addr)
 
-#if !GDB_MULTI_ARCH
 extern int hppa_cannot_store_register (int regnum);
 #define CANNOT_STORE_REGISTER(regno) hppa_cannot_store_register (regno)
-#endif
 
-#if !GDB_MULTI_ARCH
-#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) hppa_init_extra_frame_info (fromleaf, frame)
-extern void hppa_init_extra_frame_info (int, struct frame_info *);
-#endif
+#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) init_extra_frame_info (fromleaf, frame)
+extern void init_extra_frame_info (int, struct frame_info *);
 
 /* Describe the pointer in each stack frame to the previous stack frame
    (its caller).  */
@@ -397,50 +336,40 @@
    is the address of a 4-byte word containing the calling frame's
    address (previous FP).  */
 
-#if !GDB_MULTI_ARCH
-#define FRAME_CHAIN(thisframe) hppa_frame_chain (thisframe)
-extern CORE_ADDR hppa_frame_chain (struct frame_info *);
-#endif
+#define FRAME_CHAIN(thisframe) frame_chain (thisframe)
+extern CORE_ADDR frame_chain (struct frame_info *);
 
-#if !GDB_MULTI_ARCH
 extern int hppa_frame_chain_valid (CORE_ADDR, struct frame_info *);
 #define FRAME_CHAIN_VALID(chain, thisframe) hppa_frame_chain_valid (chain, thisframe)
-#endif
 
 /* Define other aspects of the stack frame.  */
 
 /* A macro that tells us whether the function invocation represented
    by FI does not have a frame on the stack associated with it.  If it
    does not, FRAMELESS is set to 1, else 0.  */
-#if !GDB_MULTI_ARCH
 #define FRAMELESS_FUNCTION_INVOCATION(FI) \
-  (hppa_frameless_function_invocation (FI))
-extern int hppa_frameless_function_invocation (struct frame_info *);
-#endif
+  (frameless_function_invocation (FI))
+extern int frameless_function_invocation (struct frame_info *);
 
-#if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
 #define FRAME_SAVED_PC(FRAME) hppa_frame_saved_pc (FRAME)
-#endif
 
-#if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
 #define FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
-#endif
 
-#if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
 #define FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
-#endif
 
-#if !GDB_MULTI_ARCH
-extern int hppa_frame_num_args (struct frame_info *frame);
-#define FRAME_NUM_ARGS(fi) hppa_frame_num_args (fi)
-#endif
+/* Set VAL to the number of args passed to frame described by FI.
+   Can set VAL to -1, meaning no way to tell.  */
 
-#if !GDB_MULTI_ARCH
+/* We can't tell how many args there are
+   now that the C compiler delays popping them.  */
+#define FRAME_NUM_ARGS(fi) (-1)
+
+/* Return number of bytes at start of arglist that are not really args.  */
+
 #define FRAME_ARGS_SKIP 0
-#endif
 
 #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
   hppa_frame_find_saved_regs (frame_info, &frame_saved_regs)
@@ -452,20 +381,13 @@
 
 /* Push an empty stack frame, to record the current PC, etc. */
 
-/* FIXME: brobecker 2002-12-26.  This macro definition takes advantage
-   of the fact that PUSH_DUMMY_FRAME is called within a function where
-   a variable inf_status of type struct inferior_status * is defined.
-   Ugh!  Until this is fixed, we will not be able to move to multiarch
-   partial.  */
-#define PUSH_DUMMY_FRAME hppa_push_dummy_frame (inf_status)
-extern void hppa_push_dummy_frame (struct inferior_status *);
+#define PUSH_DUMMY_FRAME push_dummy_frame (inf_status)
+extern void push_dummy_frame (struct inferior_status *);
 
 /* Discard from the stack the innermost frame, 
    restoring all saved registers.  */
-#if !GDB_MULTI_ARCH
 #define POP_FRAME  hppa_pop_frame ()
 extern void hppa_pop_frame (void);
-#endif
 
 #define INSTRUCTION_SIZE 4
 
@@ -552,16 +474,11 @@
                     0xe6c00002, 0xe4202000, 0x6bdf3fd1, 0x00010004,\
                     0x00151820, 0xe6c00002, 0x08000240, 0x08000240}
 
-#if !GDB_MULTI_ARCH
 #define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 28)
-#endif
 #define REG_PARM_STACK_SPACE 16
 
 #else /* defined PA_LEVEL_0 */
 
-/* FIXME: brobecker 2002-12-26.  PA_LEVEL_0 is only defined for the
-   hppa-pro target, which should be obsoleted soon.  The following
-   section will therefore not be included in the multiarch conversion.  */
 /* This is the call dummy for a level 0 PA.  Level 0's don't have space
    registers (or floating point?), so we skip all that inter-space call stuff,
    and avoid touching the fp regs.
@@ -592,12 +509,10 @@
 
 #define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 12)
 
-#endif /* defined PA_LEVEL_0 */
-
-#if !GDB_MULTI_ARCH
-#define CALL_DUMMY_START_OFFSET 0
 #endif
 
+#define CALL_DUMMY_START_OFFSET 0
+
 /* If we've reached a trap instruction within the call dummy, then
    we'll consider that to mean that we've reached the call dummy's
    end after its successful completion. */
@@ -615,31 +530,23 @@
  * inferior to do the function call.
  */
 
-/* FIXME: brobecker 2002-12-26.  This macro is going to cause us some
-   problems before we can go to multiarch partial as it has been diverted
-   on HPUX to return the value of the PC!  */
 #define FIX_CALL_DUMMY hppa_fix_call_dummy
-extern CORE_ADDR hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
-		                      struct value **, struct type *, int);
 
-#if !GDB_MULTI_ARCH
+extern CORE_ADDR
+hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
+		     struct value **, struct type *, int);
+
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
   (hppa_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
 extern CORE_ADDR
 hppa_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
-#endif
-
 
-#if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
 #define SMASH_TEXT_ADDRESS(addr) hppa_smash_text_address (addr)
-#endif
 
 #define	GDB_TARGET_IS_HPPA
 
-#if !GDB_MULTI_ARCH
 #define BELIEVE_PCC_PROMOTION 1
-#endif
 
 /*
  * Unwind table and descriptor.
@@ -766,26 +673,31 @@
 extern CORE_ADDR skip_trampoline_code (CORE_ADDR, char *);
 #endif
 
-#if !GDB_MULTI_ARCH
-#define TARGET_READ_PC(pid) hppa_target_read_pc (pid)
-extern CORE_ADDR hppa_target_read_pc (ptid_t);
-#endif
+#define TARGET_READ_PC(pid) target_read_pc (pid)
+extern CORE_ADDR target_read_pc (ptid_t);
 
-#if !GDB_MULTI_ARCH
-#define TARGET_WRITE_PC(v,pid) hppa_target_write_pc (v,pid)
-extern void hppa_target_write_pc (CORE_ADDR, ptid_t);
-#endif
+#define TARGET_WRITE_PC(v,pid) target_write_pc (v,pid)
+extern void target_write_pc (CORE_ADDR, ptid_t);
 
-#if !GDB_MULTI_ARCH
-#define TARGET_READ_FP() hppa_target_read_fp ()
-extern CORE_ADDR hppa_target_read_fp (void);
-#endif
+#define TARGET_READ_FP() target_read_fp (PIDGET (inferior_ptid))
+extern CORE_ADDR target_read_fp (int);
 
 /* For a number of horrible reasons we may have to adjust the location
    of variables on the stack.  Ugh.  */
 #define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR)
+
 extern int hpread_adjust_stack_address (CORE_ADDR);
 
+/* If the current gcc for for this target does not produce correct debugging
+   information for float parameters, both prototyped and unprototyped, then
+   define this macro.  This forces gdb to  always assume that floats are
+   passed as doubles and then converted in the callee.  */
+
+extern int hppa_coerce_float_to_double (struct type *formal,
+                                        struct type *actual);
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) \
+  hppa_coerce_float_to_double (formal, actual)
+
 /* Here's how to step off a permanent breakpoint.  */
 #define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
 extern void hppa_skip_permanent_breakpoint (void);
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 4e68de9..d94b381 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -33,24 +33,50 @@
 #include "somsolib.h"
 #endif
 
-extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
-#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
+/* Actually, for a PA running HPUX the kernel calls the signal handler
+   without an intermediate trampoline.  Luckily the kernel always sets
+   the return pointer for the signal handler to point to _sigreturn.  */
+#define PC_IN_SIGTRAMP(pc, name) (name && STREQ ("_sigreturn", name))
 
-extern void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
-                                                  CORE_ADDR *tmp);
+/* For HPUX:
+
+   The signal context structure pointer is always saved at the base
+   of the frame which "calls" the signal handler.  We only want to find
+   the hardware save state structure, which lives 10 32bit words into
+   sigcontext structure.
+
+   Within the hardware save state structure, registers are found in the
+   same order as the register numbers in GDB.
+
+   At one time we peeked at %r31 rather than the PC queues to determine
+   what instruction took the fault.  This was done on purpose, but I don't
+   remember why.  Looking at the PC queues is really the right way, and
+   I don't remember why that didn't work when this code was originally
+   written.  */
+
 #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-  hppa_hpux_frame_saved_pc_in_sigtramp (FRAME, TMP)
+{ \
+  *(TMP) = read_memory_integer ((FRAME)->frame + (43 * 4) , 4); \
+}
 
-extern void hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
-                                                  CORE_ADDR *tmp);
 #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-  hppa_hpux_frame_base_before_sigtramp (FRAME, TMP)
+{ \
+  *(TMP) = read_memory_integer ((FRAME)->frame + (40 * 4), 4); \
+}
 
-struct frame_saved_regs;
-extern void hppa_hpux_frame_find_saved_regs_in_sigtramp
-              (struct frame_info *fi, struct frame_saved_regs *fsr);
 #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-  hppa_hpux_frame_find_saved_regs_in_sigtramp (FRAME, FSR)
+{ \
+  int i; \
+  CORE_ADDR TMP; \
+  TMP = (FRAME)->frame + (10 * 4); \
+  for (i = 0; i < NUM_REGS; i++) \
+    { \
+      if (i == SP_REGNUM) \
+	(FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
+      else \
+	(FSR)->regs[i] = TMP + i * 4; \
+    } \
+}
 
 /* For HP-UX on PA-RISC we have an implementation
    for the exception handling target op (in hppa-tdep.c) */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index b43e3a3..f0a4572 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -1,7 +1,7 @@
 /* Target machine sub-parameters for SPARC, for GDB, the GNU debugger.
    This is included by other tm-*.h files to define SPARC cpu-related info.
    Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003
+   1998, 1999, 2000
    Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@mcc.com)
 
@@ -280,6 +280,14 @@
 
 extern CORE_ADDR sparc_extract_struct_value_address (char *);
 
+/* If the current gcc for for this target does not produce correct
+   debugging information for float parameters, both prototyped and
+   unprototyped, then define this macro.  This forces gdb to always
+   assume that floats are passed as doubles and then converted in the
+   callee. */
+
+#define COERCE_FLOAT_TO_DOUBLE(FORMAL, ACTUAL) (1)
+
 /* Stack must be aligned on 64-bit boundaries when synthesizing
    function calls (128-bit for sparc64).  */
 
@@ -488,9 +496,9 @@
 extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
 
 /* If the argument is on the stack, it will be here.  */
-#define FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
+#define FRAME_ARGS_ADDRESS(FI) ((FI)->frame)
 
-#define FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
+#define FRAME_LOCALS_ADDRESS(FI) ((FI)->frame)
 
 /* Set VAL to the number of args passed to frame described by FI.
    Can set VAL to -1, meaning no way to tell.  */
@@ -526,7 +534,7 @@
 #define	FRAME_SAVED_L0	0
 #define	FRAME_SAVED_I0	(8 * REGISTER_RAW_SIZE (L0_REGNUM))
 
-#define FRAME_STRUCT_ARGS_ADDRESS(FI) (get_frame_base (FI))
+#define FRAME_STRUCT_ARGS_ADDRESS(FI) ((FI)->frame)
 
 /* Things needed for making the inferior call functions.  */
 /*
@@ -649,6 +657,7 @@
 /* Call dummy method (eg. on stack, at entry point, etc.) */
 
 #define CALL_DUMMY_LOCATION ON_STACK
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
 
 /* Method for detecting dummy frames.  */
 
diff --git a/gdb/config/sparc/tm-sparclite.h b/gdb/config/sparc/tm-sparclite.h
index fb8b6d5..8fafe5e 100644
--- a/gdb/config/sparc/tm-sparclite.h
+++ b/gdb/config/sparc/tm-sparclite.h
@@ -1,5 +1,5 @@
 /* Macro definitions for GDB for a Fujitsu SPARClite.
-   Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1998, 1999, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -63,6 +63,9 @@
  * The following defines must go away for MULTI_ARCH.
  */
 
+#undef  FRAME_CHAIN_VALID
+#define FRAME_CHAIN_VALID(FP,FI) func_frame_chain_valid (FP, FI)
+
 #undef NUM_REGS
 #define NUM_REGS 80
 
diff --git a/gdb/configure b/gdb/configure
index 6c3003f..b6e9acb 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -19,17 +19,17 @@
 ac_help="$ac_help
   --with-included-gettext use the GNU gettext library included here"
 ac_help="$ac_help
-  --disable-gdbcli        disable command-line interface (CLI)"
+  --enable-multi-ice            Build the multi-ice-gdb-server"
 ac_help="$ac_help
-  --disable-gdbmi         disable machine-interface (MI)"
+  --enable-gdbcli            Enable GDB-CLI interface"
 ac_help="$ac_help
-  --enable-tui            enable full-screen terminal user interface (TUI)"
+  --enable-gdbmi            Enable GDB-MI interface"
 ac_help="$ac_help
-  --enable-gtk            enable gdbtk graphical user interface (GUI)"
+  --with-uiout          Use new uiout functions instead of *printf's"
 ac_help="$ac_help
-  --without-included-regex don't use included regex; this is the default
-                          on systems with version 2 of the GNU C library
-                          (use with caution on other system)"
+  --enable-tui            Enable full-screen terminal user interface"
+ac_help="$ac_help
+  --enable-netrom         Enable NetROM support"
 ac_help="$ac_help
   --enable-build-warnings Enable build-time compiler warnings if gcc is used"
 ac_help="$ac_help
@@ -37,6 +37,12 @@
 ac_help="$ac_help
   --with-mmalloc          Use memory mapped malloc package"
 ac_help="$ac_help
+  --with-included-regex          Use included regex"
+ac_help="$ac_help
+  --with-cpu=CPU          Set the default CPU variant to debug"
+ac_help="$ac_help
+  --enable-gdbtk          Enable GDBTK GUI front end"
+ac_help="$ac_help
   --with-tclconfig=DIR    Directory containing tcl configuration (tclConfig.sh)"
 ac_help="$ac_help
   --with-tkconfig=DIR     Directory containing tk configuration (tkConfig.sh)"
@@ -53,7 +59,7 @@
 ac_help="$ac_help
   --enable-sim            Link gdb with simulator"
 ac_help="$ac_help
-  --enable-multi-ice      build the multi-ice-gdb-server"
+  --enable-shared         Use shared libraries"
 ac_help="$ac_help
   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
 
@@ -579,7 +585,7 @@
 
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:583: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -605,7 +611,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:609: checking for $ac_word" >&5
+echo "configure:615: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -635,7 +641,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:639: checking for $ac_word" >&5
+echo "configure:645: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -686,7 +692,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:690: checking for $ac_word" >&5
+echo "configure:696: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -718,7 +724,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -729,12 +735,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 733 "configure"
+#line 739 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -760,12 +766,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:769: checking whether we are using GNU C" >&5
+echo "configure:775: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -774,7 +780,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -793,7 +799,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:797: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -824,13 +830,8 @@
   fi
 fi
 
-cat >> confdefs.h <<\EOF
-#define _GNU_SOURCE 1
-EOF
-
-
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:834: checking how to run the C preprocessor" >&5
+echo "configure:835: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -845,13 +846,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 849 "configure"
+#line 850 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -862,13 +863,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 866 "configure"
+#line 867 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -879,13 +880,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 883 "configure"
+#line 884 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -910,9 +911,9 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:914: checking for AIX" >&5
+echo "configure:915: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 916 "configure"
+#line 917 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -934,7 +935,7 @@
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:938: checking for POSIXized ISC" >&5
+echo "configure:939: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -958,7 +959,7 @@
 
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:962: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -975,7 +976,7 @@
 do
   CC="$ac_save_CC $ac_arg"
   cat > conftest.$ac_ext <<EOF
-#line 979 "configure"
+#line 980 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -1012,7 +1013,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_prog_cc_stdc="$ac_arg"; break
 else
@@ -1083,7 +1084,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1087: checking host system type" >&5
+echo "configure:1088: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1104,7 +1105,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1108: checking target system type" >&5
+echo "configure:1109: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1122,7 +1123,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1126: checking build system type" >&5
+echo "configure:1127: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1145,89 +1146,9 @@
   program_prefix=${target_alias}-
 
 
-# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
-# doesn't support cross-compilation, but the one from Autoconf 2.5x
-# does.  Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
-# deal with the lossage.  Note that CY_GNU_GETTEXT currently calls
-# AC_PROG_RANLIB.  This can be removed when we switch to # Autoconf
-# 2.5x.
-if test $host != $build; then
-  ac_tool_prefix=${host_alias}-
-else
-  ac_tool_prefix=
-fi
-
-# 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1164: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1196: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-else
-  RANLIB=":"
-fi
-fi
-
-
 ALL_LINGUAS=
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1231: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1152: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1256,7 +1177,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1260: checking for $ac_word" >&5
+echo "configure:1181: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1284,12 +1205,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1288: checking for ANSI C header files" >&5
+echo "configure:1209: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1293 "configure"
+#line 1214 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1297,7 +1218,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1314,7 +1235,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1318 "configure"
+#line 1239 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1332,7 +1253,7 @@
 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 <<EOF
-#line 1336 "configure"
+#line 1257 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1353,7 +1274,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1357 "configure"
+#line 1278 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1364,7 +1285,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1388,12 +1309,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1392: checking for working const" >&5
+echo "configure:1313: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1397 "configure"
+#line 1318 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1442,7 +1363,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1463,21 +1384,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1467: checking for inline" >&5
+echo "configure:1388: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1474 "configure"
+#line 1395 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1503,12 +1424,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1507: checking for off_t" >&5
+echo "configure:1428: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1512 "configure"
+#line 1433 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1536,12 +1457,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1540: checking for size_t" >&5
+echo "configure:1461: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1545 "configure"
+#line 1466 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1571,19 +1492,19 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1575: checking for working alloca.h" >&5
+echo "configure:1496: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1580 "configure"
+#line 1501 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -1604,12 +1525,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1608: checking for alloca" >&5
+echo "configure:1529: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1613 "configure"
+#line 1534 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1637,7 +1558,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -1669,12 +1590,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1673: checking whether alloca needs Cray hooks" >&5
+echo "configure:1594: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1678 "configure"
+#line 1599 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1699,12 +1620,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1703: checking for $ac_func" >&5
+echo "configure:1624: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1629 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1727,7 +1648,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1754,7 +1675,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1758: checking stack direction for C alloca" >&5
+echo "configure:1679: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1762,7 +1683,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1766 "configure"
+#line 1687 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1781,7 +1702,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -1806,17 +1727,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1810: checking for $ac_hdr" >&5
+echo "configure:1731: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1815 "configure"
+#line 1736 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1845,12 +1766,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1849: checking for $ac_func" >&5
+echo "configure:1770: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1854 "configure"
+#line 1775 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1873,7 +1794,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1898,7 +1819,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1902: checking for working mmap" >&5
+echo "configure:1823: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1906,7 +1827,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1910 "configure"
+#line 1831 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2046,7 +1967,7 @@
 }
 
 EOF
-if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2074,17 +1995,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2078: checking for $ac_hdr" >&5
+echo "configure:1999: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2083 "configure"
+#line 2004 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2114,12 +2035,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2118: checking for $ac_func" >&5
+echo "configure:2039: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2123 "configure"
+#line 2044 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2142,7 +2063,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2171,12 +2092,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2175: checking for $ac_func" >&5
+echo "configure:2096: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2180 "configure"
+#line 2101 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2199,7 +2120,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2233,19 +2154,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2237: checking for LC_MESSAGES" >&5
+echo "configure:2158: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2242 "configure"
+#line 2163 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -2266,7 +2187,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2270: checking whether NLS is requested" >&5
+echo "configure:2191: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
@@ -2286,7 +2207,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2290: checking whether included gettext is requested" >&5
+echo "configure:2211: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
@@ -2305,17 +2226,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2309: checking for libintl.h" >&5
+echo "configure:2230: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2314 "configure"
+#line 2235 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2332,19 +2253,19 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2336: checking for gettext in libc" >&5
+echo "configure:2257: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2341 "configure"
+#line 2262 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
 else
@@ -2360,7 +2281,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2364: checking for bindtextdomain in -lintl" >&5
+echo "configure:2285: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2368,7 +2289,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2372 "configure"
+#line 2293 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2379,7 +2300,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2395,19 +2316,19 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2399: checking for gettext in libintl" >&5
+echo "configure:2320: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2404 "configure"
+#line 2325 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libintl=yes
 else
@@ -2435,7 +2356,7 @@
 	      # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2439: checking for $ac_word" >&5
+echo "configure:2360: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2469,12 +2390,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2473: checking for $ac_func" >&5
+echo "configure:2394: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2478 "configure"
+#line 2399 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2497,7 +2418,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2524,7 +2445,7 @@
 		# Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2528: checking for $ac_word" >&5
+echo "configure:2449: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2560,7 +2481,7 @@
 		# Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2564: checking for $ac_word" >&5
+echo "configure:2485: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2592,7 +2513,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
+#line 2517 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2600,7 +2521,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2632,7 +2553,7 @@
         # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2636: checking for $ac_word" >&5
+echo "configure:2557: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2666,7 +2587,7 @@
         # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2670: checking for $ac_word" >&5
+echo "configure:2591: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2702,7 +2623,7 @@
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2706: checking for $ac_word" >&5
+echo "configure:2627: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2792,7 +2713,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2796: checking for catalogs to be installed" >&5
+echo "configure:2717: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2820,17 +2741,17 @@
       if test "$CATOBJEXT" = ".cat"; then
 	 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2824: checking for linux/version.h" >&5
+echo "configure:2745: checking for linux/version.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2829 "configure"
+#line 2750 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2909,176 +2830,57 @@
 CONFIG_INSTALL=
 CONFIG_UNINSTALL=
 
-subdirs="doc testsuite"
+SUBDIRS="doc testsuite nlm"
+configdirs="doc testsuite"
 
-configdirs=
+# Check whether --enable-multi-ice or --disable-multi-ice was given.
+if test "${enable_multi_ice+set}" = set; then
+  enableval="$enable_multi_ice"
+  case "${enableval}" in
+    yes ) enable_multi_ice="yes" ;;
+    no)  enable_multi_ice="no" ;;
+    *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
+  esac
 
-. $srcdir/configure.host
+fi
 
-. $srcdir/configure.tgt
 
-# Fetch the default architecture and default target vector from BFD.
-targ=$target; . $srcdir/../bfd/config.bfd
+if test "${enable_multi_ice}" = "yes"; then
+  configdirs="${configdirs} multi-ice"
+fi
 
-# We only want the first architecture, so strip off the others if
-# there is more than one.
-targ_archs=`echo $targ_archs | sed 's/ .*//'`
 
-if test "x$targ_archs" != x; then
-  cat >> confdefs.h <<EOF
-#define DEFAULT_BFD_ARCH $targ_archs
+. ${srcdir}/configure.host
+
+. ${srcdir}/configure.tgt
+
+targ=${target} ; . ${srcdir}/../bfd/config.bfd
+
+
+targ=${target}
+. ${srcdir}/../bfd/config.bfd
+
+targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
+
+if test x"${targ_archs}" != x ; then
+    cat >> confdefs.h <<EOF
+#define DEFAULT_BFD_ARCH ${targ_archs}
 EOF
 
 fi
-if test "x$targ_defvec" != x; then
-  cat >> confdefs.h <<EOF
-#define DEFAULT_BFD_VEC $targ_defvec
+if test x"${targ_defvec}" != x ; then
+    cat >> confdefs.h <<EOF
+#define DEFAULT_BFD_VEC ${targ_defvec}
 EOF
 
 fi
 
-if test "$program_transform_name" = s,x,x,; then
-  program_transform_name=
-else
-  # Double any \ or $.  echo might interpret backslashes.
-  cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-  rm -f conftestsed
-fi
-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"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-
-# The CLI cannot be disabled yet, but may be in the future.
-
-# Enable CLI.
-# Check whether --enable-gdbcli or --disable-gdbcli was given.
-if test "${enable_gdbcli+set}" = set; then
-  enableval="$enable_gdbcli"
-  case $enableval in
-    yes)
-      ;;
-    no)
-      { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
-    *)
-      { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
-  esac
-else
-  enable_gdbcli=yes
-fi
-
-if test x"$enable_gdbcli" = xyes; then
-  if test -d $srcdir/cli; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
-    CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
-    CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
-    CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
-    CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
-    CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
-  fi
-fi
-
-# Enable MI.
-# Check whether --enable-gdbmi or --disable-gdbmi was given.
-if test "${enable_gdbmi+set}" = set; then
-  enableval="$enable_gdbmi"
-  case $enableval in
-    yes | no)
-      ;;
-    *)
-      { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
-  esac
-else
-  enable_gdbmi=yes
-fi
-
-if test x"$enable_gdbmi" = xyes; then
-  if test -d $srcdir/mi; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
-    CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
-    CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
-    CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
-    CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
-    CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
-  fi
-fi
-
-# Enable TUI.
-# Check whether --enable-tui or --disable-tui was given.
-if test "${enable_tui+set}" = set; then
-  enableval="$enable_tui"
-  case $enableval in
-    yes | no)
-      ;;
-    *)
-      { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
-  esac
-fi
-
-if test x"$enable_tui" = xyes; then
-  if test -d $srcdir/tui; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
-    CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
-    CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
-    CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
-    CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
-    CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
-    need_curses=yes
-  fi
-fi
-
-# Enable gdbtk.
-# Check whether --enable-gdbtk or --disable-gdbtk was given.
-if test "${enable_gdbtk+set}" = set; then
-  enableval="$enable_gdbtk"
-  case $enableval in
-    yes | no)
-      ;;
-    *)
-      { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
-  esac
-else
-  if test -d $srcdir/gdbtk; then
-    enable_gdbtk=yes
-  else
-    enable_gdbtk=no
-  fi
-fi
-
-# We unconditionally disable gdbtk tests on selected platforms.
-case $host_os in
-  go32* | windows*)
-    echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
-    enable_gdbtk=no ;;
-esac
-
-# --------------------- #
-# Checks for programs.  #
-# --------------------- #
-
 for ac_prog in mawk gawk 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3082: checking for $ac_word" >&5
+echo "configure:2884: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3119,7 +2921,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3123: checking for a BSD compatible install" >&5
+echo "configure:2925: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3171,97 +2973,16 @@
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3176: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
 else
-  rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
-  rm -f conftestdata
-  ac_cv_prog_LN_S="ln -s"
-else
-  ac_cv_prog_LN_S=ln
+  ac_tool_prefix=
 fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
-  echo "$ac_t""yes" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3199: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-for ac_prog in 'bison -y' byacc
-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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3231: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_YACC="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
-  echo "$ac_t""$YACC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
 
 # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3265: checking for $ac_word" >&5
+echo "configure:2986: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3290,10 +3011,77 @@
 
 
 
+# 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3018: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3050: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  RANLIB=":"
+fi
+fi
+
 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3297: checking for $ac_word" >&5
+echo "configure:3085: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3325,7 +3113,7 @@
 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ac_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3329: checking for $ac_word" >&5
+echo "configure:3117: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3354,12 +3142,46 @@
 
 
 
+for ac_prog in 'bison -y' byacc
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3151: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_YACC="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+  echo "$ac_t""$YACC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-# Needed for GNU/Hurd.
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mig; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3363: checking for $ac_word" >&5
+echo "configure:3185: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3389,579 +3211,236 @@
 
 
 
-# ---------------------- #
-# Checks for libraries.  #
-# ---------------------- #
-
-# We might need to link with -lm; most simulators need it.
-echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3399: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lm  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3407 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+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"
 
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lm $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 
-# We need to link with -lw to get `wctype' on Solaris before Solaris
-# 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
-# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
-# is known to have this problem).  Therefore we avoid libw if we can.
-echo $ac_n "checking for wctype""... $ac_c" 1>&6
-echo "configure:3447: checking for wctype" >&5
-if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:3236: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3452 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char wctype(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char wctype();
-
-int main() {
-
-/* 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_wctype) || defined (__stub___wctype)
-choke me
-#else
-wctype();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_wctype=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_wctype=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:3493: checking for wctype in -lw" >&5
-ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lw  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3501 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char wctype();
-
-int main() {
-wctype()
-; return 0; }
-EOF
-if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lw $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-
-# Some systems (e.g. Solaris) have `socketpair' in libsocket.
-
-echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
-echo "configure:3545: checking for library containing socketpair" >&5
-if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_socketpair="no"
-cat > conftest.$ac_ext <<EOF
-#line 3552 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char socketpair();
-
-int main() {
-socketpair()
-; return 0; }
-EOF
-if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_socketpair="none required"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-test "$ac_cv_search_socketpair" = "no" && for i in socket; do
-LIBS="-l$i  $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3574 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char socketpair();
-
-int main() {
-socketpair()
-; return 0; }
-EOF
-if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_socketpair="-l$i"
-break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
-fi
-
-echo "$ac_t""$ac_cv_search_socketpair" 1>&6
-if test "$ac_cv_search_socketpair" != "no"; then
-  test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
-  
-else :
-  
-fi
-
-# Since GDB uses Readline, we need termcap functionality, so we need
-# to find a library that provides that.  When GDB is configured with
-# --enable-tui, we need full curses functionality.
-#
-# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
-# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
-# Makefile fragments.  That's why we need to have `Hcurses' before
-# `curses'.  I don't see why we should use HP curses if a more
-# standard curses is available, except that according to HP's
-# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
-# HP-UX 10.10 and 10.20.
-
-if test "$need_curses" = yes; then
-  
-echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
-echo "configure:3621: checking for library containing initscr" >&5
-if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_initscr="no"
-cat > conftest.$ac_ext <<EOF
-#line 3628 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char initscr();
-
-int main() {
-initscr()
-; return 0; }
-EOF
-if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_initscr="none required"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
-LIBS="-l$i  $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3650 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char initscr();
-
-int main() {
-initscr()
-; return 0; }
-EOF
-if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_initscr="-l$i"
-break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
-fi
-
-echo "$ac_t""$ac_cv_search_initscr" 1>&6
-if test "$ac_cv_search_initscr" != "no"; then
-  test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
-  
-else :
-  { echo "configure: error: no curses library found" 1>&2; exit 1; }
-fi
-fi
-
-case $host_os in
-  cygwin*)
-    if test -d $srcdir/libtermcap; then
-      LIBS="../libtermcap/libtermcap.a $LIBS"
-      ac_cv_search_tgetent="../libtermcap/libtermcap.a"
-    fi ;;
-  go32*)
-    # ??? Is this really true?
-    ac_cv_search_tgetent="none required"
-    ;;
-  aix*)
-    # Readline prefers curses over termcap on AIX.
-    # ??? Why?
-    
-echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
-echo "configure:3698: checking for library containing tgetent" >&5
-if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_tgetent="no"
-cat > conftest.$ac_ext <<EOF
-#line 3705 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_tgetent="none required"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
-LIBS="-l$i  $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3727 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_tgetent="-l$i"
-break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
-fi
-
-echo "$ac_t""$ac_cv_search_tgetent" 1>&6
-if test "$ac_cv_search_tgetent" != "no"; then
-  test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
-  
-else :
-  
-fi
-    ;;
-esac
-
-# Note: We used to check for libtermlib and libterminfo too, but
-# Readline doesn't, so I think we're safe with leaving them out.
-
-echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
-echo "configure:3765: checking for library containing tgetent" >&5
-if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_tgetent="no"
-cat > conftest.$ac_ext <<EOF
-#line 3772 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_tgetent="none required"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
-LIBS="-l$i  $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3794 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
-int main() {
-tgetent()
-; return 0; }
-EOF
-if { (eval echo configure:3805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_tgetent="-l$i"
-break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
-fi
-
-echo "$ac_t""$ac_cv_search_tgetent" 1>&6
-if test "$ac_cv_search_tgetent" != "no"; then
-  test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
-  
-else :
-  
-fi
-
-if test "$ac_cv_search_tgetent" = no; then
-  { echo "configure: error: no termcap library found" 1>&2; exit 1; }
-fi
-
-# ------------------------- #
-# Checks for header files.  #
-# ------------------------- #
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:3839: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3844 "configure"
+#line 3241 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
-#include <$ac_hdr>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
 int main() {
-DIR *dirp = 0;
+int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_header_dirent_$ac_safe=yes"
+  ac_cv_type_signal=void
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_header_dirent_$ac_safe=no"
+  ac_cv_type_signal=int
 fi
 rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:3278: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3283 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 3308 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  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 <<EOF
+#line 3326 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  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 <<EOF
+#line 3347 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#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)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+
+
+case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
+    cat >> confdefs.h <<\EOF
+#define _MSE_INT_H 1
+EOF
+
+esac; esac
+
+for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
+	memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
+	string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
+	term.h termio.h termios.h unistd.h wait.h sys/wait.h \
+	wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
+	time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
+	dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
+	curses.h ncurses.h \
+	poll.h sys/poll.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3402: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3407 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
 EOF
- ac_header_dirent=$ac_hdr; break
+ 
 else
   echo "$ac_t""no" 1>&6
 fi
 done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:3877: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldir  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3885 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -ldir"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:3918: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lx  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3926 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -lx"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3960: checking whether stat file-mode macros are broken" >&5
+echo "configure:3439: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3965 "configure"
+#line 3444 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -4011,1184 +3490,14 @@
 
 fi
 
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4016: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4021 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 4046 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  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 <<EOF
-#line 4064 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  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 <<EOF
-#line 4085 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#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)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-for ac_hdr in link.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4123: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4128 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in nlist.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4163: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4168 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in poll.h sys/poll.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4203: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4208 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in proc_service.h thread_db.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4243: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4248 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in stddef.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4283: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4288 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in stdlib.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4323: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4328 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in stdint.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4363: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4368 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in string.h memory.h strings.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4403: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4408 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/fault.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4443: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4448 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/file.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4483: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4488 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/filio.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4523: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4528 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/ioctl.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4563: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4568 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4603: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4608 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/proc.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4643: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4648 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/procfs.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4683: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4688 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/ptrace.h ptrace.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4723: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4728 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/reg.h sys/debugreg.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4763: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4768 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/select.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4803: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4808 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/syscall.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4843: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4848 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/user.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4883: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4888 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/wait.h wait.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4923: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4928 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in termios.h termio.h sgtty.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4963: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4968 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5003: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5008 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
-# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
-# think that we don't have <curses.h> if we're using GCC.
-case $host_os in
-  solaris2.[78])
-    if test "$GCC" = yes; then
-      cat >> confdefs.h <<\EOF
-#define _MSE_INT_H 1
-EOF
-
-    fi ;;
-esac
-for ac_hdr in curses.h ncurses.h term.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5056: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5061 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-# FIXME: kettenis/20030102: In most cases we include these
-# unconditionally, so what's the point in checking these?
-for ac_hdr in ctype.h time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5099: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5104 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-# ------------------ #
-# Checks for types.  #
-# ------------------ #
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5141: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5146 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:5163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_type_signal=void
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-
-# ------------------------------------- #
-# Checks for compiler characteristics.  #
-# ------------------------------------- #
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5187: checking for working const" >&5
+echo "configure:3496: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5192 "configure"
+#line 3501 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -5237,7 +3546,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -5258,21 +3567,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:5262: checking for inline" >&5
+echo "configure:3571: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
+#line 3578 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -5298,26 +3607,78 @@
 esac
 
 
-# ------------------------------ #
-# Checks for library functions.  #
-# ------------------------------ #
+for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
+	realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask 
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3615: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3620 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* 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
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:5309: checking for working alloca.h" >&5
+echo "configure:3670: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5314 "configure"
+#line 3675 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -5338,12 +3699,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5342: checking for alloca" >&5
+echo "configure:3703: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5347 "configure"
+#line 3708 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -5371,7 +3732,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -5403,12 +3764,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5407: checking whether alloca needs Cray hooks" >&5
+echo "configure:3768: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5412 "configure"
+#line 3773 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -5433,12 +3794,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5437: checking for $ac_func" >&5
+echo "configure:3798: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5442 "configure"
+#line 3803 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5461,7 +3822,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5488,7 +3849,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5492: checking stack direction for C alloca" >&5
+echo "configure:3853: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5496,7 +3857,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 5500 "configure"
+#line 3861 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -5515,7 +3876,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -5536,279 +3897,13 @@
 
 fi
 
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5544: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5549 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5583: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5588 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5636: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5644 "configure"
-#include "confdefs.h"
-
-/* 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 filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated 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 <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* 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 */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
-	char *data, *data2, *data3;
-	int i, pagesize;
-	int fd;
-
-	pagesize = getpagesize();
-
-	/*
-	 * First, make a file with some known garbage in it.
-	 */
-	data = malloc(pagesize);
-	if (!data)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		*(data + i) = rand();
-	umask(0);
-	fd = creat("conftestmmap", 0600);
-	if (fd < 0)
-		exit(1);
-	if (write(fd, data, pagesize) != pagesize)
-		exit(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("conftestmmap", O_RDWR);
-	if (fd < 0)
-		exit(1);
-	data2 = malloc(2 * pagesize);
-	if (!data2)
-		exit(1);
-	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data2 + i))
-			exit(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 = malloc(pagesize);
-	if (!data3)
-		exit(1);
-	if (read(fd, data3, pagesize) != pagesize)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data3 + i))
-			exit(1);
-	close(fd);
-	unlink("conftestmmap");
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_func_mmap_fixed_mapped=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5807: checking for pid_t" >&5
+echo "configure:3902: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5812 "configure"
+#line 3907 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5837,17 +3932,17 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:5841: checking for vfork.h" >&5
+echo "configure:3936: checking for vfork.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5846 "configure"
+#line 3941 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5872,18 +3967,18 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:5876: checking for working vfork" >&5
+echo "configure:3971: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:5882: checking for vfork" >&5
+echo "configure:3977: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5887 "configure"
+#line 3982 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -5906,7 +4001,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -5928,7 +4023,7 @@
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 5932 "configure"
+#line 4027 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -6023,7 +4118,7 @@
   }
 }
 EOF
-if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -6045,395 +4140,9 @@
 
 fi
 
-for ac_func in canonicalize_file_name realpath
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6052: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6057 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in poll
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6107: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6112 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in pread64
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6162: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6167 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in sbrk
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6217: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6222 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in setpgid setpgrp
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6272: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6277 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in sigaction sigprocmask sigsetmask
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6327: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6332 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in socketpair
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6382: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6387 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* 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
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
 if test "$cross_compiling" = no; then
   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6437: checking whether setpgrp takes no argument" >&5
+echo "configure:4146: checking whether setpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6441,7 +4150,7 @@
   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 6445 "configure"
+#line 4154 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -6461,7 +4170,7 @@
 }
 
 EOF
-if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setpgrp_void=no
 else
@@ -6486,12 +4195,12 @@
 
 else
   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6490: checking whether setpgrp takes no argument" >&5
+echo "configure:4199: checking whether setpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6495 "configure"
+#line 4204 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -6505,7 +4214,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_func_setpgrp_void=no
 else
@@ -6529,12 +4238,12 @@
 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
 # since sigsetjmp might only be defined as a macro.
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:6533: checking for sigsetjmp" >&5
+echo "configure:4242: checking for sigsetjmp" >&5
 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6538 "configure"
+#line 4247 "configure"
 #include "confdefs.h"
 
 #include <setjmp.h>
@@ -6543,7 +4252,7 @@
 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
 ; return 0; }
 EOF
-if { (eval echo configure:6547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_func_sigsetjmp=yes
 else
@@ -6563,75 +4272,22 @@
 
 fi
 
-# Assume we'll default to using the included libiberty regex.
-gdb_use_included_regex=yes
-
-# However, if the system regex is GNU regex, then default to *not*
-# using the included regex.
-echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6573: checking for GNU regex" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6578 "configure"
-#include "confdefs.h"
-#include <gnu-versions.h>
-int main() {
-#define REGEX_INTERFACE_VERSION 1
-#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
-# error "Version mismatch"
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:6588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  gdb_cv_have_gnu_regex=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gdb_cv_have_gnu_regex=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
-if test $gdb_cv_have_gnu_regex = yes; then
-  gdb_use_included_regex=no
-fi
-
-# Check whether --with-included-regex or --without-included-regex was given.
-if test "${with_included_regex+set}" = set; then
-  withval="$with_included_regex"
-  gdb_with_regex=$withval
-else
-  gdb_with_regex=$gdb_use_included_regex
-fi
-
-if test "$gdb_with_regex" = yes; then
-  cat >> confdefs.h <<\EOF
-#define USE_INCLUDED_REGEX 1
-EOF
-
-fi
-
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:6623: checking for r_fs in struct reg" >&5
+echo "configure:4279: checking for r_fs in struct reg" >&5
 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6628 "configure"
+#line 4284 "configure"
 #include "confdefs.h"
 #include <machine/reg.h>
 int main() {
 struct reg r; r.r_fs;
 ; return 0; }
 EOF
-if { (eval echo configure:6635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_struct_reg_r_fs=yes
 else
@@ -6651,19 +4307,19 @@
 
 fi
 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:6655: checking for r_gs in struct reg" >&5
+echo "configure:4311: checking for r_gs in struct reg" >&5
 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6660 "configure"
+#line 4316 "configure"
 #include "confdefs.h"
 #include <machine/reg.h>
 int main() {
 struct reg r; r.r_gs;
 ; return 0; }
 EOF
-if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_struct_reg_r_gs=yes
 else
@@ -6685,19 +4341,19 @@
 
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:6689: checking for PTRACE_GETREGS" >&5
+echo "configure:4345: checking for PTRACE_GETREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6694 "configure"
+#line 4350 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_ptrace_getregs=yes
 else
@@ -6719,19 +4375,19 @@
 
 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:6723: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:4379: checking for PTRACE_GETFPXREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6728 "configure"
+#line 4384 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETFPXREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_ptrace_getfpxregs=yes
 else
@@ -6753,12 +4409,12 @@
 
 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:6757: checking for PT_GETDBREGS" >&5
+echo "configure:4413: checking for PT_GETDBREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6762 "configure"
+#line 4418 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -6766,7 +4422,7 @@
 PT_GETDBREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_pt_getdbregs=yes
 else
@@ -6788,12 +4444,12 @@
 
 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:6792: checking for PT_GETXMMREGS" >&5
+echo "configure:4448: checking for PT_GETXMMREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6797 "configure"
+#line 4453 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -6801,7 +4457,7 @@
 PT_GETXMMREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_pt_getxmmregs=yes
 else
@@ -6822,13 +4478,117 @@
 fi
 
 
+echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
+echo "configure:4483: checking for socketpair in -lsocket" >&5
+ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4491 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socketpair();
+
+int main() {
+socketpair()
+; return 0; }
+EOF
+if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lsocket $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+for ac_func in socketpair
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4532: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4537 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* 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
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:6827: checking whether malloc must be declared" >&5
+echo "configure:4587: checking whether malloc must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6832 "configure"
+#line 4592 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6849,7 +4609,7 @@
 char *(*pfn) = (char *(*)) malloc
 ; return 0; }
 EOF
-if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_malloc=no
 else
@@ -6870,12 +4630,12 @@
 fi
 
 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:6874: checking whether realloc must be declared" >&5
+echo "configure:4634: checking whether realloc must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6879 "configure"
+#line 4639 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6896,7 +4656,7 @@
 char *(*pfn) = (char *(*)) realloc
 ; return 0; }
 EOF
-if { (eval echo configure:6900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_realloc=no
 else
@@ -6917,12 +4677,12 @@
 fi
 
 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:6921: checking whether free must be declared" >&5
+echo "configure:4681: checking whether free must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6926 "configure"
+#line 4686 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6943,7 +4703,7 @@
 char *(*pfn) = (char *(*)) free
 ; return 0; }
 EOF
-if { (eval echo configure:6947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_free=no
 else
@@ -6964,12 +4724,12 @@
 fi
 
 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:6968: checking whether strerror must be declared" >&5
+echo "configure:4728: checking whether strerror must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6973 "configure"
+#line 4733 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6990,7 +4750,7 @@
 char *(*pfn) = (char *(*)) strerror
 ; return 0; }
 EOF
-if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strerror=no
 else
@@ -7011,12 +4771,12 @@
 fi
 
 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:7015: checking whether strdup must be declared" >&5
+echo "configure:4775: checking whether strdup must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7020 "configure"
+#line 4780 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -7037,7 +4797,7 @@
 char *(*pfn) = (char *(*)) strdup
 ; return 0; }
 EOF
-if { (eval echo configure:7041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strdup=no
 else
@@ -7058,12 +4818,12 @@
 fi
 
 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:7062: checking whether strstr must be declared" >&5
+echo "configure:4822: checking whether strstr must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7067 "configure"
+#line 4827 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -7084,7 +4844,7 @@
 char *(*pfn) = (char *(*)) strstr
 ; return 0; }
 EOF
-if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strstr=no
 else
@@ -7105,12 +4865,12 @@
 fi
 
 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:7109: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:4869: checking whether canonicalize_file_name must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7114 "configure"
+#line 4874 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -7131,7 +4891,7 @@
 char *(*pfn) = (char *(*)) canonicalize_file_name
 ; return 0; }
 EOF
-if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_canonicalize_file_name=no
 else
@@ -7157,9 +4917,9 @@
 # could be expunged. --jsm 1999-03-22
 
 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:7161: checking for HPUX save_state structure" >&5
+echo "configure:4921: checking for HPUX save_state structure" >&5
 cat > conftest.$ac_ext <<EOF
-#line 7163 "configure"
+#line 4923 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -7174,7 +4934,7 @@
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 7178 "configure"
+#line 4938 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -7244,12 +5004,12 @@
 
 if test "$ac_cv_header_sys_procfs_h" = yes; then
   echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7248: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5008: checking for pstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7253 "configure"
+#line 5013 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7258,7 +5018,7 @@
 pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=yes
 else
@@ -7280,12 +5040,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
 
   echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7284: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:5044: checking for prrun_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7289 "configure"
+#line 5049 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7294,7 +5054,7 @@
 prrun_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prrun_t=yes
 else
@@ -7316,12 +5076,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
 
   echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7320: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:5080: checking for gregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7325 "configure"
+#line 5085 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7330,7 +5090,7 @@
 gregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_gregset_t=yes
 else
@@ -7352,12 +5112,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
 
   echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7356: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:5116: checking for fpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7361 "configure"
+#line 5121 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7366,7 +5126,7 @@
 fpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_fpregset_t=yes
 else
@@ -7388,12 +5148,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
 
   echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7392: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:5152: checking for prgregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7397 "configure"
+#line 5157 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7402,7 +5162,7 @@
 prgregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset_t=yes
 else
@@ -7424,12 +5184,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
 
   echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7428: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:5188: checking for prfpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7433 "configure"
+#line 5193 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7438,7 +5198,7 @@
 prfpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
 else
@@ -7460,12 +5220,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
 
   echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7464: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:5224: checking for prgregset32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7469 "configure"
+#line 5229 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7474,7 +5234,7 @@
 prgregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
 else
@@ -7496,12 +5256,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
 
   echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7500: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:5260: checking for prfpregset32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7505 "configure"
+#line 5265 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7510,7 +5270,7 @@
 prfpregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
 else
@@ -7532,12 +5292,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
 
   echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7536: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:5296: checking for lwpid_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7541 "configure"
+#line 5301 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7546,7 +5306,7 @@
 lwpid_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpid_t=yes
 else
@@ -7568,12 +5328,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
 
   echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7572: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:5332: checking for psaddr_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7577 "configure"
+#line 5337 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7582,7 +5342,7 @@
 psaddr_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psaddr_t=yes
 else
@@ -7604,12 +5364,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
 
   echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7608: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:5368: checking for prsysent_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7613 "configure"
+#line 5373 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7618,7 +5378,7 @@
 prsysent_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prsysent_t=yes
 else
@@ -7640,12 +5400,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
 
   echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7644: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:5404: checking for pr_sigset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7649 "configure"
+#line 5409 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7654,7 +5414,7 @@
 pr_sigset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
 else
@@ -7676,12 +5436,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
 
   echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7680: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:5440: checking for pr_sigaction64_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7685 "configure"
+#line 5445 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7690,7 +5450,7 @@
 pr_sigaction64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
 else
@@ -7712,12 +5472,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
 
   echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7716: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:5476: checking for pr_siginfo64_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7721 "configure"
+#line 5481 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -7726,7 +5486,7 @@
 pr_siginfo64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
 else
@@ -7753,7 +5513,7 @@
         
   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
     echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:7757: checking whether prfpregset_t type is broken" >&5
+echo "configure:5517: checking whether prfpregset_t type is broken" >&5
     if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7761,7 +5521,7 @@
   gdb_cv_prfpregset_t_broken=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 7765 "configure"
+#line 5525 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
        int main ()
@@ -7771,7 +5531,7 @@
          return 0;
        }
 EOF
-if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_prfpregset_t_broken=no
 else
@@ -7796,12 +5556,12 @@
 
   
   echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7800: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:5560: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7805 "configure"
+#line 5565 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 #include <sys/types.h>
@@ -7814,7 +5574,7 @@
   
 ; return 0; }
 EOF
-if { (eval echo configure:7818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_procfs_piocset=yes
 else
@@ -7838,19 +5598,19 @@
 if test ${host} = ${target} ; then
     
   echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:7842: checking for member l_addr in struct link_map" >&5
+echo "configure:5602: checking for member l_addr in struct link_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7847 "configure"
+#line 5607 "configure"
 #include "confdefs.h"
 #include <link.h>
 int main() {
 struct link_map lm; (void) lm.l_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:7854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map_with_l_members=yes
 else
@@ -7872,12 +5632,12 @@
 
     
   echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:7876: checking for member lm_addr in struct link_map" >&5
+echo "configure:5636: checking for member lm_addr in struct link_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7881 "configure"
+#line 5641 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <link.h>
@@ -7885,7 +5645,7 @@
 struct link_map lm; (void) lm.lm_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:7889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map_with_lm_members=yes
 else
@@ -7907,12 +5667,12 @@
 
     
   echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:7911: checking for member som_addr in struct so_map" >&5
+echo "configure:5671: checking for member som_addr in struct so_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7916 "configure"
+#line 5676 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_NLIST_H
@@ -7923,7 +5683,7 @@
 struct so_map lm; (void) lm.som_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:7927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_so_map_with_som_members=yes
 else
@@ -7945,12 +5705,12 @@
 
     
   echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:7949: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:5709: checking for struct link_map32 in sys/link.h" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7954 "configure"
+#line 5714 "configure"
 #include "confdefs.h"
 #define _SYSCALL32
 #include <sys/link.h>
@@ -7958,7 +5718,7 @@
 struct link_map32 l;
 ; return 0; }
 EOF
-if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map32=yes
 else
@@ -7983,14 +5743,146 @@
   fi
 fi
 
+echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:5748: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5756 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lm $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
+echo "configure:5792: checking for wctype in -lc" >&5
+ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lc  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5800 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char wctype();
+
+int main() {
+wctype()
+; return 0; }
+EOF
+if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  : 
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
+echo "configure:5830: checking for wctype in -lw" >&5
+ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lw  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5838 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char wctype();
+
+int main() {
+wctype()
+; return 0; }
+EOF
+if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lw $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
 
 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:7989: checking for long long support in compiler" >&5
+echo "configure:5881: checking for long long support in compiler" >&5
 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7994 "configure"
+#line 5886 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -8000,7 +5892,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_c_long_long=yes
 else
@@ -8022,7 +5914,7 @@
 
 
 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:8026: checking for long long support in printf" >&5
+echo "configure:5918: checking for long long support in printf" >&5
 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8030,7 +5922,7 @@
   gdb_cv_printf_has_long_long=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 8034 "configure"
+#line 5926 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -8044,7 +5936,7 @@
   return (strcmp ("0x0123456789abcdef", buf));
 }
 EOF
-if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_printf_has_long_long=yes
 else
@@ -8068,19 +5960,19 @@
 
 
 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:8072: checking for long double support in compiler" >&5
+echo "configure:5964: checking for long double support in compiler" >&5
 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8077 "configure"
+#line 5969 "configure"
 #include "confdefs.h"
 
 int main() {
 long double foo;
 ; return 0; }
 EOF
-if { (eval echo configure:8084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_long_double=yes
 else
@@ -8102,7 +5994,7 @@
 
 
 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:8106: checking for long double support in printf" >&5
+echo "configure:5998: checking for long double support in printf" >&5
 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8110,7 +6002,7 @@
   gdb_cv_printf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 8114 "configure"
+#line 6006 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -8120,7 +6012,7 @@
   return (strncmp ("3.14159", buf, 7));
 }
 EOF
-if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_printf_has_long_double=yes
 else
@@ -8144,7 +6036,7 @@
 
 
 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:8148: checking for long double support in scanf" >&5
+echo "configure:6040: checking for long double support in scanf" >&5
 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8152,7 +6044,7 @@
   gdb_cv_scanf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 8156 "configure"
+#line 6048 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -8162,7 +6054,7 @@
   return !(f > 3.14159 && f < 3.14160);
 }
 EOF
-if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_scanf_has_long_double=yes
 else
@@ -8184,10 +6076,277 @@
 fi
 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
 
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6084: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6089 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6123: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6128 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* 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
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:6176: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6184 "configure"
+#include "confdefs.h"
+
+/* 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 filesystem buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propogated 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 <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+
+/* 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 */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+	char *data, *data2, *data3;
+	int i, pagesize;
+	int fd;
+
+	pagesize = getpagesize();
+
+	/*
+	 * First, make a file with some known garbage in it.
+	 */
+	data = malloc(pagesize);
+	if (!data)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		*(data + i) = rand();
+	umask(0);
+	fd = creat("conftestmmap", 0600);
+	if (fd < 0)
+		exit(1);
+	if (write(fd, data, pagesize) != pagesize)
+		exit(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("conftestmmap", O_RDWR);
+	if (fd < 0)
+		exit(1);
+	data2 = malloc(2 * pagesize);
+	if (!data2)
+		exit(1);
+	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data2 + i))
+			exit(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 = malloc(pagesize);
+	if (!data3)
+		exit(1);
+	if (read(fd, data3, pagesize) != pagesize)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data3 + i))
+			exit(1);
+	close(fd);
+	unlink("conftestmmap");
+	exit(0);
+}
+
+EOF
+if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
 case ${host_os} in
 aix*)
   echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:8191: checking for -bbigtoc option" >&5
+echo "configure:6350: checking for -bbigtoc option" >&5
 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8201,14 +6360,14 @@
 
     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
     cat > conftest.$ac_ext <<EOF
-#line 8205 "configure"
+#line 6364 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -8231,7 +6390,7 @@
    case ${host_os} in
    hpux*)
       echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:8235: checking for HPUX/OSF thread support" >&5
+echo "configure:6394: checking for HPUX/OSF thread support" >&5
       if test -f /usr/include/dce/cma_config.h ; then
          if test "$GCC" = "yes" ; then
             echo "$ac_t""yes" 1>&6
@@ -8254,7 +6413,7 @@
       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
       # the same API.
       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:8258: checking for Solaris thread debugging library" >&5
+echo "configure:6417: checking for Solaris thread debugging library" >&5
       if test -f /usr/lib/libthread_db.so.1 ; then
          echo "$ac_t""yes" 1>&6
          cat >> confdefs.h <<\EOF
@@ -8264,7 +6423,7 @@
          CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:8268: checking for dlopen in -ldl" >&5
+echo "configure:6427: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -8272,7 +6431,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8276 "configure"
+#line 6435 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8283,7 +6442,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8315,17 +6474,17 @@
             # all symbols visible in the dynamic symbol table.
             hold_ldflags=$LDFLAGS
             echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:8319: checking for the ld -export-dynamic flag" >&5
+echo "configure:6478: checking for the ld -export-dynamic flag" >&5
             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
             cat > conftest.$ac_ext <<EOF
-#line 8322 "configure"
+#line 6481 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   found=yes
 else
@@ -8344,13 +6503,13 @@
 	 # Sun randomly tweaked the prototypes in <proc_service.h>
 	 # at one point.
 	 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:8348: checking if <proc_service.h> is old" >&5
+echo "configure:6507: checking if <proc_service.h> is old" >&5
 	 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	    cat > conftest.$ac_ext <<EOF
-#line 8354 "configure"
+#line 6513 "configure"
 #include "confdefs.h"
 
 		#include <proc_service.h>
@@ -8361,7 +6520,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_proc_service_is_old=no
 else
@@ -8387,12 +6546,12 @@
       ;;
    aix*)
       echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:8391: checking for AiX thread debugging library" >&5
+echo "configure:6550: checking for AiX thread debugging library" >&5
       if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8396 "configure"
+#line 6555 "configure"
 #include "confdefs.h"
 #include <sys/pthdebug.h>
 int main() {
@@ -8401,7 +6560,7 @@
                                     #endif
 ; return 0; }
 EOF
-if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_aix_thread_debug=yes
 else
@@ -8426,19 +6585,19 @@
 
 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
    echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:8430: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:6589: checking whether <thread_db.h> has TD_NOTALLOC" >&5
 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8435 "configure"
+#line 6594 "configure"
 #include "confdefs.h"
 #include <thread_db.h>
 int main() {
 int i = TD_NOTALLOC;
 ; return 0; }
 EOF
-if { (eval echo configure:8442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_thread_db_h_has_td_notalloc=yes
 else
@@ -8461,6 +6620,177 @@
 
 fi
 
+if test $host = $target; then
+  case $target in
+    *-linux*)
+      save_CFLAGS=$CFLAGS
+      CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
+      cat > conftest.$ac_ext <<EOF
+#line 6630 "configure"
+#include "confdefs.h"
+#include <unistd.h>
+int main() {
+pread64 (0, NULL, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
+		   cat >> confdefs.h <<\EOF
+#define HAVE_PREAD64 1
+EOF
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+      CFLAGS=$save_CFLAGS
+      ;;
+  esac
+fi
+
+
+# Check whether --enable-gdbcli or --disable-gdbcli was given.
+if test "${enable_gdbcli+set}" = set; then
+  enableval="$enable_gdbcli"
+  
+  case "${enableval}" in
+    yes) enable_gdbcli=yes ;;
+    "") enable_gdbcli=yes ;;
+    no) 
+      { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
+    ;;
+    *)
+      { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
+    ;;
+  esac
+
+else
+  enable_gdbcli=yes
+fi
+
+case ${enable_gdbcli} in
+  "yes" )
+    if test -d "${srcdir}/cli" ; then
+      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
+      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
+      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
+      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
+      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
+      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
+      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
+    fi
+    ;;
+esac
+
+
+# Check whether --enable-gdbmi or --disable-gdbmi was given.
+if test "${enable_gdbmi+set}" = set; then
+  enableval="$enable_gdbmi"
+  
+  case "${enable_gdbmi}" in
+    yes | no) ;;
+    "")  enable_gdbmi=yes ;;
+    *)
+      { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
+    ;;
+  esac
+
+else
+  enable_gdbmi=yes
+fi
+
+case ${enable_gdbmi} in
+  "yes" )
+    if test -d "${srcdir}/mi" ; then
+      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
+      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
+      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
+      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
+      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
+      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
+      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
+    fi
+    ;;
+esac
+
+# Configure UI_OUT by default (before 5.2 it can be disabled)
+# It must be configured if gdbmi is configured
+
+UIOUT_CFLAGS=
+
+
+# Check whether --with-uiout or --without-uiout was given.
+if test "${with_uiout+set}" = set; then
+  withval="$with_uiout"
+  case "${withval}" in
+  yes)  want_uiout=true ;;
+  no)   if test $enable_gdbmi = yes; then
+          { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
+        else
+           want_uiout=false
+        fi ;;
+  *)    { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
+esac
+else
+  want_uiout=true
+fi
+
+if test $want_uiout = true; then
+   UIOUT_CFLAGS="-DUI_OUT=1"
+fi
+
+# Check whether --enable-tui or --disable-tui was given.
+if test "${enable_tui+set}" = set; then
+  enableval="$enable_tui"
+  
+  case "${enable_tui}" in
+    yes | no) ;;
+    "")  enable_tui=yes ;;
+    *)
+      { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
+    ;;
+  esac
+
+fi
+
+case ${enable_tui} in
+  "yes" )
+    if test -d "${srcdir}/tui" ; then
+      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
+      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
+      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
+      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
+      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
+      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
+      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
+    fi
+    ;;
+esac
+
+# Check whether --enable-netrom or --disable-netrom was given.
+if test "${enable_netrom+set}" = set; then
+  enableval="$enable_netrom"
+  case "${enableval}" in
+yes)	enable_netrom=yes ;;
+no)	enable_netrom=no ;;
+*)	{ echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
+esac
+fi
+
+
+if test "${enable_netrom}" = "yes"; then
+	CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" 
+        CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
+fi
+
 
 # NOTE: Don't add -Wall or -Wunused, they both include
 # -Wunused-parameter which reports bogus warnings.
@@ -8511,7 +6841,7 @@
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
     echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:8515: checking compiler warning flags" >&5
+echo "configure:6845: checking compiler warning flags" >&5
     # Separate out the -Werror flag as some files just cannot be
     # compiled with it enabled.
     for w in ${build_warnings}; do
@@ -8521,14 +6851,14 @@
 	    saved_CFLAGS="$CFLAGS"
 	    CFLAGS="$CFLAGS $w"
 	    cat > conftest.$ac_ext <<EOF
-#line 8525 "configure"
+#line 6855 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
@@ -8574,14 +6904,72 @@
    MMALLOC='../mmalloc/libmmalloc.a'
 fi
 
+# Check whether --with-included-regex or --without-included-regex was given.
+if test "${with_included_regex+set}" = set; then
+  withval="$with_included_regex"
+  case "${withval}" in
+  yes)  want_included_regex=true ;;
+  no)   want_included_regex=false;;
+  *)    { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
+esac
+else
+  want_included_regex=true
+fi
+
+if test $want_included_regex = false; then
+  echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
+echo "configure:6922: checking for GNU regex" >&5
+  if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6927 "configure"
+#include "confdefs.h"
+#include <gnu-versions.h>
+#include <sys/types.h>
+#include <regex.h>
+int main() {
+#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
+#error No valid GNU regex.
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gdb_cv_have_gnu_regex=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gdb_cv_have_gnu_regex=no
+fi
+rm -f conftest*
+fi
+
+  echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
+  if test $gdb_cv_have_gnu_regex = no; then
+	want_included_regex=true
+  fi
+fi
+
+if test x${want_included_regex} = xtrue; then
+    REGEX="gnu-regex.o"
+    cat >> confdefs.h <<\EOF
+#define USE_INCLUDED_REGEX 1
+EOF
+
+fi
+
+
 # In the Cygwin environment, we need some additional flags.
 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:8580: checking for cygwin" >&5
+echo "configure:6968: checking for cygwin" >&5
 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8585 "configure"
+#line 6973 "configure"
 #include "confdefs.h"
 
 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -8610,6 +6998,263 @@
 esac
 
 
+
+if test x$gdb_host = xgo32; then
+  TERM_LIB=
+else
+if test x$gdb_cv_os_cygwin = xyes; then
+  TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
+else
+  TERM_LIB=
+  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
+echo "configure:7011: checking for tgetent in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lncurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7019 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERM_LIB=-lncurses
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
+echo "configure:7049: checking for tgetent in -lHcurses" >&5
+ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lHcurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7057 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERM_LIB=-lHcurses
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
+echo "configure:7087: checking for tgetent in -ltermlib" >&5
+ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ltermlib  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7095 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:7106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERM_LIB=-ltermlib
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
+echo "configure:7125: checking for tgetent in -ltermcap" >&5
+ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ltermcap  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7133 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:7144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERM_LIB=-ltermcap
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
+echo "configure:7163: checking for tgetent in -lcurses" >&5
+ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7171 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:7182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERM_LIB=-lcurses
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
+echo "configure:7201: checking for tgetent in -lterminfo" >&5
+ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lterminfo  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7209 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERM_LIB=-lterminfo
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+
+  if test "x$TERM_LIB" = x
+  then
+    { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
+  fi
+fi
+fi
+
+
 # libreadline needs libuser32.a in a cygwin environment
 WIN32LIBS=
 if test x$gdb_cv_os_cygwin = xyes; then
@@ -8626,6 +7271,83 @@
 
 
 
+# Check whether --with-cpu or --without-cpu was given.
+if test "${with_cpu+set}" = set; then
+  withval="$with_cpu"
+  case "${target}" in
+  powerpc-* | powerpcle-* )
+    ## It would be nice to keep this table in sync with the one in
+    ## gcc/configure.
+    case "${with_cpu}" in
+      ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
+      | 604 | 750 )
+        ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
+      ;;
+      common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) 
+        ## These are all RS6000 variants, as far as GDB is concerned.
+        with_cpu=rs6000
+      ;;
+      603e | ec603e )
+        with_cpu=603
+      ;;
+      604e )
+	with_cpu=604
+      ;;
+      * )
+        echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
+	with_cpu=ppc-uisa
+      ;;
+    esac
+  ;;
+  * )
+    echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
+  ;;
+esac
+cat >> confdefs.h <<EOF
+#define TARGET_CPU_DEFAULT "${with_cpu}"
+EOF
+
+
+fi
+
+
+
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+  enableval="$enable_gdbtk"
+  case "${enableval}" in
+    yes)
+	case "$host" in
+	*go32*)
+	    echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
+	    enable_gdbtk=no ;;
+	*windows*)
+	    echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
+	    enable_gdbtk=no ;;
+	*)
+	    enable_gdbtk=yes ;;
+	esac ;;
+    no)
+	enable_gdbtk=no  ;;
+    *)
+	{ echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
+esac
+else
+  
+# Default is on for everything but go32 and Cygwin
+case "$host" in
+    *go32* | *windows*)
+	;;
+    *)
+ 	if test -d "${srcdir}/gdbtk" ; then
+            enable_gdbtk=yes
+	fi
+	;;
+esac
+
+fi
+
+
 WIN32LDAPP=
 
 
@@ -8659,7 +7381,7 @@
 fi
 
   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:8663: checking for Tcl configuration" >&5
+echo "configure:7385: checking for Tcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8767,7 +7489,7 @@
 fi
 
   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:8771: checking for Tk configuration" >&5
+echo "configure:7493: checking for Tk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8876,7 +7598,7 @@
 
 no_tcl=true
 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:8880: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7602: checking for Tcl private headers. dir=${configdir}" >&5
 # Check whether --with-tclinclude or --without-tclinclude was given.
 if test "${with_tclinclude+set}" = set; then
   withval="$with_tclinclude"
@@ -8942,17 +7664,17 @@
 if test x"${ac_cv_c_tclh}" = x ; then
    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:8946: checking for tclInt.h" >&5
+echo "configure:7668: checking for tclInt.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8951 "configure"
+#line 7673 "configure"
 #include "confdefs.h"
 #include <tclInt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9012,7 +7734,7 @@
 #
 no_tk=true
 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:9016: checking for Tk private headers" >&5
+echo "configure:7738: checking for Tk private headers" >&5
 # Check whether --with-tkinclude or --without-tkinclude was given.
 if test "${with_tkinclude+set}" = set; then
   withval="$with_tkinclude"
@@ -9078,17 +7800,17 @@
 if test x"${ac_cv_c_tkh}" = x ; then
    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:9082: checking for tk.h" >&5
+echo "configure:7804: checking for tk.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9087 "configure"
+#line 7809 "configure"
 #include "confdefs.h"
 #include <tk.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9134,7 +7856,7 @@
 
 	   
 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9138: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7860: checking for Itcl private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itclh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
     if test -f $i/generic/itcl.h ; then
@@ -9157,7 +7879,7 @@
 
 	   
 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9161: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7883: checking for Itk private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itkh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
     if test -f $i/generic/itk.h ; then
@@ -9212,7 +7934,7 @@
 fi
 
   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9216: checking for Itcl configuration" >&5
+echo "configure:7938: checking for Itcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9315,7 +8037,7 @@
 fi
 
   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:9319: checking for Itk configuration" >&5
+echo "configure:8041: checking for Itk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9437,6 +8159,7 @@
 	fi
     fi
 
+    SUBDIRS="${SUBDIRS} gdbtk"
     configdirs="${configdirs} gdbtk"
 fi
 
@@ -9458,7 +8181,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:9462: checking for X" >&5
+echo "configure:8185: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -9520,12 +8243,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 9524 "configure"
+#line 8247 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9594,14 +8317,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9598 "configure"
+#line 8321 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -9741,6 +8464,69 @@
 
 
 
+# Begin stuff to support --enable-shared
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *) shared=true ;;
+esac
+fi
+
+HLDFLAGS=
+HLDENV=
+# If we have shared libraries, try to set rpath reasonably.
+if test "${shared}" = "true"; then
+  case "${host}" in
+  *-*-hpux*)
+    HLDFLAGS='-Wl,+s,+b,$(libdir)'
+    ;;
+  *-*-irix5* | *-*-irix6*)
+    HLDFLAGS='-Wl,-rpath,$(libdir)'
+    ;;
+  *-*-linux*aout*)
+    ;;
+  *-*-linux* | *-pc-linux-gnu*)
+    HLDFLAGS='-Wl,-rpath,$(libdir)'
+    ;;
+  *-*-solaris*)
+    HLDFLAGS='-R $(libdir)'
+    ;;
+  *-*-sysv4*)
+    HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
+    ;;
+  esac
+fi
+
+# On SunOS, if the linker supports the -rpath option, use it to
+# prevent ../bfd and ../opcodes from being included in the run time
+# search path.
+case "${host}" in
+  *-*-sunos*)
+    echo 'main () { }' > conftest.c
+    ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
+    if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'No such file' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
+      :
+    elif test "${shared}" = "true"; then
+      HLDFLAGS='-Wl,-rpath=$(libdir)'
+    else
+      HLDFLAGS='-Wl,-rpath='
+    fi
+    rm -f conftest.t conftest.c conftest
+    ;;
+esac
+
+
+# End stuff to support --enable-shared
+
 # target_subdir is used by the testsuite to find the target libraries.
 target_subdir=
 if test "${host}" != "${target}"; then
@@ -9823,41 +8609,23 @@
     *)  { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
 esac
 
-if test x"${gdb_osabi}" != x ; then
-    cat >> confdefs.h <<EOF
-#define GDB_OSABI_DEFAULT $gdb_osabi
-EOF
-
+if test "${enable_multi_ice}" = "yes"; then
+  SUBDIRS="${SUBDIRS} multi-ice"
 fi
 
-# Enable multi-ice-gdb-server.
-# Check whether --enable-multi-ice or --disable-multi-ice was given.
-if test "${enable_multi_ice+set}" = set; then
-  enableval="$enable_multi_ice"
-  case $enableval in
-    yes | no)
-      ;;
-    *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
-  esac
+# ``gdbserver'' can only be built in a native configuration.
+if test x"${target}" = x"${host}"; then
+    echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
+echo "configure:8620: checking whether gdbserver is supported on this host" >&5
+    if test x"${build_gdbserver}" = xyes ; then
+	configdirs="${configdirs} gdbserver"
+	SUBDIRS="${SUBDIRS} gdbserver"
+	echo "$ac_t""yes" 1>&6
+    else
+	echo "$ac_t""no" 1>&6
+    fi
 fi
 
-if test "x$enable_multi_ice" = xyes; then
-  configdirs="$configdirs multi-ice"
-fi
-
-# We only build gdbserver automatically if host and target are the same.
-if test "x$target" = "x$host"; then
-  echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:9852: checking whether gdbserver is supported on this host" >&5
-  if test "x$build_gdbserver" = xyes; then
-    configdirs="$configdirs gdbserver"
-    echo "$ac_t""yes" 1>&6
-  else
-    echo "$ac_t""no" 1>&6
-  fi
-fi
-
-subdirs="doc testsuite $configdirs"
 
 
 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
@@ -9909,15 +8677,37 @@
 fi
 
 
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:8682: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:9916: checking for Cygwin environment" >&5
+echo "configure:8706: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9921 "configure"
+#line 8711 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -9928,7 +8718,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:9932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -9945,19 +8735,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:9949: checking for mingw32 environment" >&5
+echo "configure:8739: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9954 "configure"
+#line 8744 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:9961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -9976,7 +8766,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:9980: checking for executable suffix" >&5
+echo "configure:8770: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9986,7 +8776,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -10028,7 +8818,7 @@
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10032: checking for iconv" >&5
+echo "configure:8822: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10036,7 +8826,7 @@
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 10040 "configure"
+#line 8830 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -10046,7 +8836,7 @@
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:10050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -10058,7 +8848,7 @@
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 10062 "configure"
+#line 8852 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -10068,7 +8858,7 @@
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:10072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_lib_iconv=yes
         am_cv_func_iconv=yes
@@ -10089,13 +8879,13 @@
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10093: checking for iconv declaration" >&5
+echo "configure:8883: checking for iconv declaration" >&5
     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
       cat > conftest.$ac_ext <<EOF
-#line 10099 "configure"
+#line 8889 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -10114,7 +8904,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:10118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -10142,6 +8932,8 @@
   
 
 
+subdirs="$configdirs"
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -10295,8 +9087,8 @@
 s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
-s%@RANLIB@%$RANLIB%g
 s%@SET_MAKE@%$SET_MAKE%g
+s%@RANLIB@%$RANLIB%g
 s%@ALLOCA@%$ALLOCA%g
 s%@USE_NLS@%$USE_NLS%g
 s%@MSGFMT@%$MSGFMT%g
@@ -10318,23 +9110,24 @@
 s%@GT_YES@%$GT_YES%g
 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
 s%@l@%$l%g
-s%@subdirs@%$subdirs%g
 s%@AWK@%$AWK%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@LN_S@%$LN_S%g
-s%@YACC@%$YACC%g
 s%@AR@%$AR%g
 s%@DLLTOOL@%$DLLTOOL%g
 s%@WINDRES@%$WINDRES%g
+s%@YACC@%$YACC%g
 s%@MIG@%$MIG%g
 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
+s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
 s%@MMALLOC@%$MMALLOC%g
+s%@REGEX@%$REGEX%g
 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
+s%@TERM_LIB@%$TERM_LIB%g
 s%@WIN32LIBS@%$WIN32LIBS%g
 s%@LIBGUI@%$LIBGUI%g
 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
@@ -10401,17 +9194,22 @@
 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
+s%@HLDFLAGS@%$HLDFLAGS%g
+s%@HLDENV@%$HLDENV%g
 s%@target_subdir@%$target_subdir%g
 /@host_makefile_frag@/r $host_makefile_frag
 s%@host_makefile_frag@%%g
 /@target_makefile_frag@/r $target_makefile_frag
 s%@target_makefile_frag@%%g
 s%@frags@%$frags%g
+s%@SUBDIRS@%$SUBDIRS%g
 s%@xm_h@%$xm_h%g
 s%@tm_h@%$tm_h%g
 s%@nm_h@%$nm_h%g
+s%@LN_S@%$LN_S%g
 s%@EXEEXT@%$EXEEXT%g
 s%@LIBICONV@%$LIBICONV%g
+s%@subdirs@%$subdirs%g
 
 CEOF
 EOF
@@ -10725,7 +9523,7 @@
     esac
   done
 
-  for ac_config_dir in doc testsuite $configdirs; do
+  for ac_config_dir in $configdirs; do
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
diff --git a/gdb/configure.host b/gdb/configure.host
index fc16f17..883538d 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -15,6 +15,7 @@
 hppa*)			gdb_host_cpu=pa ;;
 i[3456]86*)		gdb_host_cpu=i386 ;;
 m68*)			gdb_host_cpu=m68k ;;
+# OBSOLETE m88*)			gdb_host_cpu=m88k ;;
 mips*)			gdb_host_cpu=mips ;;
 powerpc*)		gdb_host_cpu=powerpc ;;
 sparcv9 | sparc64)	gdb_host_cpu=sparc ;;
@@ -53,6 +54,7 @@
 i[3456]86-sequent-bsd*)	gdb_host=symmetry ;;  # dynix
 i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
 i[3456]86-sequent-sysv*) gdb_host=ptx ;;
+# OBSOLETE i[3456]86-*-aix*)	gdb_host=i386aix ;;
 i[3456]86-*-bsd*)	gdb_host=i386bsd ;;
 i[3456]86-*-dgux*)	gdb_host=i386dgux ;;
 i[3456]86-*-freebsd*)	gdb_host=fbsd ;;
@@ -63,8 +65,11 @@
 i[3456]86-*-msdosdjgpp*) gdb_host=go32 ;;
 i[3456]86-*-linux*)	gdb_host=linux ;;
 i[3456]86-*-lynxos*)	gdb_host=i386lynx ;;
+# OBSOLETE i[3456]86-*-mach3*)	gdb_host=i386m3 ;;
+# OBSOLETE i[3456]86-*-mach*)	gdb_host=i386mach ;;
 i[3456]86-*-gnu*)	gdb_host=i386gnu ;;
 i[3456]86-*-openbsd*)	gdb_host=obsd ;;
+# OBSOLETE i[3456]86-*-osf1mk*)	gdb_host=i386mk ;;
 i[3456]86-*-sco3.2v5*)	gdb_host=i386sco5 ;;
 i[3456]86-*-sco3.2v4*)	gdb_host=i386sco4 ;;
 i[3456]86-*-sco*)	gdb_host=i386sco ;;
@@ -86,8 +91,12 @@
 m680[01]0-sun-sunos3*)	gdb_host=sun2os3 ;;
 m680[01]0-sun-sunos4*)	gdb_host=sun2os4 ;;
 
+# OBSOLETE m68*-apollo*-sysv*)	gdb_host=apollo68v ;;
+# OBSOLETE m68*-apollo*-bsd*)	gdb_host=apollo68b ;;
 m68*-att-*)		gdb_host=3b1 ;;
 m68*-bull*-sysv*)	gdb_host=dpx2 ;;
+# OBSOLETE m68*-hp-bsd*)		gdb_host=hp300bsd ;;
+# OBSOLETE m68*-hp-hpux*)		gdb_host=hp300hpux ;;
 m68*-*-linux*)		gdb_host=linux ;;
 m68*-*-lynxos*)		gdb_host=m68klynx ;;
 m68*-*-netbsd*)		gdb_host=nbsdaout ;;
@@ -97,6 +106,10 @@
 m68*-sun-sunos4*)	gdb_host=sun3os4 ;;
 m68*-sun-*)		gdb_host=sun3os4 ;;
 
+# OBSOLETE m88*-motorola-sysv4*)	gdb_host=delta88v4 ;;
+# OBSOLETE m88*-motorola-sysv*)	gdb_host=delta88 ;;
+# OBSOLETE m88*-*-*)		gdb_host=m88k ;;
+
 mips-dec-mach3*)	gdb_host=mipsm3 ;;
 mips-dec-*)		gdb_host=decstation ;;
 mips-little-*)		gdb_host=littlemips ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 064ff4e..f91503a 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 dnl Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
@@ -26,7 +26,6 @@
 AM_MAINTAINER_MODE
 
 AC_PROG_CC
-AC_GNU_SOURCE
 AC_AIX
 AC_ISC_POSIX
 AM_PROG_CC_STDC
@@ -34,14 +33,6 @@
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
 AC_CANONICAL_SYSTEM
 
-# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
-# doesn't support cross-compilation, but the one from Autoconf 2.5x
-# does.  Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
-# deal with the lossage.  Note that CY_GNU_GETTEXT currently calls
-# AC_PROG_RANLIB.  This can be removed when we switch to # Autoconf
-# 2.5x.
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
 dnl Set up for gettext.  PACKAGE is used when we call bindtextdomain.
 ALL_LINGUAS=
 CY_GNU_GETTEXT
@@ -61,280 +52,92 @@
 CONFIG_INSTALL=
 CONFIG_UNINSTALL=
 
-AC_CONFIG_SUBDIRS(doc testsuite)
-configdirs=
+SUBDIRS="doc testsuite nlm"
+configdirs="doc testsuite"
 
-. $srcdir/configure.host
+AC_ARG_ENABLE(multi-ice,
+[  --enable-multi-ice            Build the multi-ice-gdb-server],
+[case "${enableval}" in
+    yes ) enable_multi_ice="yes" ;;
+    no)  enable_multi_ice="no" ;;
+    *) AC_MSG_ERROR(Bad value for --enable-multi-ice: ${enableval}) ;;
+  esac
+])
 
-. $srcdir/configure.tgt
-
-# Fetch the default architecture and default target vector from BFD.
-targ=$target; . $srcdir/../bfd/config.bfd
-
-# We only want the first architecture, so strip off the others if
-# there is more than one.
-targ_archs=`echo $targ_archs | sed 's/ .*//'`
-
-if test "x$targ_archs" != x; then
-  AC_DEFINE_UNQUOTED(DEFAULT_BFD_ARCH, $targ_archs,
-    [Define to BFD's default architecture. ])
-fi
-if test "x$targ_defvec" != x; then
-  AC_DEFINE_UNQUOTED(DEFAULT_BFD_VEC, $targ_defvec,
-    [Define to BFD's default target vector. ])
+if test "${enable_multi_ice}" = "yes"; then
+  configdirs="${configdirs} multi-ice"
 fi
 
-AC_ARG_PROGRAM
+dnl
+changequote(,)dnl
 
-# The CLI cannot be disabled yet, but may be in the future.
+. ${srcdir}/configure.host
 
-# Enable CLI.
-AC_ARG_ENABLE(gdbcli,
-[  --disable-gdbcli        disable command-line interface (CLI)],
-  [case $enableval in
-    yes)
-      ;;
-    no)
-      AC_MSG_ERROR([the command-line interface cannot be disabled yet]) ;;
-    *)
-      AC_MSG_ERROR([bad value $enableval for --enable-gdbcli]) ;;
-  esac],
-  [enable_gdbcli=yes])
-if test x"$enable_gdbcli" = xyes; then
-  if test -d $srcdir/cli; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
-    CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
-    CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
-    CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
-    CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
-    CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
-  fi
+. ${srcdir}/configure.tgt
+
+targ=${target} ; . ${srcdir}/../bfd/config.bfd
+
+dnl
+changequote([,])dnl
+
+dnl use BFD to determine the default architecture and byte order
+dnl (bfd_vec->byteorder provides the latter).
+targ=${target}
+. ${srcdir}/../bfd/config.bfd
+
+dnl We only want the first arch, if there is more than one.
+targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
+
+if test x"${targ_archs}" != x ; then
+    AC_DEFINE_UNQUOTED(DEFAULT_BFD_ARCH, ${targ_archs})
 fi
-
-# Enable MI.
-AC_ARG_ENABLE(gdbmi,
-[  --disable-gdbmi         disable machine-interface (MI)],
-  [case $enableval in
-    yes | no)
-      ;;
-    *)
-      AC_MSG_ERROR([bad value $enableval for --enable-gdbmi]) ;;
-  esac],
-  [enable_gdbmi=yes])
-if test x"$enable_gdbmi" = xyes; then
-  if test -d $srcdir/mi; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
-    CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
-    CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
-    CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
-    CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
-    CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
-  fi
+if test x"${targ_defvec}" != x ; then
+    AC_DEFINE_UNQUOTED(DEFAULT_BFD_VEC, ${targ_defvec})
 fi
 
-# Enable TUI.
-AC_ARG_ENABLE(tui,
-[  --enable-tui            enable full-screen terminal user interface (TUI)],
-  [case $enableval in
-    yes | no)
-      ;;
-    *)
-      AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
-  esac])
-if test x"$enable_tui" = xyes; then
-  if test -d $srcdir/tui; then
-    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
-    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
-    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
-    CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
-    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
-    CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
-    CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
-    CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
-    CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
-    need_curses=yes
-  fi
-fi
-
-# Enable gdbtk.
-AC_ARG_ENABLE(gdbtk,
-[  --enable-gtk            enable gdbtk graphical user interface (GUI)],
-  [case $enableval in
-    yes | no)
-      ;;
-    *)
-      AC_MSG_ERROR([bad value $enableval for --enable-gdbtk]) ;;
-  esac],
-  [if test -d $srcdir/gdbtk; then
-    enable_gdbtk=yes
-  else
-    enable_gdbtk=no
-  fi])
-# We unconditionally disable gdbtk tests on selected platforms.
-case $host_os in
-  go32* | windows*)
-    AC_MSG_WARN([gdbtk isn't supported on $host; disabling])
-    enable_gdbtk=no ;;
-esac
-
-# --------------------- #
-# Checks for programs.  #
-# --------------------- #
-
 AC_PROG_AWK
 AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_RANLIB
-AC_PROG_YACC
-
 AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
 AC_CHECK_TOOL(DLLTOOL, dlltool)
 AC_CHECK_TOOL(WINDRES, windres)
+AC_PROG_YACC
 
-# Needed for GNU/Hurd.
+dnl MiG is needed for the Hurd.
 AC_CHECK_TOOL(MIG, mig)
 
-# ---------------------- #
-# Checks for libraries.  #
-# ---------------------- #
-
-# We might need to link with -lm; most simulators need it.
-AC_CHECK_LIB(m, main)
-
-# We need to link with -lw to get `wctype' on Solaris before Solaris
-# 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
-# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
-# is known to have this problem).  Therefore we avoid libw if we can.
-AC_CHECK_FUNC(wctype, [],
-  [AC_CHECK_LIB(w, wctype)])
-
-# Some systems (e.g. Solaris) have `socketpair' in libsocket.
-AC_SEARCH_LIBS(socketpair, socket)
-
-# Since GDB uses Readline, we need termcap functionality, so we need
-# to find a library that provides that.  When GDB is configured with
-# --enable-tui, we need full curses functionality.
-#
-# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
-# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
-# Makefile fragments.  That's why we need to have `Hcurses' before
-# `curses'.  I don't see why we should use HP curses if a more
-# standard curses is available, except that according to HP's
-# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
-# HP-UX 10.10 and 10.20.
-
-if test "$need_curses" = yes; then
-  AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses], [],
-    [AC_MSG_ERROR([no curses library found])])
-fi
-
-case $host_os in
-  cygwin*)
-    if test -d $srcdir/libtermcap; then
-      LIBS="../libtermcap/libtermcap.a $LIBS"
-      ac_cv_search_tgetent="../libtermcap/libtermcap.a"
-    fi ;;
-  go32*)
-    # ??? Is this really true?
-    ac_cv_search_tgetent="none required"
-    ;;
-  aix*)
-    # Readline prefers curses over termcap on AIX.
-    # ??? Why?
-    AC_SEARCH_LIBS(tgetent, [tinfo ncurses curses termcap])
-    ;;
-esac
-
-# Note: We used to check for libtermlib and libterminfo too, but
-# Readline doesn't, so I think we're safe with leaving them out.
-AC_SEARCH_LIBS(tgetent, [termcap tinfo ncurses Hcurses curses])
-
-if test "$ac_cv_search_tgetent" = no; then
-  AC_MSG_ERROR([no termcap library found])
-fi
-
-# ------------------------- #
-# Checks for header files.  #
-# ------------------------- #
-
-AC_HEADER_DIRENT
-AC_HEADER_STAT
-AC_HEADER_STDC
-AC_CHECK_HEADERS(link.h)
-AC_CHECK_HEADERS(nlist.h)
-AC_CHECK_HEADERS(poll.h sys/poll.h)
-AC_CHECK_HEADERS(proc_service.h thread_db.h)
-AC_CHECK_HEADERS(stddef.h)
-AC_CHECK_HEADERS(stdlib.h)
-AC_CHECK_HEADERS(stdint.h)
-AC_CHECK_HEADERS(string.h memory.h strings.h)
-AC_CHECK_HEADERS(sys/fault.h)
-AC_CHECK_HEADERS(sys/file.h)
-AC_CHECK_HEADERS(sys/filio.h)
-AC_CHECK_HEADERS(sys/ioctl.h)
-AC_CHECK_HEADERS(sys/param.h)
-AC_CHECK_HEADERS(sys/proc.h)
-AC_CHECK_HEADERS(sys/procfs.h)
-AC_CHECK_HEADERS(sys/ptrace.h ptrace.h)
-AC_CHECK_HEADERS(sys/reg.h sys/debugreg.h)
-AC_CHECK_HEADERS(sys/select.h)
-AC_CHECK_HEADERS(sys/syscall.h)
-AC_CHECK_HEADERS(sys/user.h)
-AC_CHECK_HEADERS(sys/wait.h wait.h)
-AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
-AC_CHECK_HEADERS(unistd.h)
-
-# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
-# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
-# think that we don't have <curses.h> if we're using GCC.
-case $host_os in
-  solaris2.[[78]])
-    if test "$GCC" = yes; then
-      AC_DEFINE(_MSE_INT_H, 1,
-        [[Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
-   Solaris 2.[78] when using GCC. ]])
-    fi ;;
-esac
-AC_CHECK_HEADERS(curses.h ncurses.h term.h)
-
-# FIXME: kettenis/20030102: In most cases we include these
-# unconditionally, so what's the point in checking these?
-AC_CHECK_HEADERS(ctype.h time.h)
-
-# ------------------ #
-# Checks for types.  #
-# ------------------ #
+AC_ARG_PROGRAM
 
 AC_TYPE_SIGNAL
 
-# ------------------------------------- #
-# Checks for compiler characteristics.  #
-# ------------------------------------- #
+AC_HEADER_STDC
+
+dnl Solaris 7 needs _MSE_INT_H defined to avoid a clash between <widec.h>
+dnl and <wchar.h> that causes AC_CHECK_HEADERS to think <curses.h> doesn't
+dnl exist.
+
+case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
+    AC_DEFINE(_MSE_INT_H)
+esac; esac
+
+AC_CHECK_HEADERS(ctype.h nlist.h link.h thread_db.h proc_service.h \
+	memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
+	string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
+	term.h termio.h termios.h unistd.h wait.h sys/wait.h \
+	wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
+	time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
+	dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
+	curses.h ncurses.h \
+	poll.h sys/poll.h)
+AC_HEADER_STAT
 
 AC_C_CONST
 AC_C_INLINE
 
-# ------------------------------ #
-# Checks for library functions.  #
-# ------------------------------ #
-
+AC_CHECK_FUNCS(bcopy btowc bzero canonicalize_file_name isascii poll \
+	realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask )
 AC_FUNC_ALLOCA
-AC_FUNC_MMAP
 AC_FUNC_VFORK
-AC_CHECK_FUNCS(canonicalize_file_name realpath)
-AC_CHECK_FUNCS(poll)
-AC_CHECK_FUNCS(pread64)
-AC_CHECK_FUNCS(sbrk)
-AC_CHECK_FUNCS(setpgid setpgrp)
-AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
-AC_CHECK_FUNCS(socketpair)
-
 dnl AC_FUNC_SETPGRP does not work when cross compiling
 dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
 if test "$cross_compiling" = no; then
@@ -365,37 +168,6 @@
   AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
 fi
 
-# Assume we'll default to using the included libiberty regex.
-gdb_use_included_regex=yes
-
-# However, if the system regex is GNU regex, then default to *not*
-# using the included regex.
-AC_CACHE_CHECK(
-  [for GNU regex],
-  [gdb_cv_have_gnu_regex],
-  [AC_TRY_COMPILE(
-    [#include <gnu-versions.h>],
-    [#define REGEX_INTERFACE_VERSION 1
-#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
-# error "Version mismatch"
-#endif],
-    gdb_cv_have_gnu_regex=yes,
-    gdb_cv_have_gnu_regex=no)])
-if test $gdb_cv_have_gnu_regex = yes; then
-  gdb_use_included_regex=no
-fi
-
-AC_ARG_WITH(included-regex,
-  [  --without-included-regex don't use included regex; this is the default
-                          on systems with version 2 of the GNU C library
-                          (use with caution on other system)],
-  gdb_with_regex=$withval,
-  gdb_with_regex=$gdb_use_included_regex)
-if test "$gdb_with_regex" = yes; then
-  AC_DEFINE(USE_INCLUDED_REGEX, 1,
-    [Define to 1 if the regex included in libiberty should be used.])
-fi
-
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_reg_r_fs,
@@ -462,6 +234,10 @@
 fi
 
 
+AC_CHECK_LIB(socket, socketpair)
+AC_CHECK_FUNCS(socketpair)
+
+
 BFD_NEED_DECLARATION(malloc)
 BFD_NEED_DECLARATION(realloc)
 BFD_NEED_DECLARATION(free)
@@ -639,6 +415,16 @@
   fi
 fi
 
+dnl See if host has libm.  This is usually needed by simulators.
+AC_CHECK_LIB(m, main)
+
+dnl Solaris puts wctype in /usr/lib/libw.a before Solaris 2.6.
+dnl
+dnl A bug in GNU ld 2.9.1 causes a problem if we link in -lw 
+dnl under Solaris 2.6 because it is some funky empty library.
+dnl So only link in libw if we have to.
+AC_CHECK_LIB(c, wctype,: ,AC_CHECK_LIB(w, wctype))
+
 dnl See if compiler supports "long long" type.
 
 AC_MSG_CHECKING(for long long support in compiler)
@@ -727,6 +513,8 @@
 fi
 AC_MSG_RESULT($gdb_cv_scanf_has_long_double)
 
+AC_FUNC_MMAP
+
 case ${host_os} in
 aix*)
   AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [
@@ -849,8 +637,152 @@
             [Define if <thread_db.h> has the TD_NOTALLOC error code.])
 fi
 
+dnl linux-proc.c wants to use pread64, which may require special CFLAGS
+dnl -D_BSD_SOURCE is normally assumed but we have to specify it because of
+dnl -D_XOPEN_SOURCE=500.
+if test $host = $target; then
+  case $target in
+    *-linux*)
+      save_CFLAGS=$CFLAGS
+      CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
+      AC_TRY_LINK([#include <unistd.h>],
+		  [pread64 (0, NULL, 0, 0);],
+		  [ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
+		   AC_DEFINE(HAVE_PREAD64)], [])
+      CFLAGS=$save_CFLAGS
+      ;;
+  esac
+fi
+
+dnl The CLI cannot be disabled yet, but may be in the future  
+
+dnl Handle CLI sub-directory configury.
+AC_ARG_ENABLE(gdbcli,
+[  --enable-gdbcli            Enable GDB-CLI interface],
+[
+  case "${enableval}" in
+    yes) enable_gdbcli=yes ;;
+    "") enable_gdbcli=yes ;;
+    no) 
+      AC_MSG_ERROR(The CLI cannot be disabled yet)
+    ;;
+    *)
+      AC_MSG_ERROR(Bad value for --enable-gdbcli: ${enableval})
+    ;;
+  esac
+],
+[enable_gdbcli=yes])
+case ${enable_gdbcli} in
+  "yes" )
+    if test -d "${srcdir}/cli" ; then
+      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
+      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
+      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
+      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
+      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
+      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
+      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
+    fi
+    ;;
+esac
+
 dnl Handle optional features that can be enabled.
 
+dnl Handle MI sub-directory configury.
+AC_ARG_ENABLE(gdbmi,
+[  --enable-gdbmi            Enable GDB-MI interface],
+[
+  case "${enable_gdbmi}" in
+    yes | no) ;;
+    "")  enable_gdbmi=yes ;;
+    *)
+      AC_MSG_ERROR(Bad value for --enable-gdbmi: ${enableval})
+    ;;
+  esac
+],
+[enable_gdbmi=yes])
+case ${enable_gdbmi} in
+  "yes" )
+    if test -d "${srcdir}/mi" ; then
+      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
+      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
+      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
+      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
+      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
+      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
+      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
+    fi
+    ;;
+esac
+
+# Configure UI_OUT by default (before 5.2 it can be disabled)
+# It must be configured if gdbmi is configured
+
+UIOUT_CFLAGS=
+AC_SUBST(UIOUT_CFLAGS)
+
+AC_ARG_WITH(uiout,
+[  --with-uiout          Use new uiout functions instead of *printf's],
+[case "${withval}" in
+  yes)  want_uiout=true ;;
+  no)   if test $enable_gdbmi = yes; then
+          AC_MSG_ERROR(uiout is needed for MI and cannot be disabled)
+        else
+           want_uiout=false
+        fi ;;
+  *)    AC_MSG_ERROR(bad value ${withval} for GDB with-uiout option) ;;
+esac],
+[want_uiout=true])dnl
+
+if test $want_uiout = true; then
+   UIOUT_CFLAGS="-DUI_OUT=1"
+fi
+
+AC_ARG_ENABLE(tui,
+[  --enable-tui            Enable full-screen terminal user interface],
+[
+  case "${enable_tui}" in
+    yes | no) ;;
+    "")  enable_tui=yes ;;
+    *)
+      AC_MSG_ERROR(Bad value for --enable-tui: ${enableval})
+    ;;
+  esac
+])
+case ${enable_tui} in
+  "yes" )
+    if test -d "${srcdir}/tui" ; then
+      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
+      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
+      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
+      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
+      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
+      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
+      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
+    fi
+    ;;
+esac
+
+AC_ARG_ENABLE(netrom,
+[  --enable-netrom         Enable NetROM support],
+[case "${enableval}" in
+yes)	enable_netrom=yes ;;
+no)	enable_netrom=no ;;
+*)	AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
+esac])
+
+if test "${enable_netrom}" = "yes"; then
+	CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" 
+        CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
+fi
+
+
 # NOTE: Don't add -Wall or -Wunused, they both include
 # -Wunused-parameter which reports bogus warnings.
 # NOTE: If you add to this list, remember to update
@@ -933,6 +865,38 @@
    MMALLOC='../mmalloc/libmmalloc.a'
 fi
 
+AC_ARG_WITH(included-regex,
+[  --with-included-regex          Use included regex],
+[case "${withval}" in
+  yes)  want_included_regex=true ;;
+  no)   want_included_regex=false;;
+  *)    AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;;
+esac],[want_included_regex=true])dnl
+
+if test $want_included_regex = false; then
+  AC_MSG_CHECKING(for GNU regex)
+  AC_CACHE_VAL(gdb_cv_have_gnu_regex,
+[AC_TRY_COMPILE([#include <gnu-versions.h>
+#include <sys/types.h>
+#include <regex.h>],
+[#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
+#error No valid GNU regex.
+#endif
+],
+		[gdb_cv_have_gnu_regex=yes],
+		[gdb_cv_have_gnu_regex=no])])
+  AC_MSG_RESULT($gdb_cv_have_gnu_regex)
+  if test $gdb_cv_have_gnu_regex = no; then
+	want_included_regex=true
+  fi
+fi
+
+if test x${want_included_regex} = xtrue; then
+    REGEX="gnu-regex.o"
+    AC_DEFINE(USE_INCLUDED_REGEX)
+fi
+AC_SUBST(REGEX)
+
 # In the Cygwin environment, we need some additional flags.
 AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
 [AC_EGREP_CPP(lose, [
@@ -949,6 +913,30 @@
 esac
 AC_SUBST(SER_HARDWIRE)
 
+
+dnl Figure out which term library to use.
+if test x$gdb_host = xgo32; then
+  TERM_LIB=
+else
+if test x$gdb_cv_os_cygwin = xyes; then
+  TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
+else
+  TERM_LIB=
+  AC_CHECK_LIB(ncurses, tgetent, TERM_LIB=-lncurses,
+    AC_CHECK_LIB(Hcurses, tgetent, TERM_LIB=-lHcurses,
+      AC_CHECK_LIB(termlib, tgetent, TERM_LIB=-ltermlib,
+        AC_CHECK_LIB(termcap, tgetent, TERM_LIB=-ltermcap,
+	  AC_CHECK_LIB(curses, tgetent, TERM_LIB=-lcurses,
+	    AC_CHECK_LIB(terminfo, tgetent, TERM_LIB=-lterminfo))))))
+
+  if test "x$TERM_LIB" = x
+  then
+    AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!)
+  fi
+fi
+fi
+AC_SUBST(TERM_LIB)
+
 # libreadline needs libuser32.a in a cygwin environment
 WIN32LIBS=
 if test x$gdb_cv_os_cygwin = xyes; then
@@ -965,6 +953,73 @@
 AC_SUBST(LIBGUI)
 AC_SUBST(GUI_CFLAGS_X)
 
+AC_ARG_WITH(cpu,
+[  --with-cpu=CPU          Set the default CPU variant to debug],
+[case "${target}" in
+  powerpc-* | powerpcle-* )
+    ## It would be nice to keep this table in sync with the one in
+    ## gcc/configure.
+    case "${with_cpu}" in
+      ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
+      | 604 | 750 )
+        ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
+      ;;
+      common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) 
+        ## These are all RS6000 variants, as far as GDB is concerned.
+        with_cpu=rs6000
+      ;;
+      603e | ec603e )
+        with_cpu=603
+      ;;
+      604e )
+	with_cpu=604
+      ;;
+      * )
+        AC_MSG_WARN(GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'.)
+	with_cpu=ppc-uisa
+      ;;
+    esac
+  ;;
+  * )
+    AC_MSG_WARN(GDB may ignore the --with-cpu flag for ${target} targets)
+  ;;
+esac
+AC_DEFINE_UNQUOTED(TARGET_CPU_DEFAULT, "${with_cpu}")
+],)
+
+
+AC_ARG_ENABLE(gdbtk,
+[  --enable-gdbtk          Enable GDBTK GUI front end],
+[case "${enableval}" in
+    yes)
+	case "$host" in
+	*go32*)
+	    AC_MSG_WARN([GDB does not support GDBtk on host ${host}.  GDBtk will be disabled.])
+	    enable_gdbtk=no ;;
+	*windows*)
+	    AC_MSG_WARN([GDB does not support GDBtk on host ${host}.  GDBtk will be disabled.])
+	    enable_gdbtk=no ;;
+	*)
+	    enable_gdbtk=yes ;;
+	esac ;;
+    no)
+	enable_gdbtk=no  ;;
+    *)
+	AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
+esac],
+[
+# Default is on for everything but go32 and Cygwin
+case "$host" in
+    *go32* | *windows*)
+	;;
+    *)
+ 	if test -d "${srcdir}/gdbtk" ; then
+            enable_gdbtk=yes
+	fi
+	;;
+esac
+])
+
 WIN32LDAPP=
 AC_SUBST(WIN32LIBS)
 AC_SUBST(WIN32LDAPP)
@@ -1079,6 +1134,7 @@
 	fi
     fi
 
+    SUBDIRS="${SUBDIRS} gdbtk"
     configdirs="${configdirs} gdbtk"
 fi
 
@@ -1143,6 +1199,67 @@
 AC_SUBST(CONFIG_INSTALL)
 AC_SUBST(CONFIG_UNINSTALL)
 
+# Begin stuff to support --enable-shared
+AC_ARG_ENABLE(shared,
+[  --enable-shared         Use shared libraries],
+[case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *) shared=true ;;
+esac])dnl
+
+HLDFLAGS=
+HLDENV=
+# If we have shared libraries, try to set rpath reasonably.
+if test "${shared}" = "true"; then
+  case "${host}" in
+  *-*-hpux*)
+    HLDFLAGS='-Wl,+s,+b,$(libdir)'
+    ;;
+  *-*-irix5* | *-*-irix6*)
+    HLDFLAGS='-Wl,-rpath,$(libdir)'
+    ;;
+  *-*-linux*aout*)
+    ;;
+  *-*-linux* | *-pc-linux-gnu*)
+    HLDFLAGS='-Wl,-rpath,$(libdir)'
+    ;;
+  *-*-solaris*)
+    HLDFLAGS='-R $(libdir)'
+    ;;
+  *-*-sysv4*)
+    HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
+    ;;
+  esac
+fi
+
+# On SunOS, if the linker supports the -rpath option, use it to
+# prevent ../bfd and ../opcodes from being included in the run time
+# search path.
+case "${host}" in
+  *-*-sunos*)
+    echo 'main () { }' > conftest.c
+    ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
+    if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'No such file' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
+      :
+    elif test "${shared}" = "true"; then
+      HLDFLAGS='-Wl,-rpath=$(libdir)'
+    else
+      HLDFLAGS='-Wl,-rpath='
+    fi
+    rm -f conftest.t conftest.c conftest
+    ;;
+esac
+AC_SUBST(HLDFLAGS)
+AC_SUBST(HLDENV)
+# End stuff to support --enable-shared
+
 # target_subdir is used by the testsuite to find the target libraries.
 target_subdir=
 if test "${host}" != "${target}"; then
@@ -1223,35 +1340,23 @@
     *)  AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
 esac
 
-if test x"${gdb_osabi}" != x ; then
-    AC_DEFINE_UNQUOTED(GDB_OSABI_DEFAULT, $gdb_osabi,
-		       [Define to the default OS ABI for this configuration.])
+if test "${enable_multi_ice}" = "yes"; then
+  SUBDIRS="${SUBDIRS} multi-ice"
 fi
 
-# Enable multi-ice-gdb-server.
-AC_ARG_ENABLE(multi-ice,
-[  --enable-multi-ice      build the multi-ice-gdb-server],
-  [case $enableval in
-    yes | no)
-      ;;
-    *) AC_MSG_ERROR([bad value $enableval for --enable-multi-ice]) ;;
-  esac])
-if test "x$enable_multi_ice" = xyes; then
-  configdirs="$configdirs multi-ice"
+# ``gdbserver'' can only be built in a native configuration.
+if test x"${target}" = x"${host}"; then
+    AC_MSG_CHECKING(whether gdbserver is supported on this host)
+    if test x"${build_gdbserver}" = xyes ; then
+	configdirs="${configdirs} gdbserver"
+	SUBDIRS="${SUBDIRS} gdbserver"
+	AC_MSG_RESULT(yes)
+    else
+	AC_MSG_RESULT(no)
+    fi
 fi
 
-# We only build gdbserver automatically if host and target are the same.
-if test "x$target" = "x$host"; then
-  AC_MSG_CHECKING(whether gdbserver is supported on this host)
-  if test "x$build_gdbserver" = xyes; then
-    configdirs="$configdirs gdbserver"
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-  fi
-fi
-
-AC_CONFIG_SUBDIRS($configdirs)
+AC_SUBST(SUBDIRS)
 
 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
@@ -1293,6 +1398,8 @@
 fi
 AC_SUBST(nm_h)
 
+AC_PROG_LN_S
+
 AC_LINK_FILES($files, $links)
 
 dnl Check for exe extension set on certain hosts (e.g. Win32)
@@ -1310,6 +1417,7 @@
 
 AM_ICONV
 
+AC_CONFIG_SUBDIRS($configdirs)
 AC_OUTPUT(Makefile .gdbinit:gdbinit.in,
 [
 dnl Autoconf doesn't provide a mechanism for modifying definitions 
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 76b9b12..d272950 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -19,6 +19,7 @@
 i[3456]86*)		gdb_target_cpu=i386 ;;
 m68hc11*|m6811*)	gdb_target_cpu=m68hc11 ;;
 m68*)			gdb_target_cpu=m68k ;;
+# OBSOLETE m88*)			gdb_target_cpu=m88k ;;
 mips*)			gdb_target_cpu=mips ;;
 powerpc*)		gdb_target_cpu=powerpc ;;
 sparc*)			gdb_target_cpu=sparc ;;
@@ -45,6 +46,8 @@
 alpha*-*-netbsd*)	gdb_target=nbsd ;;
 alpha*-*-*)		gdb_target=alpha ;;
 
+# OBSOLETE arc-*-*)		gdb_target=arc ;;
+
 arm*-wince-pe)		gdb_target=wince ;;
 arm*-*-linux*)		gdb_target=linux
 			build_gdbserver=yes
@@ -66,11 +69,14 @@
 cris*)                  gdb_target=cris ;;
 
 d10v-*-*)		gdb_target=d10v ;;
+# OBSOLETE d30v-*-*)		gdb_target=d30v ;;
 
 h8300-*-*)		gdb_target=h8300 ;;
 h8500-*-*)		gdb_target=h8500 ;;
 
 
+# OBSOLETE fr30-*-elf*)		gdb_target=fr30 ;;
+
 frv-*-*)		gdb_target=frv ;;
 
 hppa*-*-bsd*)		gdb_target=hppabsd ;;
@@ -85,9 +91,11 @@
 i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
 i[3456]86-sequent-sysv*) gdb_target=ptx ;;
 i[3456]86-ncr-*)	gdb_target=ncr3000 ;;
+# OBSOLETE i[3456]86-*-aix*)	gdb_target=i386aix ;;
 i[3456]86-*-bsd*)	gdb_target=i386bsd ;;
 i[3456]86-*-netbsd*)	gdb_target=nbsd ;;
 i[3456]86-*-openbsd*)	gdb_target=obsd ;;
+# OBSOLETE i[3456]86-*-os9k)	gdb_target=i386os9k ;;
 i[3456]86-*-go32*)	gdb_target=i386aout ;;
 i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
 i[3456]86-*-lynxos*)	gdb_target=i386lynx ;;
@@ -103,13 +111,23 @@
 			build_gdbserver=yes
 			;;
 i[3456]86-*-isc*)	gdb_target=i386v ;;
+# OBSOLETE i[3456]86-*-mach3*)	gdb_target=i386m3 ;;
 i[3456]86-*-gnu*)	gdb_target=i386gnu ;;
 i[3456]86-*-netware*)	gdb_target=i386nw
 		configdirs="${configdirs} nlm" ;;
+# OBSOLETE i[3456]86-*-osf1mk*)	gdb_target=i386mk ;;
 i[3456]86-*-cygwin*)	gdb_target=cygwin  ;;
 i[3456]86-*-vxworks*)	gdb_target=vxworks ;;
 i[3456]86-*-*)		gdb_target=embed ;;
 
+# OBSOLETE i960-*-bout*)		gdb_target=vxworks960 ;;
+# OBSOLETE i960-nindy-coff*)	gdb_target=nindy960 ;;
+# OBSOLETE i960-*-coff*)		gdb_target=mon960 ;;
+# OBSOLETE i960-nindy-elf*)	gdb_target=nindy960 ;;
+# OBSOLETE i960-*-elf*)		gdb_target=mon960 ;;
+# OBSOLETE i960-*-nindy*)		gdb_target=nindy960 ;;
+# OBSOLETE i960-*-vxworks*)	gdb_target=vxworks960 ;;
+
 ia64-*-aix*)		gdb_target=aix ;;
 ia64-*-linux*)		gdb_target=linux
 			build_gdbserver=yes
@@ -123,7 +141,10 @@
 m68000-*-sunos3*)	gdb_target=sun2os3 ;;
 m68000-*-sunos4*)	gdb_target=sun2os4 ;;
 
+# OBSOLETE m68*-apollo*-bsd*)	gdb_target=apollo68b ;;
 m68*-bull-sysv*)	gdb_target=dpx2 ;;
+# OBSOLETE m68*-hp-bsd*)		gdb_target=hp300bsd ;;
+# OBSOLETE m68*-hp-hpux*)		gdb_target=hp300hpux ;;
 m68*-att-*)		gdb_target=3b1 ;;
 m68*-cisco*-*)		gdb_target=cisco ;;
 m68*-ericsson-*)	gdb_target=es1800 ;;
@@ -144,6 +165,10 @@
 m68*-*-sysv4*)		gdb_target=m68kv4 ;;
 m68*-*-vxworks*)	gdb_target=vxworks68 ;;
 
+# OBSOLETE m88*-motorola-sysv4*)	gdb_target=delta88v4 ;;
+# OBSOLETE m88*-motorola-*)	gdb_target=delta88 ;;
+# OBSOLETE m88*-*-*)		gdb_target=m88k ;;
+
 mcore*-*-*)		gdb_target=mcore ;;
 mips64*-big-*)		gdb_target=bigmips64 ;;
 mips*-big-*)		gdb_target=bigmips ;;
@@ -164,7 +189,6 @@
 mips*tx39*-elf*)	gdb_target=tx39 ;;
 mips64*el-*-elf*)	gdb_target=embedl64 ;;
 mips64*-*-elf*)		gdb_target=embed64 ;;
-mips64*-*-linux*)	gdb_target=linux64 ;;
 mips*el-*-ecoff*)	gdb_target=embedl ;;
 mips*-*-ecoff*)		gdb_target=embed ;;
 mips*el-*-elf*)		gdb_target=embedl ;;
@@ -253,6 +277,9 @@
 
 vax-*-*)		gdb_target=vax ;;
 
+# OBSOLETE fr30-*-*)		gdb_target=fr30
+# OBSOLETE 			;;
+
 v850*-*-*)		gdb_target=v850
 			case ${gdb_host} in
 			cygwin*)
@@ -281,10 +308,3 @@
 xstormy16)      gdb_multi_arch=yes ;;
 mcore)		gdb_multi_arch=yes ;;
 esac
-
-# map target onto default OS ABI
-
-case "${target}" in
-*-*-linux*)	gdb_osabi=GDB_OSABI_LINUX ;;
-*-*-gnu*)	gdb_osabi=GDB_OSABI_HURD ;;
-esac
diff --git a/gdb/corefile.c b/gdb/corefile.c
index b525656..be0ecf0 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -439,7 +439,7 @@
 static void
 set_gnutarget_command (char *ignore, int from_tty, struct cmd_list_element *c)
 {
-  if (strcmp (gnutarget_string, "auto") == 0)
+  if (STREQ (gnutarget_string, "auto"))
     gnutarget = NULL;
   else
     gnutarget = gnutarget_string;
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index b9fae82..0d552b8 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1,5 +1,5 @@
 /* Target dependent code for CRIS, for GDB, the GNU debugger.
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001 Free Software Foundation, Inc.
    Contributed by Axis Communications AB.
    Written by Hendrik Ruijter, Stefan Andersson, and Orjan Friberg.
 
@@ -488,7 +488,7 @@
   short source_register; 
 
   /* This frame is with respect to a leaf until a push srp is found.  */
-  get_frame_extra_info (fi)->leaf_function = 1;
+  fi->extra_info->leaf_function = 1;
 
   /* This frame is without the FP until a push fp is found.  */
   have_fp = 0;
@@ -501,10 +501,10 @@
 
   /* We only want to know the end of the prologue when fi->saved_regs == 0.
      When the saved registers are allocated full information is required.  */
-  if (get_frame_saved_regs (fi))
+  if (fi->saved_regs)
     {
       for (regno = 0; regno < NUM_REGS; regno++)
-        get_frame_saved_regs (fi)[regno] = 0;
+        fi->saved_regs[regno] = 0;
     }
  
   /* Find the prologue instructions.  */
@@ -527,7 +527,7 @@
                 {
                   return ip;
                 }
-              get_frame_extra_info (fi)->leaf_function = 0;
+              fi->extra_info->leaf_function = 0;
             }
           else if (regno == FP_REGNUM)
             {
@@ -676,34 +676,34 @@
 
   /* We only want to know the end of the prologue when
      fi->saved_regs == 0.  */ 
-  if (!get_frame_saved_regs (fi))
+  if (!fi->saved_regs)
     return ip;
 
   if (have_fp)
     {
-      get_frame_saved_regs (fi)[FP_REGNUM] = get_frame_base (fi);
+      fi->saved_regs[FP_REGNUM] = get_frame_base (fi);
       
       /* Calculate the addresses.  */
       for (regno = regsave; regno >= 0; regno--)
         {
-          get_frame_saved_regs (fi)[regno] = get_frame_base (fi) - val;
+          fi->saved_regs[regno] = get_frame_base (fi) - val;
           val -= 4;
         }
-      if (get_frame_extra_info (fi)->leaf_function)
+      if (fi->extra_info->leaf_function)
         {
           /* Set the register SP to contain the stack pointer of 
              the caller.  */
-          get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 4;
+          fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 4;
         }
       else
         {
           /* Set the register SP to contain the stack pointer of 
              the caller.  */
-          get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
+          fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 8;
       
           /* Set the register SRP to contain the return address of 
              the caller.  */
-          get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
+          fi->saved_regs[SRP_REGNUM] = get_frame_base (fi) + 4;
         }
     }
   return ip;
@@ -734,15 +734,17 @@
 CORE_ADDR
 cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
 {
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
-  struct frame_info *fi;
+  struct frame_info fi;
+  static struct frame_extra_info fei;
   struct symtab_and_line sal = find_pc_line (pc, 0);
   int best_limit;
   CORE_ADDR pc_after_prologue;
   
-  /* frame_info now contains dynamic memory.  Since fi is a dummy
-     here, I don't bother allocating memory for saved_regs.  */
-  fi = deprecated_frame_xmalloc_with_cleanup (0, sizeof (struct frame_extra_info));
+  /* frame_info now contains dynamic memory.  Since fi is a dummy here,
+     I use static memory for extra_info, and don't bother allocating
+     memory for saved_regs.  */
+  fi.saved_regs = 0;
+  fi.extra_info = &fei;
 
   /* If there is no symbol information then sal.end == 0, and we end up
      examining only the first instruction in the function prologue. 
@@ -752,8 +754,7 @@
   else
     best_limit = pc + 100; 
 
-  pc_after_prologue = cris_examine (pc, best_limit, fi, frameless_p);
-  do_cleanups (old_chain);
+  pc_after_prologue = cris_examine (pc, best_limit, &fi, frameless_p);
   return pc_after_prologue;
 }
 
@@ -1148,7 +1149,8 @@
 
 /* See frame.h.  Determines the address of all registers in the current stack
    frame storing each in frame->saved_regs.  Space for frame->saved_regs shall
-   be allocated by FRAME_INIT_SAVED_REGS using frame_saved_regs_zalloc.  */
+   be allocated by FRAME_INIT_SAVED_REGS using either frame_saved_regs_zalloc
+   or frame_obstack_alloc.  */
 
 void
 cris_frame_init_saved_regs (struct frame_info *fi)
@@ -1156,14 +1158,13 @@
   CORE_ADDR ip;
   struct symtab_and_line sal;
   int best_limit;
-  char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
-							  get_frame_base (fi));
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   
   /* Examine the entire prologue.  */
   register int frameless_p = 0; 
 
   /* Has this frame's registers already been initialized?  */
-  if (get_frame_saved_regs (fi))
+  if (fi->saved_regs)
     return;
 
   frame_saved_regs_zalloc (fi);
@@ -1173,11 +1174,11 @@
       /* I don't see this ever happening, considering the context in which
          cris_frame_init_saved_regs is called (always when we're not in
          a dummy frame).  */
-      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+      memcpy (&fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
     }
   else
     {    
-      ip = get_pc_function_start (get_frame_pc (fi));
+      ip = get_pc_function_start (fi->pc);
       sal = find_pc_line (ip, 0);
 
       /* If there is no symbol information then sal.end == 0, and we end up
@@ -1200,30 +1201,29 @@
 void
 cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  if (get_next_frame (fi))
+  if (fi->next)
     {
       /* Called from get_prev_frame.  */
-      deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+      fi->pc = FRAME_SAVED_PC (fi->next);
     }
  
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
  
-  get_frame_extra_info (fi)->return_pc = 0;
-  get_frame_extra_info (fi)->leaf_function = 0;
+  fi->extra_info->return_pc = 0;
+  fi->extra_info->leaf_function = 0;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
-				   get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {    
       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
          by assuming it's always FP.  */
-      deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), SP_REGNUM));
-      get_frame_extra_info (fi)->return_pc = 
-        deprecated_read_register_dummy (get_frame_pc (fi),
-					get_frame_base (fi), PC_REGNUM);
+      fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
+						  SP_REGNUM);
+      fi->extra_info->return_pc = 
+        deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
 
       /* FIXME: Is this necessarily true?  */
-      get_frame_extra_info (fi)->leaf_function = 0;
+      fi->extra_info->leaf_function = 0;
     }
   else
     {
@@ -1231,19 +1231,19 @@
 
       /* Check fromleaf/frameless_function_invocation.  (FIXME)  */
 
-      if (get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
+      if (fi->saved_regs[SRP_REGNUM] != 0)
         {
           /* SRP was saved on the stack; non-leaf function.  */
-          get_frame_extra_info (fi)->return_pc =
-            read_memory_integer (get_frame_saved_regs (fi)[SRP_REGNUM], 
+          fi->extra_info->return_pc =
+            read_memory_integer (fi->saved_regs[SRP_REGNUM], 
                                  REGISTER_RAW_SIZE (SRP_REGNUM));
         }
       else
         {
           /* SRP is still in a register; leaf function.  */
-          get_frame_extra_info (fi)->return_pc = read_register (SRP_REGNUM);
+          fi->extra_info->return_pc = read_register (SRP_REGNUM);
           /* FIXME: Should leaf_function be set to 1 here?  */
-          get_frame_extra_info (fi)->leaf_function = 1;
+          fi->extra_info->leaf_function = 1;
         }
     }
 }
@@ -1254,13 +1254,11 @@
 CORE_ADDR
 cris_frame_chain (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
-				   get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
-      return get_frame_base (fi);
+      return fi->frame;
     }
-  else if (!inside_entry_file (get_frame_pc (fi)))
+  else if (!inside_entry_file (fi->pc))
     {
       return read_memory_unsigned_integer (get_frame_base (fi), 4);
     }
@@ -1275,7 +1273,7 @@
 CORE_ADDR
 cris_frame_saved_pc (struct frame_info *fi)
 {
-  return get_frame_extra_info (fi)->return_pc;
+  return fi->extra_info->return_pc;
 }
 
 /* Setup the function arguments for calling a function in the inferior.  */
@@ -1514,9 +1512,7 @@
   register int regno;
   register int stack_offset = 0;
   
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
-				   get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       /* This happens when we hit a breakpoint set at the entry point,
          when returning from a dummy frame.  */
@@ -1537,30 +1533,30 @@
          after SP was saved.  */
       for (regno = 0; regno < FP_REGNUM; regno++)
         {
-          if (get_frame_saved_regs (fi)[regno])
+          if (fi->saved_regs[regno])
             {
               write_register (regno, 
-                              read_memory_integer (get_frame_saved_regs (fi)[regno], 4));
+                              read_memory_integer (fi->saved_regs[regno], 4));
             }
         }
      
-      if (get_frame_saved_regs (fi)[FP_REGNUM])
+      if (fi->saved_regs[FP_REGNUM])
         {
           /* Pop the frame pointer (R8).  It was pushed before SP 
              was saved.  */
           write_register (FP_REGNUM, 
-                          read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4));
+                          read_memory_integer (fi->saved_regs[FP_REGNUM], 4));
           stack_offset += 4;
 
           /* Not a leaf function.  */
-          if (get_frame_saved_regs (fi)[SRP_REGNUM])
+          if (fi->saved_regs[SRP_REGNUM])
             {     
               /* SRP was pushed before SP was saved.  */
               stack_offset += 4;
             }
       
           /* Restore the SP and adjust for R8 and (possibly) SRP.  */
-          write_register (SP_REGNUM, get_frame_saved_regs (fi)[FP_REGNUM] + stack_offset);
+          write_register (SP_REGNUM, fi->saved_regs[FP_REGNUM] + stack_offset);
         } 
       else
         {
@@ -1569,7 +1565,7 @@
         }
     
       /* Restore the PC.  */
-      write_register (PC_REGNUM, get_frame_extra_info (fi)->return_pc);
+      write_register (PC_REGNUM, fi->extra_info->return_pc);
     }
   flush_cached_frames ();
 }
@@ -4316,6 +4312,7 @@
   set_gdbarch_frameless_function_invocation 
     (gdbarch, cris_frameless_function_invocation);
   set_gdbarch_frame_chain (gdbarch, cris_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
 
   set_gdbarch_frame_saved_pc (gdbarch, cris_frame_saved_pc);
   set_gdbarch_saved_pc_after_call (gdbarch, cris_saved_pc_after_call);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 76b2a6d..14fd95a 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for Mitsubishi D10V, for GDB.
 
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
    Foundation, Inc.
 
    This file is part of GDB.
@@ -112,7 +112,14 @@
 static int
 d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
 {
-    return (get_frame_pc (frame) > IMEM_START);
+  if (chain != 0 && frame != NULL)
+    {
+      if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+	return 1;	/* Path back from a call dummy must be valid. */
+      return ((frame)->pc > IMEM_START
+	      && !inside_main_func (frame->pc));
+    }
+  else return 0;
 }
 
 static CORE_ADDR
@@ -429,7 +436,7 @@
 }
 
 static CORE_ADDR
-d10v_pointer_to_address (struct type *type, const void *buf)
+d10v_pointer_to_address (struct type *type, void *buf)
 {
   CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
 
@@ -505,14 +512,12 @@
 static CORE_ADDR
 d10v_frame_saved_pc (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
-    return d10v_make_iaddr (deprecated_read_register_dummy (get_frame_pc (frame), 
-							    get_frame_base (frame), 
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return d10v_make_iaddr (deprecated_read_register_dummy (frame->pc, 
+							    frame->frame, 
 							    PC_REGNUM));
   else
-    return (get_frame_extra_info (frame)->return_pc);
+    return ((frame)->extra_info->return_pc);
 }
 
 /* Immediately after a function call, return the saved pc.  We can't
@@ -550,27 +555,27 @@
   /* now update the current registers with the old values */
   for (regnum = A0_REGNUM; regnum < A0_REGNUM + NR_A_REGS; regnum++)
     {
-      if (get_frame_saved_regs (fi)[regnum])
+      if (fi->saved_regs[regnum])
 	{
-	  read_memory (get_frame_saved_regs (fi)[regnum], raw_buffer, REGISTER_RAW_SIZE (regnum));
+	  read_memory (fi->saved_regs[regnum], raw_buffer, REGISTER_RAW_SIZE (regnum));
 	  deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
 					   REGISTER_RAW_SIZE (regnum));
 	}
     }
   for (regnum = 0; regnum < SP_REGNUM; regnum++)
     {
-      if (get_frame_saved_regs (fi)[regnum])
+      if (fi->saved_regs[regnum])
 	{
-	  write_register (regnum, read_memory_unsigned_integer (get_frame_saved_regs (fi)[regnum], REGISTER_RAW_SIZE (regnum)));
+	  write_register (regnum, read_memory_unsigned_integer (fi->saved_regs[regnum], REGISTER_RAW_SIZE (regnum)));
 	}
     }
-  if (get_frame_saved_regs (fi)[PSW_REGNUM])
+  if (fi->saved_regs[PSW_REGNUM])
     {
-      write_register (PSW_REGNUM, read_memory_unsigned_integer (get_frame_saved_regs (fi)[PSW_REGNUM], REGISTER_RAW_SIZE (PSW_REGNUM)));
+      write_register (PSW_REGNUM, read_memory_unsigned_integer (fi->saved_regs[PSW_REGNUM], REGISTER_RAW_SIZE (PSW_REGNUM)));
     }
 
   write_register (PC_REGNUM, read_register (LR_REGNUM));
-  write_register (SP_REGNUM, fp + get_frame_extra_info (fi)->size);
+  write_register (SP_REGNUM, fp + fi->extra_info->size);
   target_store_registers (-1);
   flush_cached_frames ();
 }
@@ -683,32 +688,31 @@
   CORE_ADDR addr;
 
   /* A generic call dummy's frame is the same as caller's.  */
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
-    return get_frame_base (fi);
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+    return fi->frame;
 
   d10v_frame_init_saved_regs (fi);
 
   
-  if (get_frame_extra_info (fi)->return_pc == IMEM_START
-      || inside_entry_file (get_frame_extra_info (fi)->return_pc))
+  if (fi->extra_info->return_pc == IMEM_START
+      || inside_entry_file (fi->extra_info->return_pc))
     {
       /* This is meant to halt the backtrace at "_start".
 	 Make sure we don't halt it at a generic dummy frame. */
-      if (!DEPRECATED_PC_IN_CALL_DUMMY (get_frame_extra_info (fi)->return_pc, 0, 0))
+      if (!DEPRECATED_PC_IN_CALL_DUMMY (fi->extra_info->return_pc, 0, 0))
 	return (CORE_ADDR) 0;
     }
 
-  if (!get_frame_saved_regs (fi)[FP_REGNUM])
+  if (!fi->saved_regs[FP_REGNUM])
     {
-      if (!get_frame_saved_regs (fi)[SP_REGNUM]
-	  || get_frame_saved_regs (fi)[SP_REGNUM] == STACK_START)
+      if (!fi->saved_regs[SP_REGNUM]
+	  || fi->saved_regs[SP_REGNUM] == STACK_START)
 	return (CORE_ADDR) 0;
 
-      return get_frame_saved_regs (fi)[SP_REGNUM];
+      return fi->saved_regs[SP_REGNUM];
     }
 
-  addr = read_memory_unsigned_integer (get_frame_saved_regs (fi)[FP_REGNUM],
+  addr = read_memory_unsigned_integer (fi->saved_regs[FP_REGNUM],
 				       REGISTER_RAW_SIZE (FP_REGNUM));
   if (addr == 0)
     return (CORE_ADDR) 0;
@@ -728,7 +732,7 @@
     {
       n = (op & 0x1E0) >> 5;
       next_addr -= 2;
-      get_frame_saved_regs (fi)[n] = next_addr;
+      fi->saved_regs[n] = next_addr;
       return 1;
     }
 
@@ -737,8 +741,8 @@
     {
       n = (op & 0x1E0) >> 5;
       next_addr -= 4;
-      get_frame_saved_regs (fi)[n] = next_addr;
-      get_frame_saved_regs (fi)[n + 1] = next_addr + 2;
+      fi->saved_regs[n] = next_addr;
+      fi->saved_regs[n + 1] = next_addr + 2;
       return 1;
     }
 
@@ -767,7 +771,7 @@
   if ((op & 0x7E1F) == 0x681E)
     {
       n = (op & 0x1E0) >> 5;
-      get_frame_saved_regs (fi)[n] = next_addr;
+      fi->saved_regs[n] = next_addr;
       return 1;
     }
 
@@ -775,8 +779,8 @@
   if ((op & 0x7E3F) == 0x3A1E)
     {
       n = (op & 0x1E0) >> 5;
-      get_frame_saved_regs (fi)[n] = next_addr;
-      get_frame_saved_regs (fi)[n + 1] = next_addr + 2;
+      fi->saved_regs[n] = next_addr;
+      fi->saved_regs[n + 1] = next_addr + 2;
       return 1;
     }
 
@@ -797,11 +801,11 @@
   unsigned short op1, op2;
   int i;
 
-  fp = get_frame_base (fi);
-  memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
+  fp = fi->frame;
+  memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
   next_addr = 0;
 
-  pc = get_pc_function_start (get_frame_pc (fi));
+  pc = get_pc_function_start (fi->pc);
 
   uses_frame = 0;
   while (1)
@@ -821,15 +825,15 @@
 	      /* st  rn, @(offset,sp) */
 	      short offset = op & 0xFFFF;
 	      short n = (op >> 20) & 0xF;
-	      get_frame_saved_regs (fi)[n] = next_addr + offset;
+	      fi->saved_regs[n] = next_addr + offset;
 	    }
 	  else if ((op & 0x3F1F0000) == 0x350F0000)
 	    {
 	      /* st2w  rn, @(offset,sp) */
 	      short offset = op & 0xFFFF;
 	      short n = (op >> 20) & 0xF;
-	      get_frame_saved_regs (fi)[n] = next_addr + offset;
-	      get_frame_saved_regs (fi)[n + 1] = next_addr + offset + 2;
+	      fi->saved_regs[n] = next_addr + offset;
+	      fi->saved_regs[n + 1] = next_addr + offset + 2;
 	    }
 	  else
 	    break;
@@ -854,42 +858,42 @@
       pc += 4;
     }
 
-  get_frame_extra_info (fi)->size = -next_addr;
+  fi->extra_info->size = -next_addr;
 
   if (!(fp & 0xffff))
     fp = d10v_read_sp ();
 
   for (i = 0; i < NUM_REGS - 1; i++)
-    if (get_frame_saved_regs (fi)[i])
+    if (fi->saved_regs[i])
       {
-	get_frame_saved_regs (fi)[i] = fp - (next_addr - get_frame_saved_regs (fi)[i]);
+	fi->saved_regs[i] = fp - (next_addr - fi->saved_regs[i]);
       }
 
-  if (get_frame_saved_regs (fi)[LR_REGNUM])
+  if (fi->saved_regs[LR_REGNUM])
     {
       CORE_ADDR return_pc 
-	= read_memory_unsigned_integer (get_frame_saved_regs (fi)[LR_REGNUM], 
+	= read_memory_unsigned_integer (fi->saved_regs[LR_REGNUM], 
 					REGISTER_RAW_SIZE (LR_REGNUM));
-      get_frame_extra_info (fi)->return_pc = d10v_make_iaddr (return_pc);
+      fi->extra_info->return_pc = d10v_make_iaddr (return_pc);
     }
   else
     {
-      get_frame_extra_info (fi)->return_pc = d10v_make_iaddr (read_register (LR_REGNUM));
+      fi->extra_info->return_pc = d10v_make_iaddr (read_register (LR_REGNUM));
     }
 
   /* The SP is not normally (ever?) saved, but check anyway */
-  if (!get_frame_saved_regs (fi)[SP_REGNUM])
+  if (!fi->saved_regs[SP_REGNUM])
     {
       /* if the FP was saved, that means the current FP is valid, */
       /* otherwise, it isn't being used, so we use the SP instead */
       if (uses_frame)
-	get_frame_saved_regs (fi)[SP_REGNUM] 
-	  = d10v_read_fp () + get_frame_extra_info (fi)->size;
+	fi->saved_regs[SP_REGNUM] 
+	  = d10v_read_fp () + fi->extra_info->size;
       else
 	{
-	  get_frame_saved_regs (fi)[SP_REGNUM] = fp + get_frame_extra_info (fi)->size;
-	  get_frame_extra_info (fi)->frameless = 1;
-	  get_frame_saved_regs (fi)[FP_REGNUM] = 0;
+	  fi->saved_regs[SP_REGNUM] = fp + fi->extra_info->size;
+	  fi->extra_info->frameless = 1;
+	  fi->saved_regs[FP_REGNUM] = 0;
 	}
     }
 }
@@ -897,24 +901,23 @@
 static void
 d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
   frame_saved_regs_zalloc (fi);
 
-  get_frame_extra_info (fi)->frameless = 0;
-  get_frame_extra_info (fi)->size = 0;
-  get_frame_extra_info (fi)->return_pc = 0;
+  fi->extra_info->frameless = 0;
+  fi->extra_info->size = 0;
+  fi->extra_info->return_pc = 0;
 
-  /* If get_frame_pc (fi) is zero, but this is not the outermost frame, 
+  /* If fi->pc is zero, but this is not the outermost frame, 
      then let's snatch the return_pc from the callee, so that
      DEPRECATED_PC_IN_CALL_DUMMY will work.  */
-  if (get_frame_pc (fi) == 0
-      && frame_relative_level (fi) != 0 && get_next_frame (fi) != NULL)
-    deprecated_update_frame_pc_hack (fi, d10v_frame_saved_pc (get_next_frame (fi)));
+  if (fi->pc == 0 && fi->level != 0 && fi->next != NULL)
+    fi->pc = d10v_frame_saved_pc (fi->next);
 
   /* The call dummy doesn't save any registers on the stack, so we can
      return now.  */
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       return;
     }
diff --git a/gdb/defs.h b/gdb/defs.h
index 3ca6847..9aa604c 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -207,6 +207,7 @@
     language_cplus,		/* C++ */
     language_objc,		/* Objective-C */
     language_java,		/* Java */
+    /* OBSOLETE language_chill,	*/	/* Chill */
     language_fortran,		/* Fortran */
     language_m2,		/* Modula-2 */
     language_asm,		/* Assembly language */
@@ -297,6 +298,10 @@
 
 extern int inside_main_func (CORE_ADDR pc);
 
+/* OBSOLETE From ch-lang.c, for the moment. (FIXME) */
+
+/* OBSOLETE extern char *chill_demangle (const char *); */
+
 /* From utils.c */
 
 extern void initialize_utils (void);
@@ -977,39 +982,6 @@
 
 extern void vwarning (const char *, va_list args);
 
-/* List of known OS ABIs.  If you change this, make sure to update the
-   table in osabi.c.  */
-enum gdb_osabi
-{
-  GDB_OSABI_UNINITIALIZED = -1, /* For struct gdbarch_info.  */
-
-  GDB_OSABI_UNKNOWN = 0,	/* keep this zero */
-
-  GDB_OSABI_SVR4,
-  GDB_OSABI_HURD,
-  GDB_OSABI_SOLARIS,
-  GDB_OSABI_OSF1,
-  GDB_OSABI_LINUX,
-  GDB_OSABI_FREEBSD_AOUT,
-  GDB_OSABI_FREEBSD_ELF,
-  GDB_OSABI_NETBSD_AOUT,
-  GDB_OSABI_NETBSD_ELF,
-  GDB_OSABI_WINCE,
-  GDB_OSABI_GO32,
-  GDB_OSABI_NETWARE,
-  GDB_OSABI_IRIX,
-  GDB_OSABI_LYNXOS,
-  GDB_OSABI_INTERIX,
-  GDB_OSABI_HPUX_ELF,
-  GDB_OSABI_HPUX_SOM,
-
-  GDB_OSABI_ARM_EABI_V1,
-  GDB_OSABI_ARM_EABI_V2,
-  GDB_OSABI_ARM_APCS,
-
-  GDB_OSABI_INVALID		/* keep this last */
-};
-
 /* Global functions from other, non-gdb GNU thingies.
    Libiberty thingies are no longer declared here.  We include libiberty.h
    above, instead.  */
@@ -1111,11 +1083,11 @@
 
 extern ULONGEST extract_unsigned_integer (const void *, int);
 
-extern int extract_long_unsigned_integer (const void *, int, LONGEST *);
+extern int extract_long_unsigned_integer (void *, int, LONGEST *);
 
-extern CORE_ADDR extract_address (const void *, int);
+extern CORE_ADDR extract_address (void *, int);
 
-extern CORE_ADDR extract_typed_address (const void *buf, struct type *type);
+extern CORE_ADDR extract_typed_address (void *buf, struct type *type);
 
 extern void store_signed_integer (void *, int, LONGEST);
 
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 3df9684..2b9579b 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -87,8 +87,8 @@
        dem->demangling_style != unknown_demangling; 
        dem++)
     {
-      if (strcmp (current_demangling_style_string,
-		  dem->demangling_style_name) == 0)
+      if (STREQ (current_demangling_style_string,
+		 dem->demangling_style_name))
 	{
 	  current_demangling_style = dem->demangling_style;
 	  break;
diff --git a/gdb/disasm.c b/gdb/disasm.c
index e69458d..8ce9a15 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -66,7 +66,7 @@
 }
 
 static int
-compare_lines (const void *mle1p, const void *mle2p)
+compare_lines (const PTR mle1p, const PTR mle2p)
 {
   struct dis_line_entry *mle1, *mle2;
   int val;
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 612af11..9e3e6b4 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,41 +1,3 @@
-2003-01-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* gdbint.texinfo (Target Architecture Definition): Mention
-	frame_saved_regs_zalloc and frame_extra_info_zalloc as the way to
-	allocate memory.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.texinfo (Controlling GDB): Add @kindex for
-	"show osabi".
-	(Backtraces): Add @kindex's for backtrace-below-main.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.texinfo (Controlling GDB): Document "set osabi".
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.texinfo (Backtraces): Document "set backtrace-below-main".
-	* gdbint.texinfo (FRAME_CHAIN_VALID): Update documentation.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.texinfo (Controlling GDB): Add ABI section.  Document
-	"set coerce-float-to-double".
-	* gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Remove documentation.
-
-2003-01-02  Andrew Cagney  <ac131313@redhat.com>
-
-	* stabs.texinfo: Remove obsolete text.
-	* gdbint.texinfo: Ditto.
-	* gdb.texinfo: Ditto.
-
-2002-12-22  Mark Kettenis  <kettenis@gnu.org>
-
-	* gdbint.texinfo (Target Architecture Definition): Update
-	description of gdbarch_register_osabi.
-
 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* agentexpr.texi: Fix typos.
diff --git a/gdb/doc/fdl.texi b/gdb/doc/fdl.texi
index f4726b9..142a8e1 100644
--- a/gdb/doc/fdl.texi
+++ b/gdb/doc/fdl.texi
@@ -197,9 +197,9 @@
    You may omit a network location for a work that was published at
    least four years before the Document itself, or if the original
    publisher of the version it refers to gives permission.@*
-K. In any section entitled ``Acknowledgements'' or ``Dedications'',
+K. In any section entitled ``Acknowledgments'' or ``Dedications'',
    preserve the section's title, and preserve in the section all the
-   substance and tone of each of the contributor acknowledgements
+   substance and tone of each of the contributor acknowledgments
    and/or dedications given therein.@*
 L. Preserve all the Invariant Sections of the Document,
    unaltered in their text and in their titles.  Section numbers
@@ -257,7 +257,7 @@
 
 In the combination, you must combine any sections entitled ``History''
 in the various original documents, forming one section entitled
-``History''; likewise combine any sections entitled ``Acknowledgements'',
+``History''; likewise combine any sections entitled ``Acknowledgments'',
 and any sections entitled ``Dedications.''  You must delete all sections
 entitled ``Endorsements.''
 @sp 1
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8bfce2f..56db6ca 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1,6 +1,6 @@
 \input texinfo      @c -*-texinfo-*-
 @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 1999, 2000, 2001, 2002, 2003
+@c 1999, 2000, 2001, 2002
 @c Free Software Foundation, Inc.
 @c
 @c %**start of header
@@ -54,7 +54,7 @@
 for @value{GDBN} Version @value{GDBVN}.
 
 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
-              1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+              1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -87,7 +87,7 @@
 
 @vskip 0pt plus 1filll
 Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 @sp 2
 Published by the Free Software Foundation @*
 59 Temple Place - Suite 330, @*
@@ -118,7 +118,7 @@
 This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
 @value{GDBVN}.
 
-Copyright (C) 1988-2003 Free Software Foundation, Inc.
+Copyright (C) 1988-2002 Free Software Foundation, Inc.
 
 @menu
 * Summary::                     Summary of @value{GDBN}
@@ -197,9 +197,12 @@
 For more information, see @ref{Support,,Supported languages}.
 For more information, see @ref{C,,C and C++}.
 
+@c OBSOLETE @cindex Chill
 @cindex Modula-2
-Support for Modula-2 is partial.  For information on Modula-2, see
-@ref{Modula-2,,Modula-2}.
+Support for Modula-2
+@c OBSOLETE and Chill
+is partial.  For information on Modula-2, see @ref{Modula-2,,Modula-2}.
+@c OBSOLETE For information on Chill, see @ref{Chill}.
 
 @cindex Pascal
 Debugging Pascal programs which use sets, subranges, file variables, or
@@ -3857,29 +3860,6 @@
 value, indicating that your program has stopped at the beginning of the
 code for line @code{993} of @code{builtin.c}.
 
-@kindex set backtrace-below-main
-@kindex show backtrace-below-main
-
-Most programs have a standard entry point---a place where system libraries
-and startup code transition into user code.  For C this is @code{main}.
-When @value{GDBN} finds the entry function in a backtrace it will terminate
-the backtrace, to avoid tracing into highly system-specific (and generally
-uninteresting) code.  If you need to examine the startup code, then you can
-change this behavior.
-
-@table @code
-@item set backtrace-below-main off
-Backtraces will stop when they encounter the user entry point.  This is the
-default.
-
-@item set backtrace-below-main
-@itemx set backtrace-below-main on
-Backtraces will continue past the user entry point to the top of the stack.
-
-@item show backtrace-below-main
-Display the current backtrace policy.
-@end table
-
 @node Selection
 @section Selecting a frame
 
@@ -7474,6 +7454,11 @@
 @itemx .F
 Fortran source file
 
+@c OBSOLETE @item .ch
+@c OBSOLETE @itemx .c186
+@c OBSOLETE @itemx .c286
+@c OBSOLETE CHILL source file
+
 @item .mod
 Modula-2 source file
 
@@ -7745,7 +7730,9 @@
 @node Support
 @section Supported languages
 
-@value{GDBN} supports C, C@t{++}, Fortran, Java, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Fortran, Java, 
+@c OBSOLETE Chill,
+assembly, and Modula-2.
 @c This is false ...
 Some @value{GDBN} features may be used in expressions regardless of the
 language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -7764,6 +7751,7 @@
 @menu
 * C::           C and C@t{++}
 * Modula-2::    Modula-2
+@c OBSOLETE * Chill::        Chill
 @end menu
 
 @node C
@@ -8729,6 +8717,505 @@
 In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
 interpreted as the beginning of a comment.  Use @code{<>} instead.
 
+@c OBSOLETE @node Chill
+@c OBSOLETE @subsection Chill
+@c OBSOLETE 
+@c OBSOLETE The extensions made to @value{GDBN} to support Chill only support output
+@c OBSOLETE from the @sc{gnu} Chill compiler.  Other Chill compilers are not currently
+@c OBSOLETE supported, and attempting to debug executables produced by them is most
+@c OBSOLETE likely to give an error as @value{GDBN} reads in the executable's symbol
+@c OBSOLETE table.
+@c OBSOLETE 
+@c OBSOLETE @c This used to say "... following Chill related topics ...", but since
+@c OBSOLETE @c menus are not shown in the printed manual, it would look awkward.
+@c OBSOLETE This section covers the Chill related topics and the features
+@c OBSOLETE of @value{GDBN} which support these topics.
+@c OBSOLETE 
+@c OBSOLETE @menu
+@c OBSOLETE * How modes are displayed::        How modes are displayed
+@c OBSOLETE * Locations::                        Locations and their accesses
+@c OBSOLETE * Values and their Operations:: Values and their Operations
+@c OBSOLETE * Chill type and range checks::
+@c OBSOLETE * Chill defaults::
+@c OBSOLETE @end menu
+@c OBSOLETE 
+@c OBSOLETE @node How modes are displayed
+@c OBSOLETE @subsubsection How modes are displayed
+@c OBSOLETE 
+@c OBSOLETE The Chill Datatype- (Mode) support of @value{GDBN} is directly related
+@c OBSOLETE with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
+@c OBSOLETE slightly from the standard specification of the Chill language. The
+@c OBSOLETE provided modes are:
+@c OBSOLETE 
+@c OBSOLETE @c FIXME: this @table's contents effectively disable @code by using @r
+@c OBSOLETE @c on every @item.  So why does it need @code?
+@c OBSOLETE @table @code
+@c OBSOLETE @item @r{@emph{Discrete modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
+@c OBSOLETE UINT, LONG, ULONG},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Boolean Mode} which is predefined by @code{BOOL},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character Mode} which is predefined by @code{CHAR},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Set Mode} which is displayed by the keyword @code{SET}.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = SET (karli = 10, susi = 20, fritzi = 100)
+@c OBSOLETE @end smallexample
+@c OBSOLETE If the type is an unnumbered set the set element values are omitted.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Range Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{type = <basemode>(<lower bound> : <upper bound>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{<lower bound>, <upper bound>} can be of any discrete literal
+@c OBSOLETE expression (e.g. set element names).
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Powerset Mode:}}
+@c OBSOLETE A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
+@c OBSOLETE the member mode of the powerset.  The member mode can be any discrete mode.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = POWERSET SET (egon, hugo, otto)
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Reference Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
+@c OBSOLETE followed by the mode name to which the reference is bound.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Procedure mode}}
+@c OBSOLETE The procedure mode is displayed by @code{type = PROC(<parameter list>)
+@c OBSOLETE <return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
+@c OBSOLETE list>} is a list of the parameter modes.  @code{<return mode>} indicates
+@c OBSOLETE the mode of the result of the procedure if any.  The exceptionlist lists
+@c OBSOLETE all possible exceptions which can be raised by the procedure.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE @item @r{@emph{Instance mode}}
+@c OBSOLETE The instance mode is represented by a structure, which has a static
+@c OBSOLETE type, and is therefore not really of interest.
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Synchronization Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Event Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{EVENT (<event length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{(<event length>)} is optional.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Buffer Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{BUFFER (<buffer length>)<buffer element mode>}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{(<buffer length>)} is optional.
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Timing Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Duration Mode} which is predefined by @code{DURATION}
+@c OBSOLETE @item
+@c OBSOLETE @emph{Absolute Time Mode} which is predefined by @code{TIME}
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Real Modes:}}
+@c OBSOLETE Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{String Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character String Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{CHARS(<string length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE followed by the keyword @code{VARYING} if the String Mode is a varying
+@c OBSOLETE mode
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bit String Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{BOOLS(<string
+@c OBSOLETE length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Array Mode:}}
+@c OBSOLETE The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
+@c OBSOLETE followed by the element mode (which may in turn be an array mode).
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = ARRAY (1:42)
+@c OBSOLETE           ARRAY (1:20)
+@c OBSOLETE              SET (karli = 10, susi = 20, fritzi = 100)
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Structure Mode}}
+@c OBSOLETE The Structure mode is displayed by the keyword @code{STRUCT(<field
+@c OBSOLETE list>)}.  The @code{<field list>} consists of names and modes of fields
+@c OBSOLETE of the structure.  Variant structures have the keyword @code{CASE <field>
+@c OBSOLETE OF <variant fields> ESAC} in their field list.  Since the current version
+@c OBSOLETE of the GNU Chill compiler doesn't implement tag processing (no runtime
+@c OBSOLETE checks of variant fields, and therefore no debugging info), the output
+@c OBSOLETE always displays all variant fields.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype str
+@c OBSOLETE type = STRUCT (
+@c OBSOLETE     as x,
+@c OBSOLETE     bs x,
+@c OBSOLETE     CASE bs OF
+@c OBSOLETE     (karli):
+@c OBSOLETE         cs a
+@c OBSOLETE     (ott):
+@c OBSOLETE         ds x
+@c OBSOLETE     ESAC
+@c OBSOLETE )
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end table
+@c OBSOLETE 
+@c OBSOLETE @node Locations
+@c OBSOLETE @subsubsection Locations and their accesses
+@c OBSOLETE 
+@c OBSOLETE A location in Chill is an object which can contain values.
+@c OBSOLETE 
+@c OBSOLETE A value of a location is generally accessed by the (declared) name of
+@c OBSOLETE the location.  The output conforms to the specification of values in
+@c OBSOLETE Chill programs.  How values are specified
+@c OBSOLETE is the topic of the next section, @ref{Values and their Operations}.
+@c OBSOLETE 
+@c OBSOLETE The pseudo-location @code{RESULT} (or @code{result}) can be used to
+@c OBSOLETE display or change the result of a currently-active procedure:
+@c OBSOLETE 
+@c OBSOLETE @smallexample
+@c OBSOLETE set result := EXPR
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @noindent
+@c OBSOLETE This does the same as the Chill action @code{RESULT EXPR} (which
+@c OBSOLETE is not available in @value{GDBN}).
+@c OBSOLETE 
+@c OBSOLETE Values of reference mode locations are printed by @code{PTR(<hex
+@c OBSOLETE value>)} in case of a free reference mode, and by @code{(REF <reference
+@c OBSOLETE mode>) (<hex-value>)} in case of a bound reference.  @code{<hex value>}
+@c OBSOLETE represents the address where the reference points to.  To access the
+@c OBSOLETE value of the location referenced by the pointer, use the dereference
+@c OBSOLETE operator @samp{->}.
+@c OBSOLETE 
+@c OBSOLETE Values of procedure mode locations are displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{@{ PROC
+@c OBSOLETE (<argument modes> ) <return mode> @} <address> <name of procedure
+@c OBSOLETE location>}
+@c OBSOLETE @end smallexample
+@c OBSOLETE @code{<argument modes>} is a list of modes according to the parameter
+@c OBSOLETE specification of the procedure and @code{<address>} shows the address of
+@c OBSOLETE the entry point.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE Locations of instance modes are displayed just like a structure with two
+@c OBSOLETE fields specifying the @emph{process type} and the @emph{copy number} of
+@c OBSOLETE the investigated instance location@footnote{This comes from the current
+@c OBSOLETE implementation of instances.  They are implemented as a structure (no
+@c OBSOLETE na).  The output should be something like @code{[<name of the process>;
+@c OBSOLETE <instance number>]}.}.  The field names are @code{__proc_type} and
+@c OBSOLETE @code{__proc_copy}.
+@c OBSOLETE 
+@c OBSOLETE Locations of synchronization modes are displayed like a structure with
+@c OBSOLETE the field name @code{__event_data} in case of a event mode location, and
+@c OBSOLETE like a structure with the field @code{__buffer_data} in case of a buffer
+@c OBSOLETE mode location (refer to previous paragraph).
+@c OBSOLETE 
+@c OBSOLETE Structure Mode locations are printed by @code{[.<field name>: <value>,
+@c OBSOLETE ...]}.  The @code{<field name>} corresponds to the structure mode
+@c OBSOLETE definition and the layout of @code{<value>} varies depending of the mode
+@c OBSOLETE of the field.  If the investigated structure mode location is of variant
+@c OBSOLETE structure mode, the variant parts of the structure are enclosed in curled
+@c OBSOLETE braces (@samp{@{@}}).  Fields enclosed by @samp{@{,@}} are residing
+@c OBSOLETE on the same memory location and represent the current values of the
+@c OBSOLETE memory location in their specific modes.  Since no tag processing is done
+@c OBSOLETE all variants are displayed. A variant field is printed by
+@c OBSOLETE @code{(<variant name>) = .<field name>: <value>}.  (who implements the
+@c OBSOLETE stuff ???)
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
+@c OBSOLETE [.cs: []], (susi) = [.ds: susi]}]
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE Substructures of string mode-, array mode- or structure mode-values
+@c OBSOLETE (e.g. array slices, fields of structure locations) are accessed using
+@c OBSOLETE certain operations which are described in the next section, @ref{Values
+@c OBSOLETE and their Operations}.
+@c OBSOLETE 
+@c OBSOLETE A location value may be interpreted as having a different mode using the
+@c OBSOLETE location conversion.  This mode conversion is written as @code{<mode
+@c OBSOLETE name>(<location>)}.  The user has to consider that the sizes of the modes
+@c OBSOLETE have to be equal otherwise an error occurs.  Furthermore, no range
+@c OBSOLETE checking of the location against the destination mode is performed, and
+@c OBSOLETE therefore the result can be quite confusing.
+@c OBSOLETE 
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @node Values and their Operations
+@c OBSOLETE @subsubsection Values and their Operations
+@c OBSOLETE 
+@c OBSOLETE Values are used to alter locations, to investigate complex structures in
+@c OBSOLETE more detail or to filter relevant information out of a large amount of
+@c OBSOLETE data.  There are several (mode dependent) operations defined which enable
+@c OBSOLETE such investigations.  These operations are not only applicable to
+@c OBSOLETE constant values but also to locations, which can become quite useful
+@c OBSOLETE when debugging complex structures.  During parsing the command line
+@c OBSOLETE (e.g. evaluating an expression) @value{GDBN} treats location names as
+@c OBSOLETE the values behind these locations.
+@c OBSOLETE 
+@c OBSOLETE This section describes how values have to be specified and which
+@c OBSOLETE operations are legal to be used with such values.
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE @item Literal Values
+@c OBSOLETE Literal values are specified in the same manner as in @sc{gnu} Chill programs.
+@c OBSOLETE For detailed specification refer to the @sc{gnu} Chill implementation Manual
+@c OBSOLETE chapter 1.5.
+@c OBSOLETE @c FIXME: if the Chill Manual is a Texinfo documents, the above should
+@c OBSOLETE @c be converted to a @ref.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Integer Literals} are specified in the same manner as in Chill
+@c OBSOLETE programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
+@c OBSOLETE @item
+@c OBSOLETE @emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character Literals} are defined by @code{'<character>'}. (e.g.
+@c OBSOLETE @code{'M'})
+@c OBSOLETE @item
+@c OBSOLETE @emph{Set Literals} are defined by a name which was specified in a set
+@c OBSOLETE mode.  The value delivered by a Set Literal is the set value.  This is
+@c OBSOLETE comparable to an enumeration in C/C@t{++} language.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Emptiness Literal} is predefined by @code{NULL}.  The value of the
+@c OBSOLETE emptiness literal delivers either the empty reference value, the empty
+@c OBSOLETE procedure value or the empty instance value.
+@c OBSOLETE 
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character String Literals} are defined by a sequence of characters
+@c OBSOLETE enclosed in single- or double quotes.  If a single- or double quote has
+@c OBSOLETE to be part of the string literal it has to be stuffed (specified twice).
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bitstring Literals} are specified in the same manner as in Chill
+@c OBSOLETE programs (refer z200/88 chpt 5.2.4.8).
+@c OBSOLETE @item
+@c OBSOLETE @emph{Floating point literals} are specified in the same manner as in
+@c OBSOLETE (gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
+@c OBSOLETE @end itemize
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @item Tuple Values
+@c OBSOLETE A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
+@c OBSOLETE name>} can be omitted if the mode of the tuple is unambiguous.  This
+@c OBSOLETE unambiguity is derived from the context of a evaluated expression.
+@c OBSOLETE @code{<tuple>} can be one of the following:
+@c OBSOLETE 
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item @emph{Powerset Tuple}
+@c OBSOLETE @item @emph{Array Tuple}
+@c OBSOLETE @item @emph{Structure Tuple}
+@c OBSOLETE Powerset tuples, array tuples and structure tuples are specified in the
+@c OBSOLETE same manner as in Chill programs refer to z200/88 chpt 5.2.5.
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item String Element Value
+@c OBSOLETE A string element value is specified by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{<string value>(<index>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{<index>} is a integer expression.  It delivers a character
+@c OBSOLETE value which is equivalent to the character indexed by @code{<index>} in
+@c OBSOLETE the string.
+@c OBSOLETE 
+@c OBSOLETE @item String Slice Value
+@c OBSOLETE A string slice value is specified by @code{<string value>(<slice
+@c OBSOLETE spec>)}, where @code{<slice spec>} can be either a range of integer
+@c OBSOLETE expressions or specified by @code{<start expr> up <size>}.
+@c OBSOLETE @code{<size>} denotes the number of elements which the slice contains.
+@c OBSOLETE The delivered value is a string value, which is part of the specified
+@c OBSOLETE string.
+@c OBSOLETE 
+@c OBSOLETE @item Array Element Values
+@c OBSOLETE An array element value is specified by @code{<array value>(<expr>)} and
+@c OBSOLETE delivers a array element value of the mode of the specified array.
+@c OBSOLETE 
+@c OBSOLETE @item Array Slice Values
+@c OBSOLETE An array slice is specified by @code{<array value>(<slice spec>)}, where
+@c OBSOLETE @code{<slice spec>} can be either a range specified by expressions or by
+@c OBSOLETE @code{<start expr> up <size>}.  @code{<size>} denotes the number of
+@c OBSOLETE arrayelements the slice contains.  The delivered value is an array value
+@c OBSOLETE which is part of the specified array.
+@c OBSOLETE 
+@c OBSOLETE @item Structure Field Values
+@c OBSOLETE A structure field value is derived by @code{<structure value>.<field
+@c OBSOLETE name>}, where @code{<field name>} indicates the name of a field specified
+@c OBSOLETE in the mode definition of the structure.  The mode of the delivered value
+@c OBSOLETE corresponds to this mode definition in the structure definition.
+@c OBSOLETE 
+@c OBSOLETE @item Procedure Call Value
+@c OBSOLETE The procedure call value is derived from the return value of the
+@c OBSOLETE procedure@footnote{If a procedure call is used for instance in an
+@c OBSOLETE expression, then this procedure is called with all its side
+@c OBSOLETE effects.  This can lead to confusing results if used carelessly.}.
+@c OBSOLETE 
+@c OBSOLETE Values of duration mode locations are represented by @code{ULONG} literals.
+@c OBSOLETE 
+@c OBSOLETE Values of time mode locations appear as
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{TIME(<secs>:<nsecs>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE This is not implemented yet:
+@c OBSOLETE @item Built-in Value
+@c OBSOLETE @noindent
+@c OBSOLETE The following built in functions are provided:
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE @item @code{ADDR()}
+@c OBSOLETE @item @code{NUM()}
+@c OBSOLETE @item @code{PRED()}
+@c OBSOLETE @item @code{SUCC()}
+@c OBSOLETE @item @code{ABS()}
+@c OBSOLETE @item @code{CARD()}
+@c OBSOLETE @item @code{MAX()}
+@c OBSOLETE @item @code{MIN()}
+@c OBSOLETE @item @code{SIZE()}
+@c OBSOLETE @item @code{UPPER()}
+@c OBSOLETE @item @code{LOWER()}
+@c OBSOLETE @item @code{LENGTH()}
+@c OBSOLETE @item @code{SIN()}
+@c OBSOLETE @item @code{COS()}
+@c OBSOLETE @item @code{TAN()}
+@c OBSOLETE @item @code{ARCSIN()}
+@c OBSOLETE @item @code{ARCCOS()}
+@c OBSOLETE @item @code{ARCTAN()}
+@c OBSOLETE @item @code{EXP()}
+@c OBSOLETE @item @code{LN()}
+@c OBSOLETE @item @code{LOG()}
+@c OBSOLETE @item @code{SQRT()}
+@c OBSOLETE @end table
+@c OBSOLETE 
+@c OBSOLETE For a detailed description refer to the GNU Chill implementation manual
+@c OBSOLETE chapter 1.6.
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @item Zero-adic Operator Value
+@c OBSOLETE The zero-adic operator value is derived from the instance value for the
+@c OBSOLETE current active process.
+@c OBSOLETE 
+@c OBSOLETE @item Expression Values
+@c OBSOLETE The value delivered by an expression is the result of the evaluation of
+@c OBSOLETE the specified expression.  If there are error conditions (mode
+@c OBSOLETE incompatibility, etc.) the evaluation of expressions is aborted with a
+@c OBSOLETE corresponding error message.  Expressions may be parenthesised which
+@c OBSOLETE causes the evaluation of this expression before any other expression
+@c OBSOLETE which uses the result of the parenthesised expression.  The following
+@c OBSOLETE operators are supported by @value{GDBN}:
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE @item @code{OR, ORIF, XOR}
+@c OBSOLETE @itemx @code{AND, ANDIF}
+@c OBSOLETE @itemx @code{NOT}
+@c OBSOLETE Logical operators defined over operands of boolean mode.
+@c OBSOLETE 
+@c OBSOLETE @item @code{=, /=}
+@c OBSOLETE Equality and inequality operators defined over all modes.
+@c OBSOLETE 
+@c OBSOLETE @item @code{>, >=}
+@c OBSOLETE @itemx @code{<, <=}
+@c OBSOLETE Relational operators defined over predefined modes.
+@c OBSOLETE 
+@c OBSOLETE @item @code{+, -}
+@c OBSOLETE @itemx @code{*, /, MOD, REM}
+@c OBSOLETE Arithmetic operators defined over predefined modes.
+@c OBSOLETE 
+@c OBSOLETE @item @code{-}
+@c OBSOLETE Change sign operator.
+@c OBSOLETE 
+@c OBSOLETE @item @code{//}
+@c OBSOLETE String concatenation operator.
+@c OBSOLETE 
+@c OBSOLETE @item @code{()}
+@c OBSOLETE String repetition operator.
+@c OBSOLETE 
+@c OBSOLETE @item @code{->}
+@c OBSOLETE Referenced location operator which can be used either to take the
+@c OBSOLETE address of a location (@code{->loc}), or to dereference a reference
+@c OBSOLETE location (@code{loc->}).
+@c OBSOLETE 
+@c OBSOLETE @item @code{OR, XOR}
+@c OBSOLETE @itemx @code{AND}
+@c OBSOLETE @itemx @code{NOT}
+@c OBSOLETE Powerset and bitstring operators.
+@c OBSOLETE 
+@c OBSOLETE @item @code{>, >=}
+@c OBSOLETE @itemx @code{<, <=}
+@c OBSOLETE Powerset inclusion operators.
+@c OBSOLETE 
+@c OBSOLETE @item @code{IN}
+@c OBSOLETE Membership operator.
+@c OBSOLETE @end table
+@c OBSOLETE @end table
+@c OBSOLETE 
+@c OBSOLETE @node Chill type and range checks
+@c OBSOLETE @subsubsection Chill type and range checks
+@c OBSOLETE 
+@c OBSOLETE @value{GDBN} considers two Chill variables mode equivalent if the sizes
+@c OBSOLETE of the two modes are equal.  This rule applies recursively to more
+@c OBSOLETE complex datatypes which means that complex modes are treated
+@c OBSOLETE equivalent if all element modes (which also can be complex modes like
+@c OBSOLETE structures, arrays, etc.) have the same size.
+@c OBSOLETE 
+@c OBSOLETE Range checking is done on all mathematical operations, assignment, array
+@c OBSOLETE index bounds and all built in procedures.
+@c OBSOLETE 
+@c OBSOLETE Strong type checks are forced using the @value{GDBN} command @code{set
+@c OBSOLETE check strong}.  This enforces strong type and range checks on all
+@c OBSOLETE operations where Chill constructs are used (expressions, built in
+@c OBSOLETE functions, etc.) in respect to the semantics as defined in the z.200
+@c OBSOLETE language specification.
+@c OBSOLETE 
+@c OBSOLETE All checks can be disabled by the @value{GDBN} command @code{set check
+@c OBSOLETE off}.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE @c Deviations from the Chill Standard Z200/88
+@c OBSOLETE see last paragraph ?
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @node Chill defaults
+@c OBSOLETE @subsubsection Chill defaults
+@c OBSOLETE 
+@c OBSOLETE If type and range checking are set automatically by @value{GDBN}, they
+@c OBSOLETE both default to @code{on} whenever the working language changes to
+@c OBSOLETE Chill.  This happens regardless of whether you or @value{GDBN}
+@c OBSOLETE selected the working language.
+@c OBSOLETE 
+@c OBSOLETE If you allow @value{GDBN} to set the language automatically, then entering
+@c OBSOLETE code compiled from a file whose name ends with @file{.ch} sets the
+@c OBSOLETE working language to Chill.  @xref{Automatically, ,Having @value{GDBN} set
+@c OBSOLETE the language automatically}, for further details.
+
 @node Symbols
 @chapter Examining the Symbol Table
 
@@ -11162,6 +11649,7 @@
 * i960::                        Intel i960
 * M32R/D::                      Mitsubishi M32R/D
 * M68K::                        Motorola M68K
+@c OBSOLETE * M88K::                        Motorola M88K
 * MIPS Embedded::               MIPS Embedded
 * OpenRISC 1000::               OpenRisc 1000
 * PA::                          HP PA Embedded
@@ -11597,6 +12085,17 @@
 
 @end table
 
+@c OBSOLETE @node M88K
+@c OBSOLETE @subsection M88K
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE 
+@c OBSOLETE @kindex target bug
+@c OBSOLETE @item target bug @var{dev}
+@c OBSOLETE BUG monitor, running on a MVME187 (m88k) board.
+@c OBSOLETE 
+@c OBSOLETE @end table
+
 @node MIPS Embedded
 @subsection MIPS Embedded
 
@@ -12279,7 +12778,6 @@
 * History::                     Command history
 * Screen Size::                 Screen size
 * Numbers::                     Numbers
-* ABI::                         Configuring the current ABI
 * Messages/Warnings::           Optional warnings and messages
 * Debugging Output::            Optional messages about internal happenings
 @end menu
@@ -12526,63 +13024,6 @@
 Display the current default base for numeric display.
 @end table
 
-@node ABI
-@section Configuring the current ABI
-
-@value{GDBN} can determine the @dfn{ABI} (Application Binary Interface) of your
-application automatically.  However, sometimes you need to override its
-conclusions.  Use these commands to manage @value{GDBN}'s view of the
-current ABI.
-
-@cindex OS ABI
-@kindex set osabi
-@kindex show osabi
-
-One @value{GDBN} configuration can debug binaries for multiple operating
-system targets, either via remote debugging or native emulation. 
-@value{GDBN} will autodetect the @dfn{OS ABI} (Operating System ABI) in use,
-but you can override its conclusion using the @code{set osabi} command.
-One example where this is useful is in debugging of binaries which use
-an alternate C library (e.g.@: @sc{uClibc} for @sc{gnu}/Linux) which does
-not have the same identifying marks that the standard C library for your
-platform provides.
-
-@table @code
-@item show osabi
-Show the OS ABI currently in use.
-
-@item set osabi
-With no argument, show the list of registered available OS ABI's.
-
-@item set osabi @var{abi}
-Set the current OS ABI to @var{abi}.
-@end table
-
-@cindex float promotion
-@kindex set coerce-float-to-double
-
-Generally, the way that an argument of type @code{float} is passed to a
-function depends on whether the function is prototyped.  For a prototyped
-(i.e.@: ANSI/ISO style) function, @code{float} arguments are passed unchanged,
-according to the architecture's convention for @code{float}.  For unprototyped
-(i.e.@: K&R style) functions, @code{float} arguments are first promoted to type
-@code{double} and then passed.
-
-Unfortunately, some forms of debug information do not reliably indicate whether
-a function is prototyped.  If @value{GDBN} calls a function that is not marked
-as prototyped, it consults @kbd{set coerce-float-to-double}.
-
-@table @code
-@item set coerce-float-to-double
-@itemx set coerce-float-to-double on
-Arguments of type @code{float} will be promoted to @code{double} when passed
-to an unprototyped function.  This is the default setting.
-
-@item set coerce-float-to-double off
-Arguments of type @code{float} will be passed directly to unprototyped
-functions.
-@end table
-
 @node Messages/Warnings
 @section Optional warnings and messages
 
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 3b6293f..26fd523 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -8,7 +8,7 @@
 
 @ifinfo
 This file documents the internals of the GNU debugger @value{GDBN}.
-Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003
+Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002
    Free Software Foundation, Inc.
 Contributed by Cygnus Solutions.  Written by John Gilmore.
 Second Edition by Stan Shebs.
@@ -50,8 +50,8 @@
 @end tex
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,
-   2002, 2003  Free Software Foundation, Inc.
+Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001, 2002
+   Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -1841,6 +1841,7 @@
 DWARF 1 is a debugging format that was originally designed to be
 used with ELF in SVR4 systems.
 
+@c OBSOLETE CHILL_PRODUCER
 @c GCC_PRODUCER
 @c GPLUS_PRODUCER
 @c LCC_PRODUCER
@@ -2423,12 +2424,9 @@
 Return the name of the OS ABI corresponding to @var{osabi}.
 @end deftypefun
 
-@deftypefun void gdbarch_register_osabi (enum bfd_architecture @var{arch}, unsigned long @var{machine}, enum gdb_osabi @var{osabi}, void (*@var{init_osabi})(struct gdbarch_info @var{info}, struct gdbarch *@var{gdbarch}))
+@deftypefun void gdbarch_register_osabi (enum bfd_architecture @var{arch}, enum gdb_osabi @var{osabi}, void (*@var{init_osabi})(struct gdbarch_info @var{info}, struct gdbarch *@var{gdbarch}))
 Register the OS ABI handler specified by @var{init_osabi} for the
-architecture, machine type and OS ABI specified by @var{arch},
-@var{machine} and @var{osabi}.  In most cases, a value of zero for the
-machine type, which implies the architecture's default machine type,
-will suffice.
+architecture/OS ABI pair specified by @var{arch} and @var{osabi}.
 @end deftypefun
 
 @deftypefun void gdbarch_register_osabi_sniffer (enum bfd_architecture @var{arch}, enum bfd_flavour @var{flavour}, enum gdb_osabi (*@var{sniffer})(bfd *@var{abfd}))
@@ -3144,6 +3142,50 @@
 
 Currently only implemented correctly for native Sparc configurations?
 
+@item COERCE_FLOAT_TO_DOUBLE (@var{formal}, @var{actual})
+@findex COERCE_FLOAT_TO_DOUBLE
+@cindex promotion to @code{double}
+@cindex @code{float} arguments
+@cindex prototyped functions, passing arguments to
+@cindex passing arguments to prototyped functions
+Return non-zero if GDB should promote @code{float} values to
+@code{double} when calling a non-prototyped function.  The argument
+@var{actual} is the type of the value we want to pass to the function.
+The argument @var{formal} is the type of this argument, as it appears in
+the function's definition.  Note that @var{formal} may be zero if we
+have no debugging information for the function, or if we're passing more
+arguments than are officially declared (for example, varargs).  This
+macro is never invoked if the function definitely has a prototype.
+
+How you should pass arguments to a function depends on whether it was
+defined in K&R style or prototype style.  If you define a function using
+the K&R syntax that takes a @code{float} argument, then callers must
+pass that argument as a @code{double}.  If you define the function using
+the prototype syntax, then you must pass the argument as a @code{float},
+with no promotion.
+
+Unfortunately, on certain older platforms, the debug info doesn't
+indicate reliably how each function was defined.  A function type's
+@code{TYPE_FLAG_PROTOTYPED} flag may be unset, even if the function was
+defined in prototype style.  When calling a function whose
+@code{TYPE_FLAG_PROTOTYPED} flag is unset, GDB consults the
+@code{COERCE_FLOAT_TO_DOUBLE} macro to decide what to do.
+
+@findex standard_coerce_float_to_double
+For modern targets, it is proper to assume that, if the prototype flag
+is unset, that can be trusted: @code{float} arguments should be promoted
+to @code{double}.  You should use the function
+@code{standard_coerce_float_to_double} to get this behavior.
+
+@findex default_coerce_float_to_double
+For some older targets, if the prototype flag is unset, that doesn't
+tell us anything.  So we guess that, if we don't have a type for the
+formal parameter (@i{i.e.}, the first argument to
+@code{COERCE_FLOAT_TO_DOUBLE} is null), then we should promote it;
+otherwise, we should leave it alone.  The function
+@code{default_coerce_float_to_double} provides this behavior; it is the
+default value, for compatibility with older configurations.
+
 @item int CONVERT_REGISTER_P(@var{regnum})
 @findex CONVERT_REGISTER_P
 Return non-zero if register @var{regnum} can represent data values in a
@@ -3277,19 +3319,34 @@
 
 @item FRAME_CHAIN_VALID(@var{chain}, @var{thisframe})
 @findex FRAME_CHAIN_VALID
-Define this to be an expression that returns zero if the given frame is an
-outermost frame, with no caller, and nonzero otherwise.  Most normal
-situations can be handled without defining this macro, including @code{NULL}
-chain pointers, dummy frames, and frames whose PC values are inside the
-startup file (e.g.@: @file{crt0.o}), inside @code{main}, or inside
-@code{_start}.
+Define this to be an expression that returns zero if the given frame is
+an outermost frame, with no caller, and nonzero otherwise.  Several
+common definitions are available:
+
+@itemize @bullet
+@item
+@code{file_frame_chain_valid} is nonzero if the chain pointer is nonzero
+and given frame's PC is not inside the startup file (such as
+@file{crt0.o}).
+
+@item
+@code{func_frame_chain_valid} is nonzero if the chain
+pointer is nonzero and the given frame's PC is not in @code{main} or a
+known entry point function (such as @code{_start}).
+
+@item
+@code{generic_file_frame_chain_valid} and
+@code{generic_func_frame_chain_valid} are equivalent implementations for
+targets using generic dummy frames.
+@end itemize
 
 @item FRAME_INIT_SAVED_REGS(@var{frame})
 @findex FRAME_INIT_SAVED_REGS
 See @file{frame.h}.  Determines the address of all registers in the
 current stack frame storing each in @code{frame->saved_regs}.  Space for
 @code{frame->saved_regs} shall be allocated by
-@code{FRAME_INIT_SAVED_REGS} using @code{frame_saved_regs_zalloc}.
+@code{FRAME_INIT_SAVED_REGS} using either
+@code{frame_saved_regs_zalloc} or @code{frame_obstack_alloc}.
 
 @code{FRAME_FIND_SAVED_REGS} and @code{EXTRA_FRAME_INFO} are deprecated.
 
@@ -3394,7 +3451,7 @@
 @findex INIT_EXTRA_FRAME_INFO
 If additional information about the frame is required this should be
 stored in @code{frame->extra_info}.  Space for @code{frame->extra_info}
-is allocated using @code{frame_extra_info_zalloc}.
+is allocated using @code{frame_obstack_alloc}.
 
 @item DEPRECATED_INIT_FRAME_PC (@var{fromleaf}, @var{prev})
 @findex DEPRECATED_INIT_FRAME_PC
@@ -3722,6 +3779,10 @@
 Define this to convert sdb register numbers into @value{GDBN} regnums.  If not
 defined, no conversion will be done.
 
+@c OBSOLETE @item SHIFT_INST_REGS
+@c OBSOLETE @findex SHIFT_INST_REGS
+@c OBSOLETE (Only used for m88k targets.)
+
 @item SKIP_PERMANENT_BREAKPOINT
 @findex SKIP_PERMANENT_BREAKPOINT
 Advance the inferior's PC past a permanent breakpoint.  @value{GDBN} normally
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 52b88b4..6b4c3dc 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -1754,7 +1754,8 @@
 enumeration or a subrange, and the type is a bitmask whose length is
 specified by the number of elements in @var{type-information}.
 
-In CHILL, if it is a bitstring instead of a set, also use the @samp{S}
+In CHILL, @c OBSOLETE
+if it is a bitstring instead of a set, also use the @samp{S}
 type attribute (@pxref{String Field}).
 
 @item * @var{type-information}
@@ -1955,7 +1956,8 @@
 Pascal Stringptr.  What is this?  This is an AIX feature.
 @end table
 
-Languages, such as CHILL which have a string type which is basically
+Languages, such as CHILL @c OBSOLETE
+which have a string type which is basically
 just an array of characters use the @samp{S} type attribute
 (@pxref{String Field}).
 
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 8c5d39c..75c3c4d 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -156,7 +156,7 @@
   PE_funcrel = DW_EH_PE_funcrel
 };
 
-#define UNWIND_CONTEXT(fi) ((struct context *) (deprecated_get_frame_context (fi)))
+#define UNWIND_CONTEXT(fi) ((struct context *) (fi->context))
 
 
 static struct cie_unit *cie_chunks;
@@ -1770,21 +1770,21 @@
   unwind_tmp_obstack_init ();
 
   fs = frame_state_alloc ();
-  deprecated_set_frame_context (fi, frame_obstack_zalloc (sizeof (struct context)));
+  fi->context = frame_obstack_alloc (sizeof (struct context));
   UNWIND_CONTEXT (fi)->reg =
-    frame_obstack_zalloc (sizeof (struct context_reg) * NUM_REGS);
+    frame_obstack_alloc (sizeof (struct context_reg) * NUM_REGS);
   memset (UNWIND_CONTEXT (fi)->reg, 0,
 	  sizeof (struct context_reg) * NUM_REGS);
 
-  if (get_next_frame (fi))
+  if (fi->next)
     {
-      context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (get_next_frame (fi)));
+      context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (fi->next));
       frame_state_for (UNWIND_CONTEXT (fi), fs);
       update_context (UNWIND_CONTEXT (fi), fs, 1);
     }
   else
     {
-      UNWIND_CONTEXT (fi)->ra = get_frame_pc (fi) + 1;
+      UNWIND_CONTEXT (fi)->ra = fi->pc + 1;
       frame_state_for (UNWIND_CONTEXT (fi), fs);
       update_context (UNWIND_CONTEXT (fi), fs, 0);
     }
@@ -1823,7 +1823,7 @@
   if (addrp)			/* default assumption: not found in memory */
     *addrp = 0;
 
-  if (!get_next_frame (frame))
+  if (!frame->next)
     {
       deprecated_read_register_gen (regnum, raw_buffer);
       if (lval != NULL)
@@ -1833,7 +1833,7 @@
     }
   else
     {
-      frame = get_next_frame (frame);
+      frame = frame->next;
       switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
 	{
 	case REG_CTX_UNSAVED:
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index f0c9be8..f797fc5 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -108,6 +108,10 @@
 #define LCC_PRODUCER "NCR C/C++"
 #endif
 
+/* OBSOLETE #ifndef CHILL_PRODUCER */
+/* OBSOLETE #define CHILL_PRODUCER "GNU Chill " */
+/* OBSOLETE #endif */
+
 /* Flags to target_to_host() that tell whether or not the data object is
    expected to be signed.  Used, for example, when fetching a signed
    integer in the target environment which is used as a signed integer
@@ -539,6 +543,9 @@
     case LANG_C_PLUS_PLUS:
       cu_language = language_cplus;
       break;
+      /* OBSOLETE case LANG_CHILL: */
+      /* OBSOLETE   cu_language = language_chill; */
+      /* OBSOLETE   break; */
     case LANG_MODULA2:
       cu_language = language_m2;
       break;
@@ -1753,6 +1760,7 @@
     {
       processing_gcc_compilation =
 	STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER));
+      /* OBSOLETE || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER)); */
     }
 
   /* Select a demangling style if we can identify the producer and if
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 9ddf3d4..ba8fc49 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -346,10 +346,10 @@
 		    /* Looks like a compiler-generated label.  Skip
 		       it.  The assembler should be skipping these (to
 		       keep executables small), but apparently with
-		       gcc on the (deleted) delta m88k SVR4, it loses.
-		       So to have us check too should be harmless (but
-		       I encourage people to fix this in the assembler
-		       instead of adding checks here).  */
+		       gcc on the (OBSOLETE) delta m88k SVR4, it
+		       loses.  So to have us check too should be
+		       harmless (but I encourage people to fix this in
+		       the assembler instead of adding checks here).  */
 		    continue;
 		  else
 		    {
diff --git a/gdb/eval.c b/gdb/eval.c
index 18b29bd..6563175 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -186,7 +186,7 @@
     return NULL;
 }
 
-/* This function evaluates tuples (in (the deleted) Chill) or
+/* This function evaluates tuples (in (OBSOLETE) Chill) or
    brace-initializers (in C/C++) for structure types.  */
 
 static struct value *
@@ -326,11 +326,10 @@
 }
 
 /* Recursive helper function for setting elements of array tuples for
-   (the deleted) Chill.  The target is ARRAY (which has bounds
-   LOW_BOUND to HIGH_BOUND); the element value is ELEMENT; EXP, POS
-   and NOSIDE are as usual.  Evaluates index expresions and sets the
-   specified element(s) of ARRAY to ELEMENT.  Returns last index
-   value.  */
+   (OBSOLETE) Chill.  The target is ARRAY (which has bounds LOW_BOUND
+   to HIGH_BOUND); the element value is ELEMENT; EXP, POS and NOSIDE
+   are as usual.  Evaluates index expresions and sets the specified
+   element(s) of ARRAY to ELEMENT.  Returns last index value.  */
 
 static LONGEST
 init_array_element (struct value *array, struct value *element,
diff --git a/gdb/exec.c b/gdb/exec.c
index b495a00..16b7e5f 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -545,7 +545,6 @@
 print_section_info (struct target_ops *t, bfd *abfd)
 {
   struct section_table *p;
-  /* FIXME: "016l" is not wide enough when TARGET_ADDR_BIT > 64.  */
   char *fmt = TARGET_ADDR_BIT <= 32 ? "08l" : "016l";
 
   printf_filtered ("\t`%s', ", bfd_get_filename (abfd));
@@ -561,12 +560,6 @@
     {
       printf_filtered ("\t%s", local_hex_string_custom (p->addr, fmt));
       printf_filtered (" - %s", local_hex_string_custom (p->endaddr, fmt));
-
-      /* FIXME: A format of "08l" is not wide enough for file offsets
-	 larger than 4GB.  OTOH, making it "016l" isn't desirable either
-	 since most output will then be much wider than necessary.  It
-	 may make sense to test the size of the file and choose the
-	 format string accordingly.  */
       if (info_verbose)
 	printf_filtered (" @ %s",
 			 local_hex_string_custom (p->the_bfd_section->filepos, "08l"));
diff --git a/gdb/expprint.c b/gdb/expprint.c
index a59a86a..ed9d50d 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -220,7 +220,7 @@
 	  }
 	fprintf_unfiltered (stream, "]");
 	/* "selector" was malloc'd by target_read_string. Free it.  */
-	xfree (selector);
+	free (selector);
 	return;
       }
 
@@ -267,6 +267,8 @@
 	}
       else
 	{
+	  /* OBSOLETE int is_chill = exp->language_defn->la_language == language_chill; */
+	  /* OBSOLETE fputs_filtered (is_chill ? " [" : " {", stream); */
 	  fputs_filtered (" {", stream);
 	  for (tem = 0; tem < nargs; tem++)
 	    {
@@ -276,6 +278,7 @@
 		}
 	      print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
 	    }
+	  /* OBSOLETE fputs_filtered (is_chill ? "]" : "}", stream); */
 	  fputs_filtered ("}", stream);
 	}
       return;
@@ -283,15 +286,29 @@
     case OP_LABELED:
       tem = longest_to_int (exp->elts[pc + 1].longconst);
       (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
-      /* Gcc support both these syntaxes.  Unsure which is preferred.  */
-#if 1
-      fputs_filtered (&exp->elts[pc + 2].string, stream);
-      fputs_filtered (": ", stream);
-#else
-      fputs_filtered (".", stream);
-      fputs_filtered (&exp->elts[pc + 2].string, stream);
-      fputs_filtered ("=", stream);
+
+#if 0
+      if (0 /* OBSOLETE exp->language_defn->la_language == language_chill */)
+	{ /* OBSOLETE */
+	  fputs_filtered (".", stream); /* OBSOLETE */
+	  fputs_filtered (&exp->elts[pc + 2].string, stream); /* OBSOLETE */
+	  fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", " /* OBSOLETE */
+			  : ": ", /* OBSOLETE */
+			  stream); /* OBSOLETE */
+	} /* OBSOLETE */
+      else /* OBSOLETE */
 #endif
+	{
+	  /* Gcc support both these syntaxes.  Unsure which is preferred.  */
+#if 1
+	  fputs_filtered (&exp->elts[pc + 2].string, stream);
+	  fputs_filtered (": ", stream);
+#else
+	  fputs_filtered (".", stream);
+	  fputs_filtered (&exp->elts[pc + 2].string, stream);
+	  fputs_filtered ("=", stream);
+#endif
+	}
       print_subexp (exp, pos, stream, PREC_SUFFIX);
       return;
 
diff --git a/gdb/expression.h b/gdb/expression.h
index 7268979..66cc119 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -109,11 +109,11 @@
        the second operand with itself that many times. */
     BINOP_CONCAT,
 
-    /* For (the deleted) Chill and Pascal. */
+    /* For (OBSOLETE) Chill (OBSOLETE) and Pascal. */
     BINOP_IN,			/* Returns 1 iff ARG1 IN ARG2. */
 
-    /* This is the "colon operator" used various places in (the
-       deleted) Chill. */
+    /* This is the "colon operator" used various places in (OBSOLETE)
+       Chill (OBSOLETE). */
     BINOP_RANGE,
 
     /* This must be the highest BINOP_ value, for expprint.c.  */
@@ -122,13 +122,13 @@
     /* Operates on three values computed by following subexpressions.  */
     TERNOP_COND,		/* ?: */
 
-    /* A sub-string/sub-array.  (the deleted) Chill syntax:
+    /* A sub-string/sub-array.  (OBSOLETE) Chill (OBSOLETE) syntax:
        OP1(OP2:OP3).  Return elements OP2 through OP3 of OP1.  */
     TERNOP_SLICE,
 
-    /* A sub-string/sub-array.  (The deleted) Chill syntax: OP1(OP2 UP
-       OP3).  Return OP3 elements of OP1, starting with element
-       OP2. */
+    /* A sub-string/sub-array.  (OBSOLETE) Chill (OBSOLETE) syntax:
+       OP1(OP2 UP OP3).  Return OP3 elements of OP1, starting with
+       element OP2. */
     TERNOP_SLICE_COUNT,
 
     /* Multidimensional subscript operator, such as Modula-2 x[a,b,...].
@@ -259,7 +259,7 @@
     UNOP_ODD,
     UNOP_TRUNC,
 
-    /* (The deleted) Chill builtin functions.  */
+    /* (OBSOLETE) Chill (OBSOLETE) builtin functions. */
     UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH, UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN,
 
     OP_BOOL,			/* Modula-2 builtin BOOLEAN type */
@@ -296,14 +296,14 @@
     OP_SCOPE,
 
     /* Used to represent named structure field values in brace
-       initializers (or tuples as they are called in (the deleted)
-       Chill).
+       initializers (or tuples as they are called in (OBSOLETE) Chill
+       (OBSOLETE)).
 
-       The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (the
-       deleted) Chill syntax is .NAME:VALUE.  Multiple labels (as in
-       the (the deleted) Chill syntax .NAME1,.NAME2:VALUE) is
+       The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (OBSOLETE)
+       Chill (OBSOLETE) syntax is .NAME:VALUE.  Multiple labels (as in
+       the (OBSOLETE) Chill (OBSOLETE) syntax .NAME1,.NAME2:VALUE) is
        represented as if it were .NAME1:(.NAME2:VALUE) (though that is
-       not valid (the deleted) Chill syntax).
+       not valid (OBSOLETE) Chill (OBSOLETE) syntax).
 
        The NAME is represented as for STRUCTOP_STRUCT;  VALUE follows. */
     OP_LABELED,
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index bd34b93..2eba391 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -355,7 +355,7 @@
          through as TYPE_CODE_INT since dbxstclass.h is so
          C-oriented, we must change these to "character" from "char".  */
 
-      if (strcmp (TYPE_NAME (type), "char") == 0)
+      if (STREQ (TYPE_NAME (type), "char"))
 	fprintf_filtered (stream, "character");
       else
 	goto default_case;
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 980bb57..9a34b85 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -115,7 +115,7 @@
    function returns 1 and sets *PVAL.  Otherwise it returns 0.  */
 
 int
-extract_long_unsigned_integer (const void *addr, int orig_len, LONGEST *pval)
+extract_long_unsigned_integer (void *addr, int orig_len, LONGEST *pval)
 {
   char *p, *first_addr;
   int len;
@@ -173,7 +173,7 @@
    else based on POINTER_TO_ADDRESS.  */
 
 CORE_ADDR
-extract_address (const void *addr, int len)
+extract_address (void *addr, int len)
 {
   /* Assume a CORE_ADDR can fit in a LONGEST (for now).  Not sure
      whether we want this to be true eventually.  */
@@ -184,7 +184,7 @@
 /* Treat the bytes at BUF as a pointer of type TYPE, and return the
    address it represents.  */
 CORE_ADDR
-extract_typed_address (const void *buf, struct type *type)
+extract_typed_address (void *buf, struct type *type)
 {
   if (TYPE_CODE (type) != TYPE_CODE_PTR
       && TYPE_CODE (type) != TYPE_CODE_REF)
@@ -347,13 +347,13 @@
 /* Given a pointer of type TYPE in target form in BUF, return the
    address it represents.  */
 CORE_ADDR
-unsigned_pointer_to_address (struct type *type, const void *buf)
+unsigned_pointer_to_address (struct type *type, void *buf)
 {
   return extract_address (buf, TYPE_LENGTH (type));
 }
 
 CORE_ADDR
-signed_pointer_to_address (struct type *type, const void *buf)
+signed_pointer_to_address (struct type *type, void *buf)
 {
   return extract_signed_integer (buf, TYPE_LENGTH (type));
 }
diff --git a/gdb/frame.c b/gdb/frame.c
index acc163e..ecdf408 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1,7 +1,7 @@
 /* Cache and manage frames for GDB, the GNU debugger.
 
    Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
-   2001, 2002, 2003 Free Software Foundation, Inc.
+   2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -456,18 +456,17 @@
 static struct obstack frame_cache_obstack;
 
 void *
-frame_obstack_zalloc (unsigned long size)
+frame_obstack_alloc (unsigned long size)
 {
-  void *data = obstack_alloc (&frame_cache_obstack, size);
-  memset (data, 0, size);
-  return data;
+  return obstack_alloc (&frame_cache_obstack, size);
 }
 
 CORE_ADDR *
 frame_saved_regs_zalloc (struct frame_info *fi)
 {
   fi->saved_regs = (CORE_ADDR *)
-    frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+    frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
+  memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
   return fi->saved_regs;
 }
 
@@ -606,13 +605,14 @@
 		{
 		  int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
 				      * sizeof (void *));
-		  regs = frame_obstack_zalloc (sizeof_cache);
+		  regs = frame_obstack_alloc (sizeof_cache);
+		  memset (regs, 0, sizeof_cache);
 		  (*cache) = regs;
 		}
 	      if (regs[regnum] == NULL)
 		{
 		  regs[regnum]
-		    = frame_obstack_zalloc (REGISTER_RAW_SIZE (regnum));
+		    = frame_obstack_alloc (REGISTER_RAW_SIZE (regnum));
 		  read_memory (frame->saved_regs[regnum], regs[regnum],
 			       REGISTER_RAW_SIZE (regnum));
 		}
@@ -693,7 +693,15 @@
          main.  */
       id.base = FRAME_CHAIN (next_frame);
 
-      if (!frame_chain_valid (id.base, next_frame))
+      /* FIXME: cagney/2002-06-08: There should be two tests here.
+         The first would check for a valid frame chain based on a user
+         selectable policy.  The default being ``stop at main'' (as
+         implemented by generic_func_frame_chain_valid()).  Other
+         policies would be available - stop at NULL, ....  The second
+         test, if provided by the target architecture, would check for
+         more exotic cases - most target architectures wouldn't bother
+         with this second case.  */
+      if (!FRAME_CHAIN_VALID (id.base, next_frame))
 	return null_frame_id;
     }
   if (id.base == 0)
@@ -847,7 +855,12 @@
   struct frame_info *fi;
   enum frame_type type;
 
-  fi = frame_obstack_zalloc (sizeof (struct frame_info));
+  fi = (struct frame_info *)
+    obstack_alloc (&frame_cache_obstack,
+		   sizeof (struct frame_info));
+
+  /* Zero all fields by default.  */
+  memset (fi, 0, sizeof (struct frame_info));
 
   fi->frame = addr;
   fi->pc = pc;
@@ -1006,14 +1019,25 @@
          main.  */
       address = FRAME_CHAIN (next_frame);
 
-      if (!frame_chain_valid (address, next_frame))
+      /* FIXME: cagney/2002-06-08: There should be two tests here.
+         The first would check for a valid frame chain based on a user
+         selectable policy.  The default being ``stop at main'' (as
+         implemented by generic_func_frame_chain_valid()).  Other
+         policies would be available - stop at NULL, ....  The second
+         test, if provided by the target architecture, would check for
+         more exotic cases - most target architectures wouldn't bother
+         with this second case.  */
+      if (!FRAME_CHAIN_VALID (address, next_frame))
 	return 0;
     }
   if (address == 0)
     return 0;
 
   /* Create an initially zero previous frame.  */
-  prev = frame_obstack_zalloc (sizeof (struct frame_info));
+  prev = (struct frame_info *)
+    obstack_alloc (&frame_cache_obstack,
+		   sizeof (struct frame_info));
+  memset (prev, 0, sizeof (struct frame_info));
 
   /* Link it in.  */
   next_frame->prev = prev;
@@ -1242,7 +1266,7 @@
   if (frame->saved_regs == NULL)
     {
       frame->saved_regs = (CORE_ADDR *)
-	frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+	frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
     }
   if (saved_regs_addr == NULL)
     {
@@ -1267,7 +1291,8 @@
 struct frame_extra_info *
 frame_extra_info_zalloc (struct frame_info *fi, long size)
 {
-  fi->extra_info = frame_obstack_zalloc (size);
+  fi->extra_info = frame_obstack_alloc (size);
+  memset (fi->extra_info, 0, size);
   return fi->extra_info;
 }
 
@@ -1286,74 +1311,6 @@
 }
 
 void
-deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
-				      CORE_ADDR *saved_regs)
-{
-  frame->saved_regs = saved_regs;
-}
-
-void
-deprecated_set_frame_extra_info_hack (struct frame_info *frame,
-				      struct frame_extra_info *extra_info)
-{
-  frame->extra_info = extra_info;
-}
-
-void
-deprecated_set_frame_next_hack (struct frame_info *fi,
-				struct frame_info *next)
-{
-  fi->next = next;
-}
-
-void
-deprecated_set_frame_prev_hack (struct frame_info *fi,
-				struct frame_info *prev)
-{
-  fi->prev = prev;
-}
-
-struct context *
-deprecated_get_frame_context (struct frame_info *fi)
-{
-  return fi->context;
-}
-
-void
-deprecated_set_frame_context (struct frame_info *fi,
-			      struct context *context)
-{
-  fi->context = context;
-}
-
-struct frame_info *
-deprecated_frame_xmalloc (void)
-{
-  struct frame_info *frame = XMALLOC (struct frame_info);
-  memset (frame, 0, sizeof (struct frame_info));
-  return frame;
-}
-
-struct frame_info *
-deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
-				       long sizeof_extra_info)
-{
-  struct frame_info *frame = deprecated_frame_xmalloc ();
-  make_cleanup (xfree, frame);
-  if (sizeof_saved_regs > 0)
-    {
-      frame->saved_regs = xcalloc (1, sizeof_saved_regs);
-      make_cleanup (xfree, frame->saved_regs);
-    }
-  if (sizeof_extra_info > 0)
-    {
-      frame->extra_info = xcalloc (1, sizeof_extra_info);
-      make_cleanup (xfree, frame->extra_info);
-    }
-  return frame;
-}
-
-void
 _initialize_frame (void)
 {
   obstack_init (&frame_cache_obstack);
diff --git a/gdb/frame.h b/gdb/frame.h
index fbe6275..c9c5647 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -1,7 +1,7 @@
 /* Definitions for dealing with stack frames, for GDB, the GNU debugger.
 
    Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996,
-   1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -310,7 +310,7 @@
 
    UNWIND_CACHE is provided as mechanism for implementing a per-frame
    local cache.  It's initial value being NULL.  Memory for that cache
-   should be allocated using frame_obstack_zalloc().
+   should be allocated using frame_obstack_alloc().
 
    Register window architectures (eg SPARC) should note that REGNUM
    identifies the register for the previous frame.  For instance, a
@@ -413,7 +413,7 @@
 
     /* Anything extra for this structure that may have been defined
        in the machine dependent files. */
-    /* Allocated by frame_extra_info_zalloc () which is called /
+    /* Allocated by frame_obstack_alloc () which is called /
        initialized by INIT_EXTRA_FRAME_INFO */
     struct frame_extra_info *extra_info;
 
@@ -472,20 +472,25 @@
 #define SIZEOF_FRAME_SAVED_REGS \
         (sizeof (CORE_ADDR) * (NUM_REGS+NUM_PSEUDO_REGS))
 
-/* Allocate zero initialized memory from the frame cache obstack.
-   Appendices to the frame info (such as the unwind cache) should
-   allocate memory using this method.  */
+extern void *frame_obstack_alloc (unsigned long size);
 
-extern void *frame_obstack_zalloc (unsigned long size);
+/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for most
+   targets.  If FRAME_CHAIN_VALID returns zero it means that the given frame
+   is the outermost one and has no caller.
 
-/* If FRAME_CHAIN_VALID returns zero it means that the given frame
-   is the outermost one and has no caller.  */
+   XXXX - both default and alternate frame_chain_valid functions are
+   deprecated.  New code should use dummy frames and one of the
+   generic functions. */
 
-extern int frame_chain_valid (CORE_ADDR, struct frame_info *);
-
+extern int file_frame_chain_valid (CORE_ADDR, struct frame_info *);
+extern int func_frame_chain_valid (CORE_ADDR, struct frame_info *);
+extern int nonnull_frame_chain_valid (CORE_ADDR, struct frame_info *);
+extern int generic_file_frame_chain_valid (CORE_ADDR, struct frame_info *);
+extern int generic_func_frame_chain_valid (CORE_ADDR, struct frame_info *);
 extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
 
 
+
 #ifdef FRAME_FIND_SAVED_REGS
 /* XXX - deprecated */
 #define FRAME_INIT_SAVED_REGS(FI) deprecated_get_frame_saved_regs (FI, NULL)
@@ -669,52 +674,4 @@
 extern void deprecated_update_frame_base_hack (struct frame_info *frame,
 					       CORE_ADDR base);
 
-/* FIXME: cagney/2003-01-04: Explicitly set the frame's saved_regs
-   and/or extra_info.  Target code is allocating a fake frame and than
-   initializing that to get around the problem of, when creating the
-   inner most frame, there is no where to cache information such as
-   the prologue analysis.  This is fixed by the new unwind mechanism -
-   even the inner most frame has somewhere to store things like the
-   prolog analysis (or at least will once the frame overhaul is
-   finished).  */
-extern void deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
-						  CORE_ADDR *saved_regs);
-extern void deprecated_set_frame_extra_info_hack (struct frame_info *frame,
-						  struct frame_extra_info *extra_info);
-
-/* FIXME: cagney/2003-01-04: Allocate a frame from the heap (rather
-   than the frame obstack).  Targets do this as a way of saving the
-   prologue analysis from the inner most frame before that frame has
-   been created.  By always creating a frame, this problem goes away.  */
-extern struct frame_info *deprecated_frame_xmalloc (void);
-
-/* FIXME: cagney/2003-01-05: Allocate a frame, along with the
-   saved_regs and extra_info.  Set up cleanups for all three.  Same as
-   for deprecated_frame_xmalloc, targets are calling this when
-   creating a scratch `struct frame_info'.  The frame overhaul makes
-   this unnecessary since all frame queries are parameterized with a
-   common cache parameter and a frame.  */
-extern struct frame_info *deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
-								 long sizeof_extra_info);
-
-/* FIXME: cagney/2003-01-07: These are just nasty.  Code shouldn't be
-   doing this.  I suspect it dates back to the days when every field
-   of an allocated structure was explicitly initialized.  */
-extern void deprecated_set_frame_next_hack (struct frame_info *fi,
-					    struct frame_info *next);
-extern void deprecated_set_frame_prev_hack (struct frame_info *fi,
-					    struct frame_info *prev);
-
-/* FIXME: cagney/2003-01-07: Instead of the dwarf2cfi having its own
-   dedicated `struct frame_info . context' field, the code should use
-   the per frame `unwind_cache' that is passed to the
-   frame_pc_unwind(), frame_register_unwind() and frame_id_unwind()
-   methods.
-
-   See "dummy-frame.c" for an example of how a cfi-frame object can be
-   implemented using this.  */
-extern struct context *deprecated_get_frame_context (struct frame_info *fi);
-extern void deprecated_set_frame_context (struct frame_info *fi,
-					  struct context *context);
-
 #endif /* !defined (FRAME_H)  */
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index b89e54e..0c14e53 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -793,7 +793,8 @@
 static void
 frv_init_extra_frame_info (int fromleaf, struct frame_info *frame)
 {
-  frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
+  frame->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
   frame->extra_info->fp_to_callers_sp_offset = 0;
   frame->extra_info->lr_saved_on_stack = 0;
 }
@@ -1082,6 +1083,7 @@
   set_gdbarch_saved_pc_after_call (gdbarch, frv_saved_pc_after_call);
 
   set_gdbarch_frame_chain (gdbarch, frv_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, frv_frame_saved_pc);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, frv_frame_init_saved_regs);
@@ -1095,6 +1097,8 @@
 
   /* Settings for calling functions in the inferior.  */
   set_gdbarch_call_dummy_length (gdbarch, 0);
+  set_gdbarch_coerce_float_to_double (gdbarch, 
+				      standard_coerce_float_to_double);
   set_gdbarch_push_arguments (gdbarch, frv_push_arguments);
   set_gdbarch_push_return_address (gdbarch, frv_push_return_address);
   set_gdbarch_pop_frame (gdbarch, frv_pop_frame);
diff --git a/gdb/gcore.c b/gdb/gcore.c
index a2f10d7..155ebe0 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -179,7 +179,7 @@
     return 0;	/* Can't succeed without current frame. */
 
   /* Save frame pointer of TOS frame. */
-  *top = get_frame_base (fi);
+  *top = fi->frame;
   /* If current stack pointer is more "inner", use that instead. */
   if (INNER_THAN (read_sp (), *top))
     *top = read_sp ();
@@ -189,7 +189,7 @@
     fi = tmp_fi;
 
   /* Save frame pointer of prev-most frame. */
-  *bottom = get_frame_base (fi);
+  *bottom = fi->frame;
 
   /* Now canonicalize their order, so that 'bottom' is a lower address
    (as opposed to a lower stack frame). */
diff --git a/gdb/gdb_dirent.h b/gdb/gdb_dirent.h
index eb14767..9cb4006 100644
--- a/gdb/gdb_dirent.h
+++ b/gdb/gdb_dirent.h
@@ -1,5 +1,5 @@
-/* Portable <dirent.h>.
-   Copyright 2000, 2002 Free Software Foundation, Inc.
+/* Portable <dirent.h>
+   Copyright 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,16 +18,14 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef GDB_DIRENT_H
-#define GDB_DIRENT_H 1
+#if !defined(GDB_DIRENT_H)
+#define GDB_DIRENT_H
 
-/* See description of `AC_HEADER_DIRENT' in the Autoconf manual.  */
+/* From bfd/hpux-core.c. */
+
 #ifdef HAVE_DIRENT_H
 # include <dirent.h>
-# define NAMELEN(dirent) strlen((dirent)->d_name)
 #else
-# define dirent direct
-# define NAMELEN(dirent) (dirent)->d_namelen
 # ifdef HAVE_SYS_NDIR_H
 #  include <sys/ndir.h>
 # endif
@@ -39,4 +37,4 @@
 # endif
 #endif
 
-#endif /* not GDB_DIRENT_H */
+#endif /* !defined(GDB_DIRENT_H) */
diff --git a/gdb/gdb_mbuild.sh b/gdb/gdb_mbuild.sh
index a108de0..ae40b02 100755
--- a/gdb/gdb_mbuild.sh
+++ b/gdb/gdb_mbuild.sh
@@ -1,10 +1,7 @@
 #!/bin/sh
 
-#  Multi-build script for testing compilation of all maintained
-#  configs of GDB.
-
-#  Copyright 2002 Free Software Foundation, Inc.
-
+#  Multi-build script for testing compilation of all maintained configs of GDB.
+#  Copyright (C) 2002  Free Software Foundation, Inc.
 #  Contributed by Richard Earnshaw  (rearnsha@arm.com)
 
 #  This program is free software; you can redistribute it and/or modify
@@ -21,312 +18,136 @@
 #  along with this program; if not, write to the Free Software
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-usage()
-{
-    cat <<EOF
-Usage: gdb_mbuild.sh [ <options> ... ] <srcdir> <builddir>
- Options:
-   -j <makejobs>  Run <makejobs> in parallel.  Passed to make.
-	          On a single cpu machine, 2 is recommended.
-   -k             Keep going.  Do not stop after the first build fails.
-   --keep         Keep builds.  Do not remove each build when finished.
-   -e <regexp>    Regular expression for selecting the targets to build.
-   -f             Force rebuild.  Even rebuild previously built directories.
-   -v             Be more (and more, and more) verbose.
- Arguments:
-   <srcdir>       Source code directory.
-   <builddir>     Build directory.
- Environment variables examined (with default if not defined):
-   MAKE (make)"
-EOF
+usage() {
+    echo "Usage: gdb_mbuild.sh <srcdir> <builddir> [<parjobs>]"
+    echo " Environment variables examined (with default if not defined):"
+    echo "  AWK (awk) -- must be GNU awk"
+    echo "  MAKE (make)"
+    echo
+    echo " Note: Everything in <builddir>/gdb-allcross will be blown away."
     exit 1;
-cat <<NOTYET
-  -b <maxbuilds> Run <maxbuild> builds in parallel.
-		 On a single cpu machine, 1 is recommended.
-NOTYET
 }
 
-### COMMAND LINE OPTIONS
-
-makejobs=
-maxbuilds=1
-keepgoing=
-force=false
-targexp=""
-verbose=0
-keep=false
-while test $# -gt 0
-do
-    case "$1" in
-    -j )
-	# Number of parallel make jobs.
-	shift
-	test $# -ge 1 || usage
-	makejobs="-j $1"
-	;;
-    -b | -c )
-	# Number of builds to fire off in parallel.
-	shift
-	test $# -ge 1 || usage
-	maxbuilds=$1
-	;;
-    -k )
-	# Should we soldier on after the first build fails?
-	keepgoing=-k
-	;;
-    --keep )
-        keep=true
-	;;
-    -e )
-	# A regular expression for selecting targets
-	shift
-	test $# -ge 1 || usage
-	targexp="${targexp} -e ${1}"
-	;;
-    -f )
-	# Force a rebuild
-	force=true ; shift ;;
-    -v )
-	# Be more, and more, and more, verbose
-	verbose=`expr ${verbose} + 1`
-	;;
-    -* ) usage ;;
-    *) break ;;
-    esac
-    shift
-done
-
-
-### COMMAND LINE PARAMETERS
-
-if test $# -ne 2
-then
+if [ $# -ne 2 -a $# -ne 3 ] ; then
     usage
 fi
 
-# Convert these to absolute directory paths.
+### COMMAND LINE PARAMETERS
 
 # Where the sources live
-srcdir=`cd $1 && /bin/pwd` || exit 1
+srcdir=$1
 
 # Where the builds occur
-builddir=`cd $2 && /bin/pwd` || exit 1
+buildbase=$2
+
+# Number of parallel make jobs (you probably want about 2 jobs per cpu for
+# maximum throughput)
+if [ $# -eq 3 ]; then
+    par=$3
+else
+    par="1"
+fi
 
 ### ENVIRONMENT PARAMETERS
+# Must be GNU awk
+awk=${AWK:-awk}
 
 # Version of make to use
 make=${MAKE:-make}
-MAKE=${make}
-export MAKE
 
 
+# Where builds will live
+builddir=${buildbase}/gdb-allcross
+
+# Where logs will go.  NB. Must not be a sub-dir of builddir or you will loose
+# them.
+logdir=${buildbase}/gdb-logdir
+
 # Where to look for the list of targets to test
 maintainers=${srcdir}/gdb/MAINTAINERS
-if [ ! -r ${maintainers} ]
-then
-    echo Maintainers file ${maintainers} not found
-    exit 1
-fi
 
 # Get the list of targets and the build options
-alltarg=`cat ${maintainers} | tr -s '[\t]' '[ ]' | sed -n '
-/^[ ]*[-a-z0-9\.]*[ ]*[(]*--target=.*/ !d
-s/^.*--target=//
-s/).*$//
-h
-:loop
-  g
-  /^[^ ]*,/ !b end
-  s/,[^ ]*//
-  p
-  g
-  s/^[^,]*,//
-  h
-b loop
-:end
-p
-' | if test "${targexp}" = ""
+alltarg=`${awk} < "${maintainers}" '
+  $2 ~ /--target=.*/ {
+    targets = gensub (/^.*--target=/, "", 1, $2)
+    warnings = gensub (/[)]*$/, "", 1, $3)
+    split (targets, targ, /,/)
+    for (i in targ) {
+        print targ[i], warnings
+    }
+  }'`
+
+# Back up the log files
+cd ${logdir}
+
+if [ -f build.out ]
 then
-    grep -v -e broken -e OBSOLETE
-else
-    grep ${targexp}
-fi`
+	mv build.out build.old
+fi
+if [ -f config.out ]
+then
+	mv config.out config.old
+fi
+if [ -f fail.sum ]
+then
+	mv fail.sum fail.old
+fi
 
+if [ ! -d ${builddir} ]
+then
+	echo ${builddir} does not exist
+	exit 1
+fi
 
-# Usage: fail <message> <test-that-should-succeed>.  Should the build
-# fail?  If the test is true, and we don't want to keep going, print
-# the message and shoot everything in sight and abort the build.
+cd ${builddir}
+rm -rf *
 
-fail ()
-{
-    msg="$1" ; shift
-    if test "$@"
-    then
-	echo "${target}: ${msg}"
-	if test "${keepgoing}" != ""
-	then
-	    #exit 1
-	    continue
-	else
-	    kill $$
-	    exit 1
-	fi
-    fi
-}
+MAKE=${make}
+export MAKE
 
-
-# Usage: log <level> <logfile>.  Write standard input to <logfile> and
-# stdout (if verbose >= level).
-
-log ()
-{
-    if test ${verbose} -ge $1
-    then
-	tee $2
-    else
-	cat > $2
-    fi
-}
-
-
-
-# Warn the user of what is comming, print the list of targets
-
-echo "$alltarg"
-echo ""
-
-
-# For each target, configure, build and test it.
-
-echo "$alltarg" | while read target gdbopts simopts
+jobs=1
+# For each target, configure and build it.
+while read targ opts
 do
-
-    trap "exit 1"  1 2 15
-    dir=${builddir}/${target}
-
-    # Should a scratch rebuild be forced, for perhaphs the entire
-    # build be skipped?
-
-    if ${force}
-    then
-	echo forcing ${target} ...
-	rm -rf ${dir}
-    elif test -f ${dir}
-    then
-	echo "${target}"
-	continue
-    else
-	echo ${target} ...
-    fi
-
-    # Did the previous configure attempt fail?  If it did
-    # restart from scratch.
-
-    if test -d ${dir} -a ! -r ${dir}/Makefile
-    then
-	echo ... removing partially configured ${target}
-	rm -rf ${dir}
-	if test -d ${dir}
+	if [ ${opts} != "broken" ]
 	then
-	    echo "${target}: unable to remove directory ${dir}"
-	    exit 1
+		trap 'echo cleaning up ...; rm -rf ${builddir}/*; exit 1' 1 2 15
+		echo ${targ}
+		mkdir ${targ}
+		cd ${targ}
+		${srcdir}/configure --target=$targ \
+		  --enable-gdb-build-warnings=$opts \
+		  >> ${logdir}/config.tout.$targ 2>&1 &
+		cd ..
+		jobs=`expr ${jobs} + 1`
+		if [ ${jobs} -gt ${par} ]
+		then
+			wait
+			jobs=1
+		fi
 	fi
-    fi
-
-    # From now on, we're in this target's build directory
-
-    mkdir -p ${dir}
-    cd ${dir} || exit 1
-
-    # Configure, if not already.  Should this go back to being
-    # separate and done in parallel?
-
-    if test ! -r Makefile
-    then
-	# Default SIMOPTS to GDBOPTS.
-	test -z "${simopts}" && simopts="${gdbopts}"
-	# The config options
-	__target="--target=${target}"
-	__enable_gdb_build_warnings=`test -z "${gdbopts}" \
-	    || echo "--enable-gdb-build-warnings=${gdbopts}"`
-	__enable_sim_build_warnings=`test -z "${simopts}" \
-	    || echo "--enable-sim-build-warnings=${simopts}"`
-	__configure="${srcdir}/configure \
-	    ${__target} \
-	    ${__enable_gdb_build_warnings} \
-	    ${__enable_sim_build_warnings}"
-	echo ... ${__configure}
-	trap "echo Removing partially configured ${dir} directory ...; rm -rf ${dir}; exit 1" 1 2 15
-	${__configure} 2>&1 | log 2 Config.log
-	trap "exit 1"  1 2 15
-    fi
-    fail "configure failed" ! -r Makefile
- 
-    # Build, if not built.
-
-    if test ! -x gdb/gdb -a ! -x gdb/gdb.exe
-    then
-	# Iff the build fails remove the final build target so that
-	# the follow-on code knows things failed.  Stops the follow-on
-	# code thinking that a failed rebuild succedded (executable
-	# left around from previous build).
-	echo ... ${make} ${keepgoing} ${makejobs} ${target}
-	( ${make} ${keepgoing} ${makejobs} all-gdb || rm -f gdb/gdb gdb/gdb.exe
-	) 2>&1 | log 1 Build.log
-    fi
-    fail "compile failed" ! -x gdb/gdb -a ! -x gdb/gdb.exe
- 
-    # Check that the built GDB can at least print it's architecture.
-
-    echo ... run ${target}
-    rm -f core gdb.core ${dir}/gdb/x
-    cat <<EOF > x
-maint print architecture
-quit
+done << EOF
+$alltarg
 EOF
-    ./gdb/gdb -batch -nx -x x 2>&1 | log 1 Gdb.log
-    fail "gdb dumped core" -r core -o -r gdb.core
-    fail "gdb printed no output" ! -s Gdb.log
-    grep -e internal-error Gdb.log && fail "gdb panic" 1
 
-    echo ... cleanup ${target}
+wait
 
-    # Create a sed script that cleans up the output from GDB.
-    rm -f mbuild.sed
-    touch mbuild.sed || exit 1
-    # Rules to replace <0xNNNN> with the corresponding function's
-    # name.
-    sed -n -e '/<0x0*>/d' -e 's/^.*<0x\([0-9a-f]*\)>.*$/0x\1/p' Gdb.log \
-    | sort -u \
-    | while read addr
-    do
-	func="`addr2line -f -e ./gdb/gdb -s ${addr} | sed -n -e 1p`"
-	test ${verbose} -gt 0 && echo "${addr} ${func}" 1>&2
-	echo "s/<${addr}>/<${func}>/g"
-    done >> mbuild.sed
-    # Rules to strip the leading paths off of file names.
-    echo 's/"\/.*\/gdb\//"gdb\//g' >> mbuild.sed
-    # Run the script
-    sed -f mbuild.sed Gdb.log > Mbuild.log
+cat ${logdir}/config.tout.* > ${logdir}/config.out
+rm -f ${logdir}/config.tout.*
 
-    # Replace the build directory with a file as semaphore that stops
-    # a rebuild. (should the logs be saved?)
-
-    cd ${builddir}
-
-    if ${keep}
-    then
-	:
-    else
-	rm -f ${target}.tmp
-	mv ${target}/Mbuild.log ${target}.tmp
-	rm -rf ${target}
-	mv ${target}.tmp ${target}
-    fi
-
-    # Success!
-    echo ... ${target} built
-
+for targ in *
+do
+	cd $targ
+	if  ${make} -j ${par} all-gdb >> ${logdir}/build.out 2>&1
+	then
+		true
+	else
+		echo ">>>>>>>>>>>>>" >> ${logdir}/fail.sum
+		echo "$targ (${opts})" >> ${logdir}/fail.sum 
+		tail -20 ${logdir}/build.out >> ${logdir}/fail.sum
+		echo >> ${logdir}/fail.sum
+		echo $targ build failed
+	fi
+	rm -rf *
+	cd ..
 done
-
-exit 0
diff --git a/gdb/gdb_regex.h b/gdb/gdb_regex.h
index 7e270f4..27a570a 100644
--- a/gdb/gdb_regex.h
+++ b/gdb/gdb_regex.h
@@ -1,5 +1,5 @@
-/* Portable <regex.h>.
-   Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+/* Portable <regex.h>
+   Copyright 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,14 +19,12 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifndef GDB_REGEX_H
-#define GDB_REGEX_H 1
+#define GDB_REGEX_H
 
 #ifdef USE_INCLUDED_REGEX
-# include "xregex.h"
+#include "xregex.h"
 #else
-/* Request 4.2 BSD regex functions.  */
-# define _REGEX_RE_COMP
-# include <regex.h>
+#include <regex.h>
 #endif
 
-#endif /* not GDB_REGEX_H */
+#endif /* gdb_regex.h */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9519bb3..938d9fa 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -1,7 +1,7 @@
 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
 
 /* Dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -65,7 +65,6 @@
 #include "gdb_string.h"
 #include "gdb-events.h"
 #include "reggroups.h"
-#include "osabi.h"
 
 /* Static function declarations */
 
@@ -94,7 +93,6 @@
   /* basic architectural information */
   const struct bfd_arch_info * bfd_arch_info;
   int byte_order;
-  enum gdb_osabi osabi;
 
   /* target specific vector. */
   struct gdbarch_tdep *tdep;
@@ -201,6 +199,7 @@
   gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
   int believe_pcc_promotion;
   int believe_pcc_promotion_type;
+  gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
   gdbarch_get_saved_register_ftype *get_saved_register;
   gdbarch_register_convertible_ftype *register_convertible;
   gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
@@ -291,7 +290,6 @@
   /* basic architecture information */
   &bfd_default_arch_struct,
   BFD_ENDIAN_BIG,
-  GDB_OSABI_UNKNOWN,
   /* target specific vector and its dump routine */
   NULL, NULL,
   /*per-architecture data-pointers and swap regions */
@@ -429,6 +427,7 @@
   0,
   0,
   0,
+  0,
   generic_in_function_epilogue_p,
   construct_inferior_arguments,
   0,
@@ -481,7 +480,6 @@
 
   current_gdbarch->bfd_arch_info = info->bfd_arch_info;
   current_gdbarch->byte_order = info->byte_order;
-  current_gdbarch->osabi = info->osabi;
 
   /* Force the explicit initialization of these. */
   current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
@@ -535,6 +533,7 @@
   current_gdbarch->call_dummy_words = legacy_call_dummy_words;
   current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
   current_gdbarch->call_dummy_stack_adjust_p = -1;
+  current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
   current_gdbarch->register_convertible = generic_register_convertible_not;
   current_gdbarch->convert_register_p = legacy_convert_register_p;
   current_gdbarch->register_to_value = legacy_register_to_value;
@@ -556,6 +555,7 @@
   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
   current_gdbarch->frame_args_skip = -1;
   current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
+  current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
   current_gdbarch->frame_args_address = get_frame_base;
   current_gdbarch->frame_locals_address = get_frame_base;
   current_gdbarch->extra_stack_alignment_needed = 1;
@@ -712,6 +712,7 @@
     fprintf_unfiltered (log, "\n\tfix_call_dummy");
   /* Skip verify of deprecated_init_frame_pc_first, has predicate */
   /* Skip verify of deprecated_init_frame_pc, has predicate */
+  /* Skip verify of coerce_float_to_double, invalid_p == 0 */
   /* Skip verify of get_saved_register, has predicate */
   /* Skip verify of register_convertible, invalid_p == 0 */
   /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
@@ -768,7 +769,7 @@
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->frame_chain == 0))
     fprintf_unfiltered (log, "\n\tframe_chain");
-  /* Skip verify of frame_chain_valid, has predicate */
+  /* Skip verify of frame_chain_valid, invalid_p == 0 */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->frame_saved_pc == 0))
     fprintf_unfiltered (log, "\n\tframe_saved_pc");
@@ -1074,6 +1075,17 @@
                         (long) current_gdbarch->cannot_store_register
                         /*CANNOT_STORE_REGISTER ()*/);
 #endif
+#ifdef COERCE_FLOAT_TO_DOUBLE
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
+                      XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = <0x%08lx>\n",
+                        (long) current_gdbarch->coerce_float_to_double
+                        /*COERCE_FLOAT_TO_DOUBLE ()*/);
+#endif
 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
 #if GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
@@ -1444,15 +1456,6 @@
                         (long) current_gdbarch->frame_chain
                         /*FRAME_CHAIN ()*/);
 #endif
-#ifdef FRAME_CHAIN_VALID_P
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "FRAME_CHAIN_VALID_P()",
-                      XSTRING (FRAME_CHAIN_VALID_P ()));
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: FRAME_CHAIN_VALID_P() = %d\n",
-                      FRAME_CHAIN_VALID_P ());
-#endif
 #ifdef FRAME_CHAIN_VALID
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -2392,14 +2395,6 @@
                       "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
                       TARGET_LONG_LONG_BIT);
 #endif
-#ifdef TARGET_OSABI
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_OSABI # %s\n",
-                      XSTRING (TARGET_OSABI));
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_OSABI = %ld\n",
-                      (long) TARGET_OSABI);
-#endif
 #ifdef TARGET_PRINT_INSN
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -2558,15 +2553,6 @@
   return gdbarch->byte_order;
 }
 
-enum gdb_osabi
-gdbarch_osabi (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
-  return gdbarch->osabi;
-}
-
 int
 gdbarch_short_bit (struct gdbarch *gdbarch)
 {
@@ -3885,6 +3871,25 @@
 }
 
 int
+gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->coerce_float_to_double == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_coerce_float_to_double invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
+  return gdbarch->coerce_float_to_double (formal, actual);
+}
+
+void
+set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
+                                    gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
+{
+  gdbarch->coerce_float_to_double = coerce_float_to_double;
+}
+
+int
 gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
@@ -4025,7 +4030,7 @@
 }
 
 CORE_ADDR
-gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
+gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
 {
   gdb_assert (gdbarch != NULL);
   if (gdbarch->pointer_to_address == 0)
@@ -4649,13 +4654,6 @@
 }
 
 int
-gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->frame_chain_valid != 0;
-}
-
-int
 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
 {
   gdb_assert (gdbarch != NULL);
@@ -5781,8 +5779,6 @@
 	continue;
       if (info->byte_order != arches->gdbarch->byte_order)
 	continue;
-      if (info->osabi != arches->gdbarch->osabi)
-	continue;
       return arches;
     }
   return NULL;
@@ -5828,12 +5824,6 @@
   if (info.byte_order == BFD_ENDIAN_UNKNOWN)
     info.byte_order = TARGET_BYTE_ORDER;
 
-  /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi.  */
-  if (info.osabi == GDB_OSABI_UNINITIALIZED)
-    info.osabi = gdbarch_lookup_osabi (info.abfd);
-  if (info.osabi == GDB_OSABI_UNINITIALIZED)
-    info.osabi = current_gdbarch->osabi;
-
   /* Must have found some sort of architecture. */
   gdb_assert (info.bfd_arch_info != NULL);
 
@@ -5851,9 +5841,6 @@
 			   : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
 			   : "default"));
       fprintf_unfiltered (gdb_stdlog,
-			  "gdbarch_update: info.osabi %d (%s)\n",
-			  info.osabi, gdbarch_osabi_name (info.osabi));
-      fprintf_unfiltered (gdb_stdlog,
 			  "gdbarch_update: info.abfd 0x%lx\n",
 			  (long) info.abfd);
       fprintf_unfiltered (gdb_stdlog,
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index bc5d9ca..0b2381f9 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1,7 +1,7 @@
 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
 
 /* Dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,6 +38,7 @@
 #include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
 #if !GDB_MULTI_ARCH
 /* Pull in function declarations refered to, indirectly, via macros.  */
+#include "value.h" /* For default_coerce_float_to_double which is referenced by a macro.  */
 #include "inferior.h"		/* For unsigned_address_to_pointer().  */
 #endif
 
@@ -95,17 +96,6 @@
 #endif
 #endif
 
-extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
-/* set_gdbarch_osabi() - not applicable - pre-initialized. */
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
-#error "Non multi-arch definition of TARGET_OSABI"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_OSABI)
-#define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
-#endif
-#endif
-
 
 /* The following are initialized by the target dependent code. */
 
@@ -1284,6 +1274,23 @@
 #endif
 #endif
 
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (COERCE_FLOAT_TO_DOUBLE)
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (default_coerce_float_to_double (formal, actual))
+#endif
+
+typedef int (gdbarch_coerce_float_to_double_ftype) (struct type *formal, struct type *actual);
+extern int gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual);
+extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch_coerce_float_to_double_ftype *coerce_float_to_double);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COERCE_FLOAT_TO_DOUBLE)
+#error "Non multi-arch definition of COERCE_FLOAT_TO_DOUBLE"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COERCE_FLOAT_TO_DOUBLE)
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (gdbarch_coerce_float_to_double (current_gdbarch, formal, actual))
+#endif
+#endif
+
 #if defined (GET_SAVED_REGISTER)
 /* Legacy for systems yet to multi-arch GET_SAVED_REGISTER */
 #if !defined (GET_SAVED_REGISTER_P)
@@ -1428,8 +1435,8 @@
 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
 #endif
 
-typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, const void *buf);
-extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf);
+typedef CORE_ADDR (gdbarch_pointer_to_address_ftype) (struct type *type, void *buf);
+extern CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf);
 extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_pointer_to_address_ftype *pointer_to_address);
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
 #error "Non multi-arch definition of POINTER_TO_ADDRESS"
@@ -1987,29 +1994,17 @@
 #endif
 #endif
 
-#if defined (FRAME_CHAIN_VALID)
-/* Legacy for systems yet to multi-arch FRAME_CHAIN_VALID */
-#if !defined (FRAME_CHAIN_VALID_P)
-#define FRAME_CHAIN_VALID_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID_P)
-#define FRAME_CHAIN_VALID_P() (0)
-#endif
-
-extern int gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID_P)
-#error "Non multi-arch definition of FRAME_CHAIN_VALID"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID_P)
-#define FRAME_CHAIN_VALID_P() (gdbarch_frame_chain_valid_p (current_gdbarch))
-#endif
+/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for
+   most targets.  If FRAME_CHAIN_VALID returns zero it means that the
+   given frame is the outermost one and has no caller.
+  
+   XXXX - both default and alternate frame_chain_valid functions are
+   deprecated.  New code should use dummy frames and one of the generic
+   functions. */
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
-#define FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN_VALID"), 0)
+#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
 #endif
 
 typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
@@ -2864,9 +2859,6 @@
 
   /* Use default: NULL (ZERO). */
   struct gdbarch_tdep_info *tdep_info;
-
-  /* Use default: GDB_OSABI_UNINITIALIZED (-1).  */
-  enum gdb_osabi osabi;
 };
 
 typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 12131d8..e2da438 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1,7 +1,7 @@
 #!/bin/sh -u
 
 # Architecture commands for GDB, the GNU debugger.
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -387,8 +387,6 @@
 i:2:TARGET_ARCHITECTURE:const struct bfd_arch_info *:bfd_arch_info::::&bfd_default_arch_struct::::%s:TARGET_ARCHITECTURE->printable_name:TARGET_ARCHITECTURE != NULL
 #
 i:2:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG
-#
-i:2:TARGET_OSABI:enum gdb_osabi:osabi::::GDB_OSABI_UNKNOWN
 # Number of bits in a char or unsigned char for the target machine.
 # Just like CHAR_BIT in <limits.h> but describes the target machine.
 # v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0:
@@ -520,6 +518,7 @@
 #
 v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
 v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
+f:2:COERCE_FLOAT_TO_DOUBLE:int:coerce_float_to_double:struct type *formal, struct type *actual:formal, actual:::default_coerce_float_to_double::0
 F:2:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
 #
 f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
@@ -530,7 +529,7 @@
 f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
 f:1:VALUE_TO_REGISTER:void:value_to_register:struct type *type, int regnum, char *from, char *to:type, regnum, from, to::0:legacy_value_to_register::0
 #
-f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0
+f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, void *buf:type, buf:::unsigned_pointer_to_address::0
 f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
 F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
 #
@@ -569,7 +568,14 @@
 v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
 f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
 f:2:FRAME_CHAIN:CORE_ADDR:frame_chain:struct frame_info *frame:frame::0:0
-F:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe::0:0
+# Define a default FRAME_CHAIN_VALID, in the form that is suitable for
+# most targets.  If FRAME_CHAIN_VALID returns zero it means that the
+# given frame is the outermost one and has no caller.
+#
+# XXXX - both default and alternate frame_chain_valid functions are
+# deprecated.  New code should use dummy frames and one of the generic
+# functions.
+f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
 f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
 f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0
 f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0
@@ -726,7 +732,7 @@
 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
 
 /* Dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -773,6 +779,7 @@
 #include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */
 #if !GDB_MULTI_ARCH
 /* Pull in function declarations refered to, indirectly, via macros.  */
+#include "value.h" /* For default_coerce_float_to_double which is referenced by a macro.  */
 #include "inferior.h"		/* For unsigned_address_to_pointer().  */
 #endif
 
@@ -1038,9 +1045,6 @@
 
   /* Use default: NULL (ZERO). */
   struct gdbarch_tdep_info *tdep_info;
-
-  /* Use default: GDB_OSABI_UNINITIALIZED (-1).  */
-  enum gdb_osabi osabi;
 };
 
 typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches);
@@ -1261,7 +1265,6 @@
 #include "gdb_string.h"
 #include "gdb-events.h"
 #include "reggroups.h"
-#include "osabi.h"
 
 /* Static function declarations */
 
@@ -2132,8 +2135,6 @@
 	continue;
       if (info->byte_order != arches->gdbarch->byte_order)
 	continue;
-      if (info->osabi != arches->gdbarch->osabi)
-	continue;
       return arches;
     }
   return NULL;
@@ -2179,12 +2180,6 @@
   if (info.byte_order == BFD_ENDIAN_UNKNOWN)
     info.byte_order = TARGET_BYTE_ORDER;
 
-  /* \`\`(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi.  */
-  if (info.osabi == GDB_OSABI_UNINITIALIZED)
-    info.osabi = gdbarch_lookup_osabi (info.abfd);
-  if (info.osabi == GDB_OSABI_UNINITIALIZED)
-    info.osabi = current_gdbarch->osabi;
-
   /* Must have found some sort of architecture. */
   gdb_assert (info.bfd_arch_info != NULL);
 
@@ -2202,9 +2197,6 @@
 			   : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
 			   : "default"));
       fprintf_unfiltered (gdb_stdlog,
-			  "gdbarch_update: info.osabi %d (%s)\n",
-			  info.osabi, gdbarch_osabi_name (info.osabi));
-      fprintf_unfiltered (gdb_stdlog,
 			  "gdbarch_update: info.abfd 0x%lx\n",
 			  (long) info.abfd);
       fprintf_unfiltered (gdb_stdlog,
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 9a02977..9a25c44 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,11 +1,3 @@
-2003-01-04  Andreas Schwab  <schwab@suse.de>
-
-	* linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
-
-2003-01-02  Andrew Cagney  <ac131313@redhat.com>
-
-	* Makefile.in: Remove obsolete code.
-
 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
 
 	* linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 763c21e..46168d6 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -228,6 +228,11 @@
 # will remove them.
 MAKEOVERRIDES=
 
+## This is ugly, but I don't want GNU make to put these variables in
+## the environment.  Older makes will see this as a set of targets
+## with no dependencies and no actions.
+# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+
 gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
 regdat_sh = $(srcdir)/../regformats/regdat.sh
 regdef_h = $(srcdir)/../regformats/regdef.h
diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c
index b49a8c9..760de6e 100644
--- a/gdb/gdbserver/linux-m68k-low.c
+++ b/gdb/gdbserver/linux-m68k-low.c
@@ -1,5 +1,5 @@
 /* GNU/Linux/m68k specific low level interface, for the remote server for GDB.
-   Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -26,7 +26,7 @@
 #include <sys/reg.h>
 #endif
 
-#define m68k_num_regs 29
+#define m68k_num_regs 31
 
 /* This table must line up with REGISTER_NAMES in tm-m68k.h */
 static int m68k_regmap[] =
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 2a8817d..6d3e3a7 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -2003,6 +2003,24 @@
 	 || (TYPE_CODE (t) == TYPE_CODE_BOOL)));
 }
 
+/* (OBSOLETE) Chill (OBSOLETE) varying string and arrays are
+   represented as follows:
+
+   struct { int __var_length; ELEMENT_TYPE[MAX_SIZE] __var_data};
+
+   Return true if TYPE is such a (OBSOLETE) Chill (OBSOLETE) varying
+   type. */
+
+/* OBSOLETE int */
+/* OBSOLETE chill_varying_type (struct type *type) */
+/* OBSOLETE { */
+/* OBSOLETE   if (TYPE_CODE (type) != TYPE_CODE_STRUCT */
+/* OBSOLETE       || TYPE_NFIELDS (type) != 2 */
+/* OBSOLETE       || strcmp (TYPE_FIELD_NAME (type, 0), "__var_length") != 0) */
+/* OBSOLETE     return 0; */
+/* OBSOLETE   return 1; */
+/* OBSOLETE } */
+
 /* Check whether BASE is an ancestor or base class or DCLASS 
    Return 1 if so, and 0 if not.
    Note: callers may want to check for identity of the types before
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 4c754d6..69f8cdb 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -101,14 +101,14 @@
     TYPE_CODE_RANGE,		/* Range (integers within spec'd bounds) */
 
     /* A string type which is like an array of character but prints
-       differently (at least for (the deleted) CHILL).  It does not
-       contain a length field as Pascal strings (for many Pascals,
-       anyway) do; if we want to deal with such strings, we should use
-       a new type code.  */
+       differently (at least for (OBSOLETE) CHILL (OBSOLETE)).  It
+       does not contain a length field as Pascal strings (for many
+       Pascals, anyway) do; if we want to deal with such strings, we
+       should use a new type code.  */
     TYPE_CODE_STRING,
 
     /* String of bits; like TYPE_CODE_SET but prints differently (at
-       least for (the deleted) CHILL).  */
+       least for (OBSOLETE) CHILL (OBSOLETE)).  */
     TYPE_CODE_BITSTRING,
 
     /* Unknown type.  The length field is valid if we were able to
@@ -1020,6 +1020,14 @@
 extern struct type *builtin_type_m2_real;
 extern struct type *builtin_type_m2_bool;
 
+/* OBSOLETE Chill types */
+
+/* OBSOLETE extern struct type *builtin_type_chill_bool; */
+/* OBSOLETE extern struct type *builtin_type_chill_char; */
+/* OBSOLETE extern struct type *builtin_type_chill_long; */
+/* OBSOLETE extern struct type *builtin_type_chill_ulong; */
+/* OBSOLETE extern struct type *builtin_type_chill_real; */
+
 /* Fortran (F77) types */
 
 extern struct type *builtin_type_f_character;
@@ -1127,6 +1135,8 @@
 
 extern struct type *create_set_type (struct type *, struct type *);
 
+/* OBSOLETE extern int chill_varying_type (struct type *); */
+
 extern struct type *lookup_unsigned_typename (char *);
 
 extern struct type *lookup_signed_typename (char *);
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index 8ac7811..fb31c44 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -329,8 +329,8 @@
 
   if (TYPE_NAME (basetype) != NULL
       && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
-      && strcmp (TYPE_NAME (basetype),
-		 TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))) == 0)
+      && STREQ (TYPE_NAME (basetype),
+		TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
     return 1;
   return 0;
 }
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 8119a2d..0fc9d86 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1,7 +1,7 @@
 /* Target-machine dependent code for Hitachi H8/300, for GDB.
 
    Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -440,11 +440,11 @@
     }
 
   /* The args are always reffed based from the stack pointer */
-  get_frame_extra_info (fi)->args_pointer = after_prolog_fp;
+  fi->extra_info->args_pointer = after_prolog_fp;
   /* Locals are always reffed based from the fp */
-  get_frame_extra_info (fi)->locals_pointer = after_prolog_fp;
+  fi->extra_info->locals_pointer = after_prolog_fp;
   /* The PC is at a known place */
-  get_frame_extra_info (fi)->from_pc =
+  fi->extra_info->from_pc =
     read_memory_unsigned_integer (after_prolog_fp + BINWORD, BINWORD);
 
   /* Rememeber any others too */
@@ -464,19 +464,18 @@
 {
   CORE_ADDR func_addr, func_end;
 
-  if (!get_frame_saved_regs (fi))
+  if (!fi->saved_regs)
     {
       frame_saved_regs_zalloc (fi);
 
       /* Find the beginning of this function, so we can analyze its
 	 prologue. */
-      if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
+      if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end))
         {
 	  struct symtab_and_line sal = find_pc_line (func_addr, 0);
-	  CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi)) ? sal.end : get_frame_pc (fi);
+	  CORE_ADDR limit = (sal.end && sal.end < fi->pc) ? sal.end : fi->pc;
 	  /* This will fill in fields in fi. */
-	  h8300_examine_prologue (func_addr, limit, get_frame_base (fi),
-				  get_frame_saved_regs (fi), fi);
+	  h8300_examine_prologue (func_addr, limit, fi->frame, fi->saved_regs, fi);
 	}
       /* Else we're out of luck (can't debug completely stripped code). 
 	 FIXME. */
@@ -494,17 +493,14 @@
 static CORE_ADDR
 h8300_frame_chain (struct frame_info *thisframe)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe),
-				   get_frame_base (thisframe),
-				   get_frame_base (thisframe)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
     {				/* initialize the from_pc now */
-      get_frame_extra_info (thisframe)->from_pc =
-	deprecated_read_register_dummy (get_frame_pc (thisframe),
-					get_frame_base (thisframe),
+      thisframe->extra_info->from_pc =
+	deprecated_read_register_dummy (thisframe->pc, thisframe->frame,
 					E_PC_REGNUM);
-      return get_frame_base (thisframe);
+      return thisframe->frame;
     }
-  return get_frame_saved_regs (thisframe)[E_SP_REGNUM];
+  return thisframe->saved_regs[E_SP_REGNUM];
 }
 
 /* Return the saved PC from this frame.
@@ -515,30 +511,28 @@
 static CORE_ADDR
 h8300_frame_saved_pc (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
-    return deprecated_read_register_dummy (get_frame_pc (frame),
-					   get_frame_base (frame),
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return deprecated_read_register_dummy (frame->pc, frame->frame,
 					   E_PC_REGNUM);
   else
-    return get_frame_extra_info (frame)->from_pc;
+    return frame->extra_info->from_pc;
 }
 
 static void
 h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  if (!get_frame_extra_info (fi))
+  if (!fi->extra_info)
     {
-      frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
-      get_frame_extra_info (fi)->from_pc = 0;
-      get_frame_extra_info (fi)->args_pointer = 0;		/* Unknown */
-      get_frame_extra_info (fi)->locals_pointer = 0;	/* Unknown */
+      fi->extra_info = (struct frame_extra_info *)
+        frame_obstack_alloc (sizeof (struct frame_extra_info));
+      fi->extra_info->from_pc = 0;
+      fi->extra_info->args_pointer = 0;		/* Unknown */
+      fi->extra_info->locals_pointer = 0;	/* Unknown */
       
-      if (!get_frame_pc (fi))
+      if (!fi->pc)
         {
-	  if (get_next_frame (fi))
-	    deprecated_update_frame_pc_hack (fi, h8300_frame_saved_pc (get_next_frame (fi)));
+	  if (fi->next)
+	    fi->pc = h8300_frame_saved_pc (fi->next);
 	}
       h8300_frame_init_saved_regs (fi);
     }
@@ -547,10 +541,9 @@
 static CORE_ADDR
 h8300_frame_locals_address (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     return (CORE_ADDR) 0;	/* Not sure what else to do... */
-  return get_frame_extra_info (fi)->locals_pointer;
+  return fi->extra_info->locals_pointer;
 }
 
 /* Return the address of the argument block for the frame
@@ -559,10 +552,9 @@
 static CORE_ADDR
 h8300_frame_args_address (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     return (CORE_ADDR) 0;	/* Not sure what else to do... */
-  return get_frame_extra_info (fi)->args_pointer;
+  return fi->extra_info->args_pointer;
 }
 
 /* Round N up or down to the nearest multiple of UNIT.
@@ -755,9 +747,7 @@
   unsigned regno;
   struct frame_info *frame = get_current_frame ();
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     {
       generic_pop_dummy_frame ();
     }
@@ -767,16 +757,16 @@
 	{
 	  /* Don't forget E_SP_REGNUM is a frame_saved_regs struct is the
 	     actual value we want, not the address of the value we want.  */
-	  if (get_frame_saved_regs (frame)[regno] && regno != E_SP_REGNUM)
+	  if (frame->saved_regs[regno] && regno != E_SP_REGNUM)
 	    write_register (regno,
-			    read_memory_integer (get_frame_saved_regs (frame)[regno],
+			    read_memory_integer (frame->saved_regs[regno],
 			    			 BINWORD));
-	  else if (get_frame_saved_regs (frame)[regno] && regno == E_SP_REGNUM)
-	    write_register (regno, get_frame_base (frame) + 2 * BINWORD);
+	  else if (frame->saved_regs[regno] && regno == E_SP_REGNUM)
+	    write_register (regno, frame->frame + 2 * BINWORD);
 	}
 
       /* Don't forget to update the PC too!  */
-      write_register (E_PC_REGNUM, get_frame_extra_info (frame)->from_pc);
+      write_register (E_PC_REGNUM, frame->extra_info->from_pc);
     }
   flush_cached_frames ();
 }
@@ -1124,6 +1114,7 @@
   set_gdbarch_saved_pc_after_call (gdbarch, h8300_saved_pc_after_call);
   set_gdbarch_frame_saved_pc (gdbarch, h8300_frame_saved_pc);
   set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_frame_args_address (gdbarch, h8300_frame_args_address);
   set_gdbarch_frame_locals_address (gdbarch, h8300_frame_locals_address);
 
@@ -1144,6 +1135,9 @@
   set_gdbarch_frameless_function_invocation (gdbarch,
 					     frameless_look_for_prologue);
 
+  /* W/o prototype, coerce float args to double. */
+  /* set_gdbarch_coerce_float_to_double (gdbarch, standard_coerce_float_to_double); */
+
   /*
    * Call Dummies
    * 
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 66b7b61..37e6ccb 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -19,80 +19,12 @@
 
 #include "defs.h"
 #include "arch-utils.h"
-#include "gdbcore.h"
 #include "osabi.h"
 
 /* Forward declarations.  */
 extern void _initialize_hppa_hpux_tdep (void);
 extern initialize_file_ftype _initialize_hppa_hpux_tdep;
 
-/* FIXME: brobecker 2002-12-25.  The following functions will eventually
-   become static, after the multiarching conversion is done.  */
-int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
-void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
-                                           CORE_ADDR *tmp);
-void hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
-                                           CORE_ADDR *tmp);
-void hppa_hpux_frame_find_saved_regs_in_sigtramp
-      (struct frame_info *fi, struct frame_saved_regs *fsr);
-
-int
-hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name)
-{
-  /* Actually, for a PA running HPUX the kernel calls the signal handler
-     without an intermediate trampoline.  Luckily the kernel always sets
-     the return pointer for the signal handler to point to _sigreturn.  */
-  return (name && (strcmp ("_sigreturn", name) == 0));
-}
-
-/* For hppa_hpux_frame_saved_pc_in_sigtramp, 
-   hppa_hpux_frame_base_before_sigtramp and
-   hppa_hpux_frame_find_saved_regs_in_sigtramp:
-
-   The signal context structure pointer is always saved at the base
-   of the frame which "calls" the signal handler.  We only want to find
-   the hardware save state structure, which lives 10 32bit words into
-   sigcontext structure.
-
-   Within the hardware save state structure, registers are found in the
-   same order as the register numbers in GDB.
-
-   At one time we peeked at %r31 rather than the PC queues to determine
-   what instruction took the fault.  This was done on purpose, but I don't
-   remember why.  Looking at the PC queues is really the right way, and
-   I don't remember why that didn't work when this code was originally
-   written.  */
-
-void
-hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi, CORE_ADDR *tmp)
-{
-  *tmp = read_memory_integer (fi->frame + (43 * 4), 4);
-}
-
-void
-hppa_hpux_frame_base_before_sigtramp (struct frame_info *fi,
-                                      CORE_ADDR *tmp)
-{
-  *tmp = read_memory_integer (fi->frame + (40 * 4), 4);
-}
-
-void
-hppa_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
-                                             struct frame_saved_regs *fsr)
-{
-  int i;
-  const CORE_ADDR tmp = (fi)->frame + (10 * 4);
-
-  for (i = 0; i < NUM_REGS; i++)
-    {
-      if (i == SP_REGNUM)
-	(fsr)->regs[SP_REGNUM] = read_memory_integer (tmp + SP_REGNUM * 4, 4);
-      else
-	(fsr)->regs[i] = tmp + i * 4;
-    }
-}
-
-
 static void
 hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 6364dbc..e928f3f 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1,7 +1,7 @@
 /* Target-dependent code for the HP PA architecture, for GDB.
 
    Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -63,9 +63,6 @@
 #include "symfile.h"
 #include "objfiles.h"
 
-/* Some local constants.  */
-static const int hppa_num_regs = 128;
-
 /* To support detection of the pseudo-initial frame
    that threads have. */
 #define THREAD_INITIAL_FRAME_SYMBOL  "__pthread_exit"
@@ -138,43 +135,18 @@
 /* FIXME: brobecker 2002-11-07: We will likely be able to make the
    following functions static, once we hppa is partially multiarched.  */
 int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
-CORE_ADDR hppa_skip_prologue (CORE_ADDR pc);
-CORE_ADDR hppa_skip_trampoline_code (CORE_ADDR pc);
-int hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name);
-int hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name);
-CORE_ADDR hppa_saved_pc_after_call (struct frame_info *frame);
 int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
 CORE_ADDR hppa_stack_align (CORE_ADDR sp);
 int hppa_pc_requires_run_before_use (CORE_ADDR pc);
 int hppa_instruction_nullified (void);
-int hppa_register_raw_size (int reg_nr);
 int hppa_register_byte (int reg_nr);
 struct type * hppa_register_virtual_type (int reg_nr);
 void hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-void hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf);
-int hppa_use_struct_convention (int gcc_p, struct type *type);
-void hppa_store_return_value (struct type *type, char *valbuf);
-CORE_ADDR hppa_extract_struct_value_address (char *regbuf);
 int hppa_cannot_store_register (int regnum);
-void hppa_init_extra_frame_info (int fromleaf, struct frame_info *frame);
-CORE_ADDR hppa_frame_chain (struct frame_info *frame);
-int hppa_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe);
-int hppa_frameless_function_invocation (struct frame_info *frame);
-CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
 CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
 CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
-int hppa_frame_num_args (struct frame_info *frame);
-void hppa_push_dummy_frame (struct inferior_status *inf_status);
-void hppa_pop_frame (void);
-CORE_ADDR hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
-                               int nargs, struct value **args,
-                               struct type *type, int gcc_p);
-CORE_ADDR hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-		               int struct_return, CORE_ADDR struct_addr);
 CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
-CORE_ADDR hppa_target_read_pc (ptid_t ptid);
-void hppa_target_write_pc (CORE_ADDR v, ptid_t ptid);
-CORE_ADDR hppa_target_read_fp (void);
+int hppa_coerce_float_to_double (struct type *formal, struct type *actual);
 
 typedef struct
   {
@@ -844,7 +816,7 @@
 }
 
 int
-hppa_frameless_function_invocation (struct frame_info *frame)
+frameless_function_invocation (struct frame_info *frame)
 {
   struct unwind_table_entry *u;
 
@@ -862,7 +834,7 @@
    some instructions.  */
 
 CORE_ADDR
-hppa_saved_pc_after_call (struct frame_info *frame)
+saved_pc_after_call (struct frame_info *frame)
 {
   int ret_regnum;
   CORE_ADDR pc;
@@ -928,7 +900,7 @@
     }
 #endif
 
-  if (hppa_frameless_function_invocation (frame))
+  if (frameless_function_invocation (frame))
     {
       int ret_regnum;
 
@@ -1060,7 +1032,7 @@
    in a system call.  */
 
 void
-hppa_init_extra_frame_info (int fromleaf, struct frame_info *frame)
+init_extra_frame_info (int fromleaf, struct frame_info *frame)
 {
   int flags;
   int framesize;
@@ -1118,7 +1090,7 @@
    a frame pointer calls code without a frame pointer.  */
 
 CORE_ADDR
-hppa_frame_chain (struct frame_info *frame)
+frame_chain (struct frame_info *frame)
 {
   int my_framesize, caller_framesize;
   struct unwind_table_entry *u;
@@ -1381,6 +1353,9 @@
   struct unwind_table_entry *u, *next_u = NULL;
   struct frame_info *next;
 
+  if (!chain)
+    return 0;
+
   u = find_unwind_entry (thisframe->pc);
 
   if (u == NULL)
@@ -1432,7 +1407,7 @@
    to be aligned to a 64-byte boundary. */
 
 void
-hppa_push_dummy_frame (struct inferior_status *inf_status)
+push_dummy_frame (struct inferior_status *inf_status)
 {
   CORE_ADDR sp, pc, pcspace;
   register int regnum;
@@ -1448,7 +1423,7 @@
      We also need a number of horrid hacks to deal with lossage in the
      PC queue registers (apparently they're not valid when the in syscall
      bit is set).  */
-  pc = hppa_target_read_pc (inferior_ptid);
+  pc = target_read_pc (inferior_ptid);
   int_buffer = read_register (FLAGS_REGNUM);
   if (int_buffer & 0x2)
     {
@@ -2425,7 +2400,7 @@
   if (flags & 2)
     return pc;
 #ifndef GDB_TARGET_IS_PA_ELF
-  else if (som_solib_get_got_by_pc (hppa_target_read_pc (inferior_ptid)))
+  else if (som_solib_get_got_by_pc (target_read_pc (inferior_ptid)))
     return pc;
 #endif
   else
@@ -2433,12 +2408,14 @@
 #endif
 }
 
+
+
+
 /* If the pid is in a syscall, then the FP register is not readable.
    We'll return zero in that case, rather than attempting to read it
    and cause a warning. */
-
 CORE_ADDR
-hppa_read_fp (int pid)
+target_read_fp (int pid)
 {
   int flags = read_register (FLAGS_REGNUM);
 
@@ -2452,17 +2429,12 @@
   return read_register (FP_REGNUM);
 }
 
-CORE_ADDR
-hppa_target_read_fp (void)
-{
-  return hppa_read_fp (PIDGET (inferior_ptid));
-}
 
 /* Get the PC from %r31 if currently in a syscall.  Also mask out privilege
    bits.  */
 
 CORE_ADDR
-hppa_target_read_pc (ptid_t ptid)
+target_read_pc (ptid_t ptid)
 {
   int flags = read_register_pid (FLAGS_REGNUM, ptid);
 
@@ -2479,7 +2451,7 @@
    PC value into %r31.  */
 
 void
-hppa_target_write_pc (CORE_ADDR v, ptid_t ptid)
+target_write_pc (CORE_ADDR v, ptid_t ptid)
 {
   int flags = read_register_pid (FLAGS_REGNUM, ptid);
 
@@ -2917,7 +2889,7 @@
    just shared library trampolines (import, export).  */
 
 int
-hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+in_solib_call_trampoline (CORE_ADDR pc, char *name)
 {
   struct minimal_symbol *minsym;
   struct unwind_table_entry *u;
@@ -3077,7 +3049,7 @@
    just shared library trampolines (import, export).  */
 
 int
-hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name)
+in_solib_return_trampoline (CORE_ADDR pc, char *name)
 {
   struct unwind_table_entry *u;
 
@@ -3150,7 +3122,7 @@
    used in dynamic executables.  */
 
 CORE_ADDR
-hppa_skip_trampoline_code (CORE_ADDR pc)
+skip_trampoline_code (CORE_ADDR pc, char *name)
 {
   long orig_pc = pc;
   long prev_inst, curr_inst, loc;
@@ -4840,13 +4812,6 @@
   return ((ipsw & 0x00200000) && !(flags & 0x2));
 }
 
-int
-hppa_register_raw_size (int reg_nr)
-{
-  /* All registers have the same size.  */
-  return REGISTER_SIZE;
-}
-
 /* Index within the register vector of the first byte of the space i
    used for register REG_NR.  */
 
@@ -4877,21 +4842,6 @@
   write_register (28, addr);
 }
 
-CORE_ADDR
-hppa_extract_struct_value_address (char *regbuf)
-{
-  /* Extract from an array REGBUF containing the (raw) register state
-     the address in which a function should return its structure value,
-     as a CORE_ADDR (or an expression that can be used as one).  */
-  /* FIXME: brobecker 2002-12-26.
-     The current implementation is historical, but we should eventually
-     implement it in a more robust manner as it relies on the fact that
-     the address size is equal to the size of an int* _on the host_...
-     One possible implementation that crossed my mind is to use
-     extract_address.  */
-  return (*(int *)(regbuf + REGISTER_BYTE (28)));
-}
-
 /* Return True if REGNUM is not a register available to the user
    through ptrace().  */
 
@@ -4917,14 +4867,6 @@
   return fi->frame;
 }
 
-int
-hppa_frame_num_args (struct frame_info *frame)
-{
-  /* We can't tell how many args there are now that the C compiler delays
-     popping them.  */
-  return -1;
-}
-
 CORE_ADDR
 hppa_smash_text_address (CORE_ADDR addr)
 {
@@ -4938,17 +4880,36 @@
   return (addr &= ~0x3);
 }
 
+int
+hppa_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+   /* FIXME: For the pa, it appears that the debug info marks the
+      parameters as floats regardless of whether the function is
+      prototyped, but the actual values are passed as doubles for the
+      non-prototyped case and floats for the prototyped case.  Thus we
+      choose to make the non-prototyped case work for C and break the
+      prototyped case, since the non-prototyped case is probably much
+      more common.  */
+  return (current_language -> la_language == language_c);
+}
+
 static struct gdbarch *
 hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
   
   /* Try to determine the ABI of the object we are loading.  */
-  if (info.abfd != NULL && info.osabi == GDB_OSABI_UNKNOWN)
+
+  if (info.abfd != NULL)
     {
-      /* If it's a SOM file, assume it's HP/UX SOM.  */
-      if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour)
-	info.osabi = GDB_OSABI_HPUX_SOM;
+      osabi = gdbarch_lookup_osabi (info.abfd);
+      if (osabi == GDB_OSABI_UNKNOWN)
+	{
+	  /* If it's a SOM file, assume it's HP/UX SOM.  */
+	  if (bfd_get_flavour (info.abfd) == bfd_target_som_flavour)
+	    osabi = GDB_OSABI_HPUX_SOM;
+	}
     }
 
   /* find a candidate among the list of pre-declared architectures.  */
@@ -4960,63 +4921,7 @@
   gdbarch = gdbarch_alloc (&info, NULL);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
-
-  set_gdbarch_reg_struct_has_addr (gdbarch, hppa_reg_struct_has_addr);
-  set_gdbarch_function_start_offset (gdbarch, 0);
-  set_gdbarch_skip_prologue (gdbarch, hppa_skip_prologue);
-  set_gdbarch_skip_trampoline_code (gdbarch, hppa_skip_trampoline_code);
-  set_gdbarch_in_solib_call_trampoline (gdbarch, hppa_in_solib_call_trampoline);
-  set_gdbarch_in_solib_return_trampoline (gdbarch,
-                                          hppa_in_solib_return_trampoline);
-  set_gdbarch_saved_pc_after_call (gdbarch, hppa_saved_pc_after_call);
-  set_gdbarch_inner_than (gdbarch, hppa_inner_than);
-  set_gdbarch_stack_align (gdbarch, hppa_stack_align);
-  set_gdbarch_extra_stack_alignment_needed (gdbarch, 0);
-  set_gdbarch_decr_pc_after_break (gdbarch, 0);
-  set_gdbarch_register_size (gdbarch, 4);
-  set_gdbarch_num_regs (gdbarch, hppa_num_regs);
-  set_gdbarch_fp_regnum (gdbarch, 3);
-  set_gdbarch_sp_regnum (gdbarch, 30);
-  set_gdbarch_fp0_regnum (gdbarch, 64);
-  set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM);
-  set_gdbarch_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
-  set_gdbarch_register_raw_size (gdbarch, hppa_register_raw_size);
-  set_gdbarch_register_bytes (gdbarch, hppa_num_regs * 4);
-  set_gdbarch_register_byte (gdbarch, hppa_register_byte);
-  set_gdbarch_register_virtual_size (gdbarch, hppa_register_raw_size);
-  set_gdbarch_max_register_raw_size (gdbarch, 4);
-  set_gdbarch_max_register_virtual_size (gdbarch, 8);
-  set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
-  set_gdbarch_store_struct_return (gdbarch, hppa_store_struct_return);
-  set_gdbarch_deprecated_extract_return_value (gdbarch,
-                                               hppa_extract_return_value);
-  set_gdbarch_use_struct_convention (gdbarch, hppa_use_struct_convention);
-  set_gdbarch_deprecated_store_return_value (gdbarch, hppa_store_return_value);
-  set_gdbarch_deprecated_extract_struct_value_address
-    (gdbarch, hppa_extract_struct_value_address);
-  set_gdbarch_cannot_store_register (gdbarch, hppa_cannot_store_register);
-  set_gdbarch_init_extra_frame_info (gdbarch, hppa_init_extra_frame_info);
-  set_gdbarch_frame_chain (gdbarch, hppa_frame_chain);
-  set_gdbarch_frame_chain_valid (gdbarch, hppa_frame_chain_valid);
-  set_gdbarch_frameless_function_invocation
-    (gdbarch, hppa_frameless_function_invocation);
-  set_gdbarch_frame_saved_pc (gdbarch, hppa_frame_saved_pc);
-  set_gdbarch_frame_args_address (gdbarch, hppa_frame_args_address);
-  set_gdbarch_frame_locals_address (gdbarch, hppa_frame_locals_address);
-  set_gdbarch_frame_num_args (gdbarch, hppa_frame_num_args);
-  set_gdbarch_frame_args_skip (gdbarch, 0);
-  /* set_gdbarch_push_dummy_frame (gdbarch, hppa_push_dummy_frame);  */
-  set_gdbarch_pop_frame (gdbarch, hppa_pop_frame);
-  set_gdbarch_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28);
-  set_gdbarch_call_dummy_start_offset (gdbarch, 0);
-  /* set_gdbarch_fix_call_dummy (gdbarch, hppa_fix_call_dummy); */
-  set_gdbarch_push_arguments (gdbarch, hppa_push_arguments);
-  set_gdbarch_smash_text_address (gdbarch, hppa_smash_text_address);
-  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
-  set_gdbarch_read_pc (gdbarch, hppa_target_read_pc);
-  set_gdbarch_write_pc (gdbarch, hppa_target_write_pc);
-  set_gdbarch_read_fp (gdbarch, hppa_target_read_fp);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return gdbarch;
 }
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 0323f02..d64b4ca 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -1,5 +1,5 @@
 /* Read hp debug symbols and convert to internal format, for GDB.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -5242,11 +5242,6 @@
       SYMBOL_CLASS (sym) = LOC_BLOCK;
       SYMBOL_TYPE (sym) = hpread_read_function_type (hp_type, dn_bufp, objfile, 1);
 
-      /* All functions in C++ have prototypes.  For C we don't have enough
-         information in the debug info.  */
-      if (SYMBOL_LANGUAGE (s) == language_cplus)
-	TYPE_FLAGS (SYMBOL_TYPE (s)) |= TYPE_FLAG_PROTOTYPED;
-
       /* The "SYMBOL_NAME" field is expected to be the mangled name
        * (if any), which we get from the "alias" field of the SOM record
        * if that exists.
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 9bf5a16..1ef14fc 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux running on i386's, for GDB.
 
-   Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,8 +34,6 @@
 
 #include "solib-svr4.h"		/* For struct link_map_offsets.  */
 
-#include "osabi.h"
-
 #include "i386-tdep.h"
 #include "i386-linux-tdep.h"
 
@@ -247,16 +245,16 @@
 {
   CORE_ADDR pc;
 
-  pc = i386_linux_sigtramp_start (get_frame_pc (frame));
+  pc = i386_linux_sigtramp_start (frame->pc);
   if (pc)
     {
       CORE_ADDR sp;
 
-      if (get_next_frame (frame))
+      if (frame->next)
 	/* If this isn't the top frame, the next frame must be for the
 	   signal handler itself.  The sigcontext structure lives on
 	   the stack, right after the signum argument.  */
-	return get_frame_base (get_next_frame (frame)) + 12;
+	return frame->next->frame + 12;
 
       /* This is the top frame.  We'll have to find the address of the
 	 sigcontext structure by looking at the stack pointer.  Keep
@@ -264,21 +262,20 @@
 	 "pop %eax".  If the PC is at this instruction, adjust the
 	 returned value accordingly.  */
       sp = read_register (SP_REGNUM);
-      if (pc == get_frame_pc (frame))
+      if (pc == frame->pc)
 	return sp + 4;
       return sp;
     }
 
-  pc = i386_linux_rt_sigtramp_start (get_frame_pc (frame));
+  pc = i386_linux_rt_sigtramp_start (frame->pc);
   if (pc)
     {
-      if (get_next_frame (frame))
+      if (frame->next)
 	/* If this isn't the top frame, the next frame must be for the
 	   signal handler itself.  The sigcontext structure is part of
 	   the user context.  A pointer to the user context is passed
 	   as the third argument to the signal handler.  */
-	return read_memory_integer (get_frame_base (get_next_frame (frame))
-				    + 16, 4) + 20;
+	return read_memory_integer (frame->next->frame + 16, 4) + 20;
 
       /* This is the top frame.  Again, use the stack pointer to find
 	 the address of the sigcontext structure.  */
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index a52b188..792923c 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for Solaris x86.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,7 +20,6 @@
 
 #include "defs.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "i386-tdep.h"
 
@@ -48,6 +47,10 @@
   tdep->sigcontext_addr = i386bsd_sigcontext_addr;
   tdep->sc_pc_offset = 36 + 14 * 4;
   tdep->sc_sp_offset = 36 + 17 * 4;
+
+  /* Assume that the prototype flag can be trusted.  */
+  set_gdbarch_coerce_float_to_double (gdbarch,
+				      standard_coerce_float_to_double);
 }
 
 
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index d85073b..9d50879 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1,7 +1,7 @@
 /* Intel 386 target-dependent stuff.
 
    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,7 +39,6 @@
 #include "gdb_assert.h"
 #include "reggroups.h"
 #include "dummy-frame.h"
-#include "osabi.h"
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
@@ -499,10 +498,9 @@
 int
 i386_frameless_signal_p (struct frame_info *frame)
 {
-  return (get_next_frame (frame)
-	  && get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME
+  return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME
 	  && (frameless_look_for_prologue (frame)
-	      || get_frame_pc (frame) == get_pc_function_start (get_frame_pc (frame))));
+	      || frame->pc == get_pc_function_start (frame->pc)));
 }
 
 /* Return the chain-pointer for FRAME.  In the case of the i386, the
@@ -512,15 +510,15 @@
 static CORE_ADDR
 i386_frame_chain (struct frame_info *frame)
 {
-  if (pc_in_dummy_frame (get_frame_pc (frame)))
-    return get_frame_base (frame);
+  if (pc_in_dummy_frame (frame->pc))
+    return frame->frame;
 
   if (get_frame_type (frame) == SIGTRAMP_FRAME
       || i386_frameless_signal_p (frame))
-    return get_frame_base (frame);
+    return frame->frame;
 
-  if (! inside_entry_file (get_frame_pc (frame)))
-    return read_memory_unsigned_integer (get_frame_base (frame), 4);
+  if (! inside_entry_file (frame->pc))
+    return read_memory_unsigned_integer (frame->frame, 4);
 
   return 0;
 }
@@ -569,7 +567,7 @@
 static CORE_ADDR
 i386_frame_saved_pc (struct frame_info *frame)
 {
-  if (pc_in_dummy_frame (get_frame_pc (frame)))
+  if (pc_in_dummy_frame (frame->pc))
     {
       ULONGEST pc;
 
@@ -582,11 +580,11 @@
 
   if (i386_frameless_signal_p (frame))
     {
-      CORE_ADDR sp = i386_sigtramp_saved_sp (get_next_frame (frame));
+      CORE_ADDR sp = i386_sigtramp_saved_sp (frame->next);
       return read_memory_unsigned_integer (sp, 4);
     }
 
-  return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
+  return read_memory_unsigned_integer (frame->frame + 4, 4);
 }
 
 /* Immediately after a function call, return the saved pc.  */
@@ -709,18 +707,18 @@
   CORE_ADDR pc;
   int i;
 
-  if (get_frame_saved_regs (fip))
+  if (fip->saved_regs)
     return;
 
   frame_saved_regs_zalloc (fip);
 
-  pc = get_pc_function_start (get_frame_pc (fip));
+  pc = get_pc_function_start (fip->pc);
   if (pc != 0)
     locals = i386_get_frame_setup (pc);
 
   if (locals >= 0)
     {
-      addr = get_frame_base (fip) - 4 - locals;
+      addr = fip->frame - 4 - locals;
       for (i = 0; i < 8; i++)
 	{
 	  op = codestream_get ();
@@ -728,16 +726,16 @@
 	    break;
 #ifdef I386_REGNO_TO_SYMMETRY
 	  /* Dynix uses different internal numbering.  Ick.  */
-	  get_frame_saved_regs (fip)[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
+	  fip->saved_regs[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
 #else
-	  get_frame_saved_regs (fip)[op - 0x50] = addr;
+	  fip->saved_regs[op - 0x50] = addr;
 #endif
 	  addr -= 4;
 	}
     }
 
-  get_frame_saved_regs (fip)[PC_REGNUM] = get_frame_base (fip) + 4;
-  get_frame_saved_regs (fip)[FP_REGNUM] = get_frame_base (fip);
+  fip->saved_regs[PC_REGNUM] = fip->frame + 4;
+  fip->saved_regs[FP_REGNUM] = fip->frame;
 }
 
 /* Return PC of first real instruction.  */
@@ -869,7 +867,7 @@
   for (regnum = 0; regnum < NUM_REGS; regnum++)
     {
       CORE_ADDR addr;
-      addr = get_frame_saved_regs (frame)[regnum];
+      addr = frame->saved_regs[regnum];
       if (addr)
 	{
 	  read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
@@ -892,16 +890,15 @@
 /* Figure out where the longjmp will land.  Slurp the args out of the
    stack.  We expect the first arg to be a pointer to the jmp_buf
    structure from which we extract the address that we will land at.
-   This address is copied into PC.  This routine returns non-zero on
+   This address is copied into PC.  This routine returns true on
    success.  */
 
 static int
 i386_get_longjmp_target (CORE_ADDR *pc)
 {
-  char buf[8];
+  char buf[4];
   CORE_ADDR sp, jb_addr;
   int jb_pc_offset = gdbarch_tdep (current_gdbarch)->jb_pc_offset;
-  int len = TARGET_PTR_BIT / TARGET_CHAR_BIT;
 
   /* If JB_PC_OFFSET is -1, we have no way to find out where the
      longjmp will land.  */
@@ -909,14 +906,14 @@
     return 0;
 
   sp = read_register (SP_REGNUM);
-  if (target_read_memory (sp + len, buf, len))
+  if (target_read_memory (sp + 4, buf, 4))
     return 0;
 
-  jb_addr = extract_address (buf, len);
-  if (target_read_memory (jb_addr + jb_pc_offset, buf, len))
+  jb_addr = extract_address (buf, 4);
+  if (target_read_memory (jb_addr + jb_pc_offset, buf, 4))
     return 0;
 
-  *pc = extract_address (buf, len);
+  *pc = extract_address (buf, 4);
   return 1;
 }
 
@@ -1358,7 +1355,7 @@
   int sigcontext_offset = -1;
   char *name = NULL;
 
-  find_pc_partial_function (get_frame_pc (frame), &name, NULL, NULL);
+  find_pc_partial_function (frame->pc, &name, NULL, NULL);
   if (name)
     {
       if (strcmp (name, "_sigreturn") == 0)
@@ -1371,8 +1368,8 @@
 
   gdb_assert (sigcontext_offset != -1);
 
-  if (get_next_frame (frame))
-    return get_frame_base (get_next_frame (frame)) + sigcontext_offset;
+  if (frame->next)
+    return frame->next->frame + sigcontext_offset;
   return read_register (SP_REGNUM) + sigcontext_offset;
 }
 
@@ -1410,6 +1407,9 @@
   set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
 
+  /* FIXME: kettenis/20020511: Why do we override this function here?  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+
   set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
   tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
   tdep->sc_pc_offset = 14 * 4;
@@ -1437,6 +1437,9 @@
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
+  /* FIXME: kettenis/20020511: Why do we override this function here?  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+
   tdep->jb_pc_offset = 24;
 }
 
@@ -1496,11 +1499,22 @@
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
-  /* If there is already a candidate, use it.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  /* Try to determine the OS ABI of the object we're loading.  */
+  if (info.abfd != NULL)
+    osabi = gdbarch_lookup_osabi (info.abfd);
+
+  /* Find a candidate among extant architectures.  */
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the OS ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+        return arches->gdbarch;
+    }
 
   /* Allocate space for the new architecture.  */
   tdep = XMALLOC (struct gdbarch_tdep);
@@ -1510,6 +1524,8 @@
      ready to unwind the PC first (see frame.c:get_prev_frame()).  */
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
 
+  tdep->osabi = osabi;
+
   /* The i386 default settings don't include the SSE registers.
      FIXME: kettenis/20020614: They do include the FPU registers for
      now, which probably is not quite right.  */
@@ -1618,6 +1634,7 @@
   set_gdbarch_frameless_function_invocation (gdbarch,
                                            i386_frameless_function_invocation);
   set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
   set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
   set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
@@ -1635,7 +1652,7 @@
   set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return gdbarch;
 }
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 25bf6b3..627cb0a 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -1,5 +1,5 @@
 /* Target-dependent code for GDB, the GNU debugger.
-   Copyright 2001, 2002, 2003
+   Copyright 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -22,6 +22,8 @@
 #ifndef I386_TDEP_H
 #define I386_TDEP_H
 
+#include "osabi.h"
+
 /* GDB's i386 target supports both the 32-bit Intel Architecture
    (IA-32) and the 64-bit AMD x86-64 architecture.  Internally it uses
    a similar register layout for both.
@@ -51,6 +53,9 @@
 /* i386 architecture specific information.  */
 struct gdbarch_tdep
 {
+  /* ABI.  */
+  enum gdb_osabi osabi;
+
   /* Number of SSE registers.  */
   int num_xmm_regs;
 
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index af30df1..77a4eec 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for i386 BSD's.
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,6 @@
 #include "frame.h"
 #include "gdbcore.h"
 #include "regcache.h"
-#include "osabi.h"
 
 #include "gdb_string.h"
 
diff --git a/gdb/i386gnu-tdep.c b/gdb/i386gnu-tdep.c
index 297d566..143ddc0 100644
--- a/gdb/i386gnu-tdep.c
+++ b/gdb/i386gnu-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for the GNU Hurd.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,6 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "osabi.h"
 
 #include "i386-tdep.h"
 
diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c
index d0775b7..22bab3a 100644
--- a/gdb/i386ly-tdep.c
+++ b/gdb/i386ly-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for Intel 386 running LynxOS.
-   Copyright 1993, 1996, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1993, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +23,6 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "target.h"
-#include "osabi.h"
 
 #include "i386-tdep.h"
 
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 64b3dc0..69283f8 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for NetBSD/i386, for GDB.
-   Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003
+   Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -24,7 +24,6 @@
 #include "gdbcore.h"
 #include "regcache.h"
 #include "arch-utils.h"
-#include "osabi.h"
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index be0c674..8bbce84 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for OpenBSD/i386.
-   Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002, 2003
+   Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -23,7 +23,6 @@
 #include "arch-utils.h"
 #include "gdbcore.h"
 #include "regcache.h"
-#include "osabi.h"
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index b37da52..fab210a 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for the IA-64 for GDB, the GNU debugger.
 
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -335,7 +335,7 @@
     internal_error (__FILE__, __LINE__,
 		    "read_sigcontext_register: SIGCONTEXT_REGISTER_ADDRESS is 0");
 
-  regaddr = SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regnum);
+  regaddr = SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regnum);
   if (regaddr)
     return read_memory_integer (regaddr, REGISTER_RAW_SIZE (regnum));
   else
@@ -705,18 +705,15 @@
 {
   if ((get_frame_type (frame) == SIGTRAMP_FRAME))
     return read_sigcontext_register (frame, sp_regnum);
-  else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-					get_frame_base (frame),
-					get_frame_base (frame)))
-    return get_frame_base (frame);
+  else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return frame->frame;
   else
     {
       FRAME_INIT_SAVED_REGS (frame);
-      if (get_frame_saved_regs (frame)[IA64_VFP_REGNUM])
-	return read_memory_integer (get_frame_saved_regs (frame)[IA64_VFP_REGNUM], 8);
+      if (frame->saved_regs[IA64_VFP_REGNUM])
+	return read_memory_integer (frame->saved_regs[IA64_VFP_REGNUM], 8);
       else
-	return (get_frame_base (frame)
-		+ get_frame_extra_info (frame)->mem_stack_frame_size);
+	return frame->frame + frame->extra_info->mem_stack_frame_size;
     }
 }
 
@@ -725,20 +722,16 @@
 {
   if ((get_frame_type (frame) == SIGTRAMP_FRAME))
     return read_sigcontext_register (frame, pc_regnum);
-  else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-					get_frame_base (frame),
-					get_frame_base (frame)))
-    return deprecated_read_register_dummy (get_frame_pc (frame),
-					   get_frame_base (frame), pc_regnum);
+  else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return deprecated_read_register_dummy (frame->pc, frame->frame, pc_regnum);
   else
     {
       FRAME_INIT_SAVED_REGS (frame);
 
-      if (get_frame_saved_regs (frame)[IA64_VRAP_REGNUM])
-	return read_memory_integer (get_frame_saved_regs (frame)[IA64_VRAP_REGNUM], 8);
-      else if (get_next_frame (frame)
-	       && (get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME))
-	return read_sigcontext_register (get_next_frame (frame), IA64_BR0_REGNUM);
+      if (frame->saved_regs[IA64_VRAP_REGNUM])
+	return read_memory_integer (frame->saved_regs[IA64_VRAP_REGNUM], 8);
+      else if (frame->next && (get_frame_type (frame->next) == SIGTRAMP_FRAME))
+	return read_sigcontext_register (frame->next, IA64_BR0_REGNUM);
       else	/* either frameless, or not far enough along in the prologue... */
 	return ia64_saved_pc_after_call (frame);
     }
@@ -839,7 +832,7 @@
   memset (instores, 0, sizeof instores);
   memset (infpstores, 0, sizeof infpstores);
 
-  if (frame && !get_frame_saved_regs (frame))
+  if (frame && !frame->saved_regs)
     {
       frame_saved_regs_zalloc (frame);
       do_fsr_stuff = 1;
@@ -847,9 +840,9 @@
 
   if (frame 
       && !do_fsr_stuff
-      && get_frame_extra_info (frame)->after_prologue != 0
-      && get_frame_extra_info (frame)->after_prologue <= lim_pc)
-    return get_frame_extra_info (frame)->after_prologue;
+      && frame->extra_info->after_prologue != 0
+      && frame->extra_info->after_prologue <= lim_pc)
+    return frame->extra_info->after_prologue;
 
   lim_pc = refine_prologue_limit (pc, lim_pc, &trust_limit);
 
@@ -944,7 +937,7 @@
 	      /* Hmm... whether or not this will work will depend on
 	         where the pc is.  If it's still early in the prologue
 		 this'll be wrong.  FIXME */
-	      spill_addr  = (frame ? get_frame_base (frame) : 0)
+	      spill_addr  = (frame ? frame->frame : 0)
 	                  + (rM == 12 ? 0 : mem_stack_frame_size) 
 			  + imm;
 	      spill_reg   = rN;
@@ -967,7 +960,7 @@
 	      && ((2 <= fM && fM <= 5) || (16 <= fM && fM <= 31)))
 	    {
 	      if (do_fsr_stuff)
-	        get_frame_saved_regs (frame)[IA64_FR0_REGNUM + fM] = spill_addr;
+	        frame->saved_regs[IA64_FR0_REGNUM + fM] = spill_addr;
 
               if ((instr & 0x1efc0000000) == 0x0eec0000000)
 		spill_addr += imm;
@@ -1026,14 +1019,14 @@
 		{
 		  /* Track UNAT register */
 		  if (do_fsr_stuff)
-		    get_frame_saved_regs (frame)[IA64_UNAT_REGNUM] = spill_addr;
+		    frame->saved_regs[IA64_UNAT_REGNUM] = spill_addr;
 		  unat_save_reg = 0;
 		}
 	      else
 	        {
 		  /* Track PR register */
 		  if (do_fsr_stuff)
-		    get_frame_saved_regs (frame)[IA64_PR_REGNUM] = spill_addr;
+		    frame->saved_regs[IA64_PR_REGNUM] = spill_addr;
 		  pr_save_reg = 0;
 		}
 	      if ((instr & 0x1efc0000000LL) == 0x0acc0000000LL)
@@ -1102,7 +1095,7 @@
 	         regs.  Record the spill address and advance the spill
 		 register if appropriate. */
 	      if (do_fsr_stuff)
-		get_frame_saved_regs (frame)[IA64_GR0_REGNUM + rM] = spill_addr;
+		frame->saved_regs[IA64_GR0_REGNUM + rM] = spill_addr;
 	      if ((instr & 0x1efc0000000LL) == 0x0aec0000000LL)
 	        /* st8.spill [rN] = rM, imm9 */
 		spill_addr += imm9(instr);
@@ -1123,11 +1116,11 @@
     /* Extract the size of the rotating portion of the stack
        frame and the register rename base from the current
        frame marker. */
-    sor = ((get_frame_extra_info (frame)->cfm >> 14) & 0xf) * 8;
-    rrb_gr = (get_frame_extra_info (frame)->cfm >> 18) & 0x7f;
+    sor = ((frame->extra_info->cfm >> 14) & 0xf) * 8;
+    rrb_gr = (frame->extra_info->cfm >> 18) & 0x7f;
 
-    for (i = 0, addr = get_frame_extra_info (frame)->bsp;
-	 i < get_frame_extra_info (frame)->sof;
+    for (i = 0, addr = frame->extra_info->bsp;
+	 i < frame->extra_info->sof;
 	 i++, addr += 8)
       {
 	if (IS_NaT_COLLECTION_ADDR (addr))
@@ -1135,26 +1128,25 @@
 	    addr += 8;
 	  }
 	if (i < sor)
-	  get_frame_saved_regs (frame)[IA64_GR32_REGNUM + ((i + (sor - rrb_gr)) % sor)] 
+	  frame->saved_regs[IA64_GR32_REGNUM + ((i + (sor - rrb_gr)) % sor)] 
 	    = addr;
 	else
-	  get_frame_saved_regs (frame)[IA64_GR32_REGNUM + i] = addr;
+	  frame->saved_regs[IA64_GR32_REGNUM + i] = addr;
 
 	if (i+32 == cfm_reg)
-	  get_frame_saved_regs (frame)[IA64_CFM_REGNUM] = addr;
+	  frame->saved_regs[IA64_CFM_REGNUM] = addr;
 	if (i+32 == ret_reg)
-	  get_frame_saved_regs (frame)[IA64_VRAP_REGNUM] = addr;
+	  frame->saved_regs[IA64_VRAP_REGNUM] = addr;
 	if (i+32 == fp_reg)
-	  get_frame_saved_regs (frame)[IA64_VFP_REGNUM] = addr;
+	  frame->saved_regs[IA64_VFP_REGNUM] = addr;
       }
   }
 
-  if (frame && get_frame_extra_info (frame))
-    {
-      get_frame_extra_info (frame)->after_prologue = last_prologue_pc;
-      get_frame_extra_info (frame)->mem_stack_frame_size = mem_stack_frame_size;
-      get_frame_extra_info (frame)->fp_reg = fp_reg;
-    }
+  if (frame && frame->extra_info) {
+    frame->extra_info->after_prologue = last_prologue_pc;
+    frame->extra_info->mem_stack_frame_size = mem_stack_frame_size;
+    frame->extra_info->fp_reg = fp_reg;
+  }
 
   return last_prologue_pc;
 }
@@ -1168,7 +1160,7 @@
 void
 ia64_frame_init_saved_regs (struct frame_info *frame)
 {
-  if (get_frame_saved_regs (frame))
+  if (frame->saved_regs)
     return;
 
   if ((get_frame_type (frame) == SIGTRAMP_FRAME) && SIGCONTEXT_REGISTER_ADDRESS)
@@ -1177,45 +1169,45 @@
 
       frame_saved_regs_zalloc (frame);
 
-      get_frame_saved_regs (frame)[IA64_VRAP_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_IP_REGNUM);
-      get_frame_saved_regs (frame)[IA64_CFM_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_CFM_REGNUM);
-      get_frame_saved_regs (frame)[IA64_PSR_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_PSR_REGNUM);
+      frame->saved_regs[IA64_VRAP_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_IP_REGNUM);
+      frame->saved_regs[IA64_CFM_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_CFM_REGNUM);
+      frame->saved_regs[IA64_PSR_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_PSR_REGNUM);
 #if 0
-      get_frame_saved_regs (frame)[IA64_BSP_REGNUM] = 
+      frame->saved_regs[IA64_BSP_REGNUM] = 
 	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_BSP_REGNUM);
 #endif
-      get_frame_saved_regs (frame)[IA64_RNAT_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_RNAT_REGNUM);
-      get_frame_saved_regs (frame)[IA64_CCV_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_CCV_REGNUM);
-      get_frame_saved_regs (frame)[IA64_UNAT_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_UNAT_REGNUM);
-      get_frame_saved_regs (frame)[IA64_FPSR_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_FPSR_REGNUM);
-      get_frame_saved_regs (frame)[IA64_PFS_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_PFS_REGNUM);
-      get_frame_saved_regs (frame)[IA64_LC_REGNUM] = 
-	SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), IA64_LC_REGNUM);
+      frame->saved_regs[IA64_RNAT_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_RNAT_REGNUM);
+      frame->saved_regs[IA64_CCV_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_CCV_REGNUM);
+      frame->saved_regs[IA64_UNAT_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_UNAT_REGNUM);
+      frame->saved_regs[IA64_FPSR_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_FPSR_REGNUM);
+      frame->saved_regs[IA64_PFS_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_PFS_REGNUM);
+      frame->saved_regs[IA64_LC_REGNUM] = 
+	SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_LC_REGNUM);
       for (regno = IA64_GR1_REGNUM; regno <= IA64_GR31_REGNUM; regno++)
 	if (regno != sp_regnum)
-	  get_frame_saved_regs (frame)[regno] =
-	    SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regno);
+	  frame->saved_regs[regno] =
+	    SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regno);
       for (regno = IA64_BR0_REGNUM; regno <= IA64_BR7_REGNUM; regno++)
-	get_frame_saved_regs (frame)[regno] =
-	  SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regno);
+	frame->saved_regs[regno] =
+	  SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regno);
       for (regno = IA64_FR2_REGNUM; regno <= IA64_BR7_REGNUM; regno++)
-	get_frame_saved_regs (frame)[regno] =
-	  SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regno);
+	frame->saved_regs[regno] =
+	  SIGCONTEXT_REGISTER_ADDRESS (frame->frame, regno);
     }
   else
     {
       CORE_ADDR func_start;
 
-      func_start = get_pc_function_start (get_frame_pc (frame));
-      examine_prologue (func_start, get_frame_pc (frame), frame);
+      func_start = get_pc_function_start (frame->pc);
+      examine_prologue (func_start, frame->pc, frame);
     }
 }
 
@@ -1241,20 +1233,17 @@
   if (lval != NULL)
     *lval = not_lval;
 
-  is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-						get_frame_base (frame),
-						get_frame_base (frame));
+  is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame);
 
-  if (regnum == SP_REGNUM && get_next_frame (frame))
+  if (regnum == SP_REGNUM && frame->next)
     {
       /* Handle SP values for all frames but the topmost. */
-      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-		     get_frame_base (frame));
+      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), frame->frame);
     }
   else if (regnum == IA64_BSP_REGNUM)
     {
       store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), 
-                     get_frame_extra_info (frame)->bsp);
+                     frame->extra_info->bsp);
     }
   else if (regnum == IA64_VFP_REGNUM)
     {
@@ -1262,8 +1251,7 @@
          for the frame pointer, it'll be found by ia64_find_saved_register()
 	 above.  If the function lacks one of these frame pointers, we can
 	 still provide a value since we know the size of the frame */
-      CORE_ADDR vfp = (get_frame_base (frame)
-		       + get_frame_extra_info (frame)->mem_stack_frame_size);
+      CORE_ADDR vfp = frame->frame + frame->extra_info->mem_stack_frame_size;
       store_address (raw_buffer, REGISTER_RAW_SIZE (IA64_VFP_REGNUM), vfp);
     }
   else if (IA64_PR0_REGNUM <= regnum && regnum <= IA64_PR63_REGNUM)
@@ -1279,7 +1267,7 @@
 	{
 	  /* Fetch predicate register rename base from current frame
 	     marker for this frame. */
-	  int rrb_pr = (get_frame_extra_info (frame)->cfm >> 32) & 0x3f;
+	  int rrb_pr = (frame->extra_info->cfm >> 32) & 0x3f;
 
 	  /* Adjust the register number to account for register rotation. */
 	  regnum = IA64_PR16_REGNUM 
@@ -1313,8 +1301,8 @@
       if (!is_dummy_frame)
 	{
 	  FRAME_INIT_SAVED_REGS (frame);
-	  gr_addr = get_frame_saved_regs (frame)[ regnum - IA64_NAT0_REGNUM 
-						+ IA64_GR0_REGNUM];
+	  gr_addr = frame->saved_regs[ regnum - IA64_NAT0_REGNUM 
+	                                      + IA64_GR0_REGNUM];
 	}
       if (gr_addr)
 	{
@@ -1338,10 +1326,10 @@
   else if (regnum == IA64_IP_REGNUM)
     {
       CORE_ADDR pc;
-      if (get_next_frame (frame))
+      if (frame->next)
         {
 	  /* FIXME: Set *addrp, *lval when possible. */
-	  pc = ia64_frame_saved_pc (get_next_frame (frame));
+	  pc = ia64_frame_saved_pc (frame->next);
         }
       else
         {
@@ -1355,7 +1343,7 @@
       if (!is_dummy_frame)
 	{
 	  FRAME_INIT_SAVED_REGS (frame);
-	  addr = get_frame_saved_regs (frame)[regnum];
+	  addr = frame->saved_regs[regnum];
 	}
 
       if (addr != 0)
@@ -1379,7 +1367,7 @@
 	{
 	  /* Fetch floating point register rename base from current
 	     frame marker for this frame. */
-	  int rrb_fr = (get_frame_extra_info (frame)->cfm >> 25) & 0x7f;
+	  int rrb_fr = (frame->extra_info->cfm >> 25) & 0x7f;
 
 	  /* Adjust the floating point register number to account for
 	     register rotation. */
@@ -1463,7 +1451,7 @@
 ia64_frameless_function_invocation (struct frame_info *frame)
 {
   FRAME_INIT_SAVED_REGS (frame);
-  return (get_frame_extra_info (frame)->mem_stack_frame_size == 0);
+  return (frame->extra_info->mem_stack_frame_size == 0);
 }
 
 CORE_ADDR
@@ -1492,70 +1480,66 @@
 ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
 {
   CORE_ADDR bsp, cfm;
-  int next_frame_is_call_dummy = ((get_next_frame (frame) != NULL)
-    && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (frame)),
-				    get_frame_base (get_next_frame (frame)),
-				    get_frame_base (get_next_frame (frame))));
+  int next_frame_is_call_dummy = ((frame->next != NULL)
+    && DEPRECATED_PC_IN_CALL_DUMMY (frame->next->pc, frame->next->frame,
+                                          frame->next->frame));
 
-  frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
+  frame->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  if (get_next_frame (frame) == 0)
+  if (frame->next == 0)
     {
       bsp = read_register (IA64_BSP_REGNUM);
       cfm = read_register (IA64_CFM_REGNUM);
 
     }
-  else if ((get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME))
+  else if ((get_frame_type (frame->next) == SIGTRAMP_FRAME))
     {
-      bsp = read_sigcontext_register (get_next_frame (frame), IA64_BSP_REGNUM);
-      cfm = read_sigcontext_register (get_next_frame (frame), IA64_CFM_REGNUM);
+      bsp = read_sigcontext_register (frame->next, IA64_BSP_REGNUM);
+      cfm = read_sigcontext_register (frame->next, IA64_CFM_REGNUM);
     }
   else if (next_frame_is_call_dummy)
     {
-      bsp = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frame)),
-					    get_frame_base (get_next_frame (frame)),
+      bsp = deprecated_read_register_dummy (frame->next->pc,
+					    frame->next->frame,
 					    IA64_BSP_REGNUM);
-      cfm = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frame)),
-					    get_frame_base (get_next_frame (frame)),
+      cfm = deprecated_read_register_dummy (frame->next->pc,
+					    frame->next->frame,
 					    IA64_CFM_REGNUM);
     }
   else
     {
-      struct frame_info *frn = get_next_frame (frame);
+      struct frame_info *frn = frame->next;
 
       FRAME_INIT_SAVED_REGS (frn);
 
-      if (get_frame_saved_regs (frn)[IA64_CFM_REGNUM] != 0)
-	cfm = read_memory_integer (get_frame_saved_regs (frn)[IA64_CFM_REGNUM], 8);
-      else if (get_next_frame (frn) && (get_frame_type (get_next_frame (frn)) == SIGTRAMP_FRAME))
-	cfm = read_sigcontext_register (get_next_frame (frn), IA64_PFS_REGNUM);
-      else if (get_next_frame (frn)
-               && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (frn)),
-					       get_frame_base (get_next_frame (frn)),
-					       get_frame_base (get_next_frame (frn))))
-	cfm = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frn)),
-					      get_frame_base (get_next_frame (frn)),
+      if (frn->saved_regs[IA64_CFM_REGNUM] != 0)
+	cfm = read_memory_integer (frn->saved_regs[IA64_CFM_REGNUM], 8);
+      else if (frn->next && (get_frame_type (frn->next) == SIGTRAMP_FRAME))
+	cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM);
+      else if (frn->next
+               && DEPRECATED_PC_IN_CALL_DUMMY (frn->next->pc, frn->next->frame,
+	                                           frn->next->frame))
+	cfm = deprecated_read_register_dummy (frn->next->pc, frn->next->frame,
 					      IA64_PFS_REGNUM);
       else
 	cfm = read_register (IA64_PFS_REGNUM);
 
-      bsp = get_frame_extra_info (frn)->bsp;
+      bsp = frn->extra_info->bsp;
     }
-  get_frame_extra_info (frame)->cfm = cfm;
-  get_frame_extra_info (frame)->sof = cfm & 0x7f;
-  get_frame_extra_info (frame)->sol = (cfm >> 7) & 0x7f;
-  if (get_next_frame (frame) == 0 
-      || (get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME) 
+  frame->extra_info->cfm = cfm;
+  frame->extra_info->sof = cfm & 0x7f;
+  frame->extra_info->sol = (cfm >> 7) & 0x7f;
+  if (frame->next == 0 
+      || (get_frame_type (frame->next) == SIGTRAMP_FRAME) 
       || next_frame_is_call_dummy)
-    get_frame_extra_info (frame)->bsp =
-      rse_address_add (bsp, -get_frame_extra_info (frame)->sof);
+    frame->extra_info->bsp = rse_address_add (bsp, -frame->extra_info->sof);
   else
-    get_frame_extra_info (frame)->bsp =
-      rse_address_add (bsp, -get_frame_extra_info (frame)->sol);
+    frame->extra_info->bsp = rse_address_add (bsp, -frame->extra_info->sol);
 
-  get_frame_extra_info (frame)->after_prologue = 0;
-  get_frame_extra_info (frame)->mem_stack_frame_size = -1;		/* Not yet determined */
-  get_frame_extra_info (frame)->fp_reg = 0;
+  frame->extra_info->after_prologue = 0;
+  frame->extra_info->mem_stack_frame_size = -1;		/* Not yet determined */
+  frame->extra_info->fp_reg = 0;
 }
 
 static int
@@ -1994,7 +1978,7 @@
 
   for (regno = 0; regno < ia64_num_regs; regno++)
     {
-      if (get_frame_saved_regs (frame)[regno]
+      if (frame->saved_regs[regno]
 	  && (!(IA64_GR32_REGNUM <= regno && regno <= IA64_GR127_REGNUM))
 	  && regno != pc_regnum
 	  && regno != sp_regnum
@@ -2004,7 +1988,7 @@
 	  && regno != IA64_BSPSTORE_REGNUM)
 	{
 	  write_register (regno, 
-			  read_memory_integer (get_frame_saved_regs (frame)[regno],
+			  read_memory_integer (frame->saved_regs[regno],
 					       REGISTER_RAW_SIZE (regno)));
 	}
     }
@@ -2014,9 +1998,9 @@
 
   cfm = read_register (IA64_CFM_REGNUM);
 
-  if (get_frame_saved_regs (frame)[IA64_PFS_REGNUM])
+  if (frame->saved_regs[IA64_PFS_REGNUM])
     {
-      pfs = read_memory_integer (get_frame_saved_regs (frame)[IA64_PFS_REGNUM],
+      pfs = read_memory_integer (frame->saved_regs[IA64_PFS_REGNUM],
 				 REGISTER_RAW_SIZE (IA64_PFS_REGNUM));
     }
   else
@@ -2030,7 +2014,7 @@
      wants bsp to be set at the end of all used registers.  It's
      likely that this code will need to be revised to accomodate
      other operating systems. */
-  bsp = rse_address_add (get_frame_extra_info (frame)->bsp,
+  bsp = rse_address_add (frame->extra_info->bsp,
                          (pfs & 0x7f) - ((pfs >> 7) & 0x7f));
   write_register (IA64_BSP_REGNUM, bsp);
 
@@ -2199,6 +2183,7 @@
   set_gdbarch_saved_pc_after_call (gdbarch, ia64_saved_pc_after_call);
 
   set_gdbarch_frame_chain (gdbarch, ia64_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, ia64_frame_saved_pc);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 79ca670..09cd7ff 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -185,12 +185,11 @@
 
 extern CORE_ADDR generic_target_read_fp (void);
 
-extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf);
+extern CORE_ADDR unsigned_pointer_to_address (struct type *type, void *buf);
 
 extern void unsigned_address_to_pointer (struct type *type, void *buf,
 					 CORE_ADDR addr);
-extern CORE_ADDR signed_pointer_to_address (struct type *type,
-					    const void *buf);
+extern CORE_ADDR signed_pointer_to_address (struct type *type, void *buf);
 extern void address_to_signed_pointer (struct type *type, void *buf,
 				       CORE_ADDR addr);
 
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 704e033..aa404cf 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -66,7 +66,7 @@
 
 static void build_infrun (void);
 
-static int follow_fork (void);
+static int follow_fork ();
 
 static void set_schedlock_func (char *args, int from_tty,
 				struct cmd_list_element *c);
@@ -377,7 +377,7 @@
 
 
 static int
-follow_fork (void)
+follow_fork ()
 {
   const char *follow_mode = follow_fork_mode_string;
   int follow_child = (follow_mode == follow_fork_mode_child);
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index e12e8bd..471eb3c 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -649,8 +649,7 @@
 #define PROC_NAME_FMT "/proc/%05d"
 #endif
   sprintf (procname, PROC_NAME_FMT, getpid ());
-  fd = open (procname, O_RDONLY);
-  if (fd >= 0)
+  if ((fd = open (procname, O_RDONLY)) >= 0)
     {
       close (fd);
       return;
diff --git a/gdb/language.c b/gdb/language.c
index a343290..8eee8f6 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -568,6 +568,8 @@
          not needed. */
       return l1 > l2 ? VALUE_TYPE (v1) : VALUE_TYPE (v2);
       break;
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE    error ("Missing Chill support in function binop_result_check.");  */	/*FIXME */
     }
   internal_error (__FILE__, __LINE__, "failed internal consistency check");
   return (struct type *) 0;	/* For lint */
@@ -791,6 +793,8 @@
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1;
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   error ("Missing Chill support in function integral_type.");	*//*FIXME */
     default:
       error ("Language not supported.");
     }
@@ -819,6 +823,7 @@
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
     {
+      /* OBSOLETE case language_chill: */
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
@@ -841,6 +846,7 @@
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
     {
+      /* OBSOLETE case language_chill: */
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
@@ -868,7 +874,7 @@
     case language_cplus:
     case language_objc:
       /* Might be more cleanly handled by having a
-         TYPE_CODE_INT_NOT_BOOL for (the deleted) CHILL and such
+         TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
          languages, or a TYPE_CODE_INT_OR_BOOL for C.  */
       if (TYPE_CODE (type) == TYPE_CODE_INT)
 	return 1;
@@ -916,6 +922,8 @@
       return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
 	(TYPE_CODE (type) == TYPE_CODE_SET) ||
 	(TYPE_CODE (type) == TYPE_CODE_ARRAY);
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE     error ("Missing Chill support in function structured_type.");	*//*FIXME */
     default:
       return (0);
     }
@@ -929,6 +937,10 @@
   struct type *type;
   switch (current_language->la_language)
     {
+#if 0
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE    return builtin_type_chill_bool; */
+#endif
     case language_fortran:
       sym = lookup_symbol ("logical", NULL, VAR_NAMESPACE, NULL, NULL);
       if (sym)
@@ -1159,6 +1171,11 @@
 	 }
 #endif
 
+#ifdef _LANG_chill /* OBSOLETE */
+	 /* OBSOLETE case language_chill: */
+	 /* OBSOLETE   error ("Missing Chill support in function binop_type_check.");	*//*FIXME */
+#endif
+
 	}
     }
 }
diff --git a/gdb/language.h b/gdb/language.h
index a04bc74..b15544f 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -35,6 +35,7 @@
 /* #include "lang_def.h" */
 #define	_LANG_c
 #define	_LANG_m2
+/* OBSOLETE #define	_LANG_chill */
 #define  _LANG_fortran
 #define  _LANG_pascal
 
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index aad8c19..0b30cea 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -1,5 +1,5 @@
 /* Multi-threaded debugging support for GNU/Linux (LWP layer).
-   Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -379,11 +379,6 @@
 	error ("Can't attach %s: %s", target_pid_to_str (ptid),
 	       safe_strerror (errno));
 
-      if (debug_lin_lwp)
-	fprintf_unfiltered (gdb_stdlog, 
-			    "LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n", 
-			    target_pid_to_str (ptid));
-
       pid = waitpid (GET_LWP (ptid), &status, 0);
       if (pid == -1 && errno == ECHILD)
 	{
@@ -396,14 +391,6 @@
 		  && WIFSTOPPED (status) && WSTOPSIG (status));
 
       lp->stopped = 1;
-
-      if (debug_lin_lwp)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "LLAL: waitpid %s received %s\n",
-			      target_pid_to_str (ptid), 
-			      status_to_str (status));
-	}
     }
   else
     {
@@ -452,12 +439,6 @@
   /* Fake the SIGSTOP that core GDB expects.  */
   lp->status = W_STOPCODE (SIGSTOP);
   lp->resumed = 1;
-  if (debug_lin_lwp)
-    {
-      fprintf_unfiltered (gdb_stdlog,
-			  "LLA: waitpid %ld, faking SIGSTOP\n", 
-			  (long) pid);
-    }
 }
 
 static int
@@ -466,24 +447,16 @@
   gdb_assert (lp->status == 0 || WIFSTOPPED (lp->status));
 
   if (debug_lin_lwp && lp->status)
-    fprintf_unfiltered (gdb_stdlog, "DC:  Pending %s for %s on detach.\n",
-			strsignal (WSTOPSIG (lp->status)), 
-			target_pid_to_str (lp->ptid));
+    fprintf_unfiltered (gdb_stdlog, "Pending %s for LWP %ld on detach.\n",
+			strsignal (WSTOPSIG (lp->status)), GET_LWP (lp->ptid));
 
   while (lp->signalled && lp->stopped)
     {
-      errno = 0;
       if (ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
 		  WSTOPSIG (lp->status)) < 0)
 	error ("Can't continue %s: %s", target_pid_to_str (lp->ptid),
 	       safe_strerror (errno));
 
-      if (debug_lin_lwp)
-	fprintf_unfiltered (gdb_stdlog, 
-			    "DC:  PTRACE_CONTINUE (%s, 0, %s) (OK)\n",
-			    target_pid_to_str (lp->ptid),
-			    status_to_str (lp->status)); 
-
       lp->stopped = 0;
       lp->signalled = 0;
       lp->status = 0;
@@ -496,18 +469,11 @@
      overall process id just yet.  */
   if (GET_LWP (lp->ptid) != GET_PID (lp->ptid))
     {
-      errno = 0;
       if (ptrace (PTRACE_DETACH, GET_LWP (lp->ptid), 0,
 		  WSTOPSIG (lp->status)) < 0)
 	error ("Can't detach %s: %s", target_pid_to_str (lp->ptid),
 	       safe_strerror (errno));
 
-      if (debug_lin_lwp)
-	fprintf_unfiltered (gdb_stdlog,
-			    "PTRACE_DETACH (%s, %s, 0) (OK)\n",
-			    target_pid_to_str (lp->ptid), 
-			    strsignal (WSTOPSIG (lp->status)));
-
       delete_lwp (lp->ptid);
     }
 
@@ -586,10 +552,6 @@
 #endif
 
       child_resume (pid_to_ptid (GET_LWP (lp->ptid)), 0, TARGET_SIGNAL_0);
-      if (debug_lin_lwp)
-	fprintf_unfiltered (gdb_stdlog, 
-			    "RC:  PTRACE_CONT %s, 0, 0 (resume sibling)\n",
-			    target_pid_to_str (lp->ptid));
       lp->stopped = 0;
       lp->step = 0;
     }
@@ -660,12 +622,6 @@
     iterate_over_lwps (resume_callback, NULL);
 
   child_resume (ptid, step, signo);
-  if (debug_lin_lwp)
-    fprintf_unfiltered (gdb_stdlog,
-			"LLR: %s %s, %s (resume event thread)\n",
-			step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
-			target_pid_to_str (ptid),
-			signo ? strsignal (signo) : "0");
 }
 
 
@@ -678,12 +634,6 @@
     {
       int ret;
 
-      if (debug_lin_lwp)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "SC:  kill %s **<SIGSTOP>**\n",
-			      target_pid_to_str (lp->ptid));
-	}
       ret = kill (GET_LWP (lp->ptid), SIGSTOP);
       gdb_assert (ret == 0);
 
@@ -717,14 +667,6 @@
 
       gdb_assert (pid == GET_LWP (lp->ptid));
 
-      if (debug_lin_lwp)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "SWC: waitpid %s received %s\n",
-			      target_pid_to_str (lp->ptid), 
-			      status_to_str (status));
-	}
-
       if (WIFEXITED (status) || WIFSIGNALED (status))
 	{
 	  gdb_assert (num_lwps > 1);
@@ -739,8 +681,8 @@
 				 target_pid_to_str (lp->ptid));
 	    }
 	  if (debug_lin_lwp)
-	    fprintf_unfiltered (gdb_stdlog, "SWC: %s exited.\n", 
-				target_pid_to_str (lp->ptid));
+	    fprintf_unfiltered (gdb_stdlog, 
+				"%s exited.\n", target_pid_to_str (lp->ptid));
 
 	  delete_lwp (lp->ptid);
 	  return 0;
@@ -751,14 +693,7 @@
       /* Ignore any signals in FLUSH_MASK.  */
       if (flush_mask && sigismember (flush_mask, WSTOPSIG (status)))
 	{
-	  errno = 0;
 	  ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
-	  if (debug_lin_lwp)
-	    fprintf_unfiltered (gdb_stdlog,
-				"PTRACE_CONT %s, 0, 0 (%s)\n",
-				target_pid_to_str (lp->ptid),
-				errno ? safe_strerror (errno) : "OK");
-
 	  return stop_wait_callback (lp, flush_mask);
 	}
 
@@ -780,26 +715,18 @@
 		 thread will have already tripped on it.  */
 
 	      /* Now resume this LWP and get the SIGSTOP event. */
-	      errno = 0;
 	      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
 	      if (debug_lin_lwp)
 		{
-		  fprintf_unfiltered (gdb_stdlog, 
-				      "PTRACE_CONT %s, 0, 0 (%s)\n",
-				      target_pid_to_str (lp->ptid),
-				      errno ? safe_strerror (errno) : "OK");
-
-		  fprintf_unfiltered (gdb_stdlog, 
-				      "SWC: Candidate SIGTRAP event in %s\n",
-				      target_pid_to_str (lp->ptid));
+		  fprintf_unfiltered (gdb_stderr, 
+				      "SWC: Candidate SIGTRAP event in %ld\n",
+				      GET_LWP (lp->ptid));
 		}
 	      /* Hold the SIGTRAP for handling by lin_lwp_wait. */
 	      stop_wait_callback (lp, data);
 	      /* If there's another event, throw it back into the queue. */
 	      if (lp->status)
-		{
-		  kill (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
-		}
+		kill (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
 	      /* Save the sigtrap event. */
 	      lp->status = status;
 	      return 0;
@@ -811,19 +738,12 @@
 
 	      if (debug_lin_lwp)
 		{
-		  fprintf_unfiltered (gdb_stdlog, 
-				      "SWC: Pending event %s in %s\n",
-				      status_to_str ((int) status), 
-				      target_pid_to_str (lp->ptid));
+		  fprintf_unfiltered (gdb_stderr, 
+				      "SWC: Pending event %d in %ld\n",
+				      WSTOPSIG (status), GET_LWP (lp->ptid));
 		}
 	      /* Now resume this LWP and get the SIGSTOP event. */
-	      errno = 0;
 	      ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
-	      if (debug_lin_lwp)
-		fprintf_unfiltered (gdb_stdlog, 
-				    "SWC: PTRACE_CONT %s, 0, 0 (%s)\n",
-				    target_pid_to_str (lp->ptid),
-				    errno ? safe_strerror (errno) : "OK");
 
 	      /* Hold this event/waitstatus while we check to see if
 		 there are any more (we still want to get that SIGSTOP). */
@@ -834,16 +754,7 @@
 	      if (lp->status == 0)
 		lp->status = status;
 	      else
-		{
-		  if (debug_lin_lwp)
-		    {
-		      fprintf_unfiltered (gdb_stdlog, 
-					  "SWC: kill %s, %s\n",
-					  target_pid_to_str (lp->ptid), 
-					  status_to_str ((int) status));
-		    }
-		  kill (GET_LWP (lp->ptid), WSTOPSIG (status));
-		}
+		kill (GET_LWP (lp->ptid), WSTOPSIG (status));
 	      return 0;
 	    }
 	}
@@ -950,8 +861,8 @@
     {
       if (debug_lin_lwp)
 	fprintf_unfiltered (gdb_stdlog,
-			    "CBC: Push back breakpoint for %s\n",
-			    target_pid_to_str (lp->ptid));
+			    "Push back breakpoint for LWP %ld\n",
+			    GET_LWP (lp->ptid));
 
       /* Back up the PC if necessary.  */
       if (DECR_PC_AFTER_BREAK)
@@ -982,8 +893,8 @@
     {
       if (debug_lin_lwp)
 	fprintf_unfiltered (gdb_stdlog,
-			    "SEL: Select single-step %s\n",
-			    target_pid_to_str (event_lp->ptid));
+			    "Select single-step LWP %ld\n",
+			    GET_LWP (event_lp->ptid));
     }
   else
     {
@@ -999,7 +910,7 @@
 
       if (debug_lin_lwp && num_events > 1)
 	fprintf_unfiltered (gdb_stdlog, 
-			    "SEL: Found %d SIGTRAP events, selecting #%d\n", 
+			    "Found %d SIGTRAP events, selecting #%d\n", 
 			    num_events, random_selector);
 
       event_lp = iterate_over_lwps (select_event_lwp_callback,
@@ -1051,25 +962,8 @@
       if (pid == -1 && errno == ECHILD)
 	/* Try again with __WCLONE to check cloned processes.  */
 	pid = waitpid (GET_PID (ptid), &status, __WCLONE);
-
-      if (debug_lin_lwp)
-	{
-	  fprintf_unfiltered (gdb_stdlog, 
-			      "CW:  waitpid %ld received %s\n",
-			      (long) pid, 
-			      status_to_str (status));
-	}
-
       save_errno = errno;
 
-      /* Make sure we don't report an event for the exit of the
-	 original program, if we've detached from it.  */
-      if (pid != -1 && ! WIFSTOPPED (status) && pid != GET_PID (inferior_ptid))
-	{
-	  pid = -1;
-	  save_errno = EINTR;
-	}
-
       clear_sigio_trap ();
       clear_sigint_trap ();
     }
@@ -1077,8 +971,7 @@
 
   if (pid == -1)
     {
-      warning ("Child process unexpectedly missing: %s", 
-	       safe_strerror (errno));
+      warning ("Child process unexpectedly missing: %s", safe_strerror (errno));
 
       /* Claim it exited with unknown signal.  */
       ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
@@ -1128,9 +1021,8 @@
 
 	  if (debug_lin_lwp && status)
 	    fprintf_unfiltered (gdb_stdlog,
-				"LLW: Using pending wait status %s for %s.\n",
-				status_to_str (status), 
-				target_pid_to_str (lp->ptid));
+				"Using pending wait status %s for LWP %ld.\n",
+				status_to_str (status), GET_LWP (lp->ptid));
 	}
 
       /* But if we don't fine one, we'll have to wait, and check both
@@ -1142,8 +1034,8 @@
     {
       if (debug_lin_lwp)
 	fprintf_unfiltered (gdb_stdlog, 
-			    "LLW: Waiting for specific LWP %s.\n",
-			    target_pid_to_str (ptid));
+			    "Waiting for specific LWP %ld.\n",
+			    GET_LWP (ptid));
 
       /* We have a specific LWP to check.  */
       lp = find_lwp_pid (ptid);
@@ -1153,9 +1045,8 @@
 
       if (debug_lin_lwp && status)
 	fprintf_unfiltered (gdb_stdlog,
-			    "LLW: Using pending wait status %s for %s.\n",
-			    status_to_str (status), 
-			    target_pid_to_str (lp->ptid));
+			    "Using pending wait status %s for LWP %ld.\n",
+			    status_to_str (status), GET_LWP (lp->ptid));
 
       /* If we have to wait, take into account whether PID is a cloned
          process or not.  And we have to convert it to something that
@@ -1177,14 +1068,8 @@
 
       /* Resume the thread.  It should halt immediately returning the
 	 pending SIGSTOP.  */
-      registers_changed ();
       child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
                     TARGET_SIGNAL_0);
-      if (debug_lin_lwp)
-	fprintf_unfiltered (gdb_stdlog,
-			    "LLW: %s %s, 0, 0 (expect SIGSTOP)\n",
-			    lp->step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
-			    target_pid_to_str (lp->ptid));
       lp->stopped = 0;
       gdb_assert (lp->resumed);
 
@@ -1205,26 +1090,7 @@
 	{
 	  gdb_assert (pid == -1 || lwpid == pid);
 
-	  if (debug_lin_lwp)
-	    {
-	      fprintf_unfiltered (gdb_stdlog,
-				  "LLW: waitpid %ld received %s\n",
-				  (long) lwpid, 
-				  status_to_str (status));
-	    }
-
 	  lp = find_lwp_pid (pid_to_ptid (lwpid));
-
-	  /* Make sure we don't report an event for the exit of an LWP not in
-	     our list, i.e.  not part of the current process.  This can happen
-	     if we detach from a program we original forked and then it
-	     exits.  */
-	  if (! WIFSTOPPED (status) && ! lp)
-	    {
-	      status = 0;
-	      continue;
-	    }
-
 	  if (! lp)
 	    {
 	      lp = add_lwp (BUILD_LWP (lwpid, GET_PID (inferior_ptid)));
@@ -1266,7 +1132,7 @@
 		}
 	      if (debug_lin_lwp)
 		fprintf_unfiltered (gdb_stdlog, 
-				    "LLW: %s exited.\n", 
+				    "%s exited.\n", 
 				    target_pid_to_str (lp->ptid));
 
 	      delete_lwp (lp->ptid);
@@ -1281,28 +1147,19 @@
 
 	  /* Make sure we don't report a SIGSTOP that we sent
              ourselves in an attempt to stop an LWP.  */
-	  if (lp->signalled
-              && WIFSTOPPED (status)
+	  if (lp->signalled && WIFSTOPPED (status)
 	      && WSTOPSIG (status) == SIGSTOP)
 	    {
 	      if (debug_lin_lwp)
 		fprintf_unfiltered (gdb_stdlog, 
-				    "LLW: Delayed SIGSTOP caught for %s.\n",
+				    "Delayed SIGSTOP caught for %s.\n",
 				    target_pid_to_str (lp->ptid));
 
 	      /* This is a delayed SIGSTOP.  */
 	      lp->signalled = 0;
 
-	      registers_changed ();
 	      child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step,
 	                    TARGET_SIGNAL_0);
-	      if (debug_lin_lwp)
-		fprintf_unfiltered (gdb_stdlog,
-				    "LLW: %s %s, 0, 0 (discard SIGSTOP)\n",
-				    lp->step ? 
-				    "PTRACE_SINGLESTEP" : "PTRACE_CONT",
-				    target_pid_to_str (lp->ptid));
-
 	      lp->stopped = 0;
 	      gdb_assert (lp->resumed);
 
@@ -1353,14 +1210,7 @@
              other threads to run.  On the other hand, not resuming
              newly attached threads may cause an unwanted delay in
              getting them running.  */
-	  registers_changed ();
 	  child_resume (pid_to_ptid (GET_LWP (lp->ptid)), lp->step, signo);
-	  if (debug_lin_lwp)
-	    fprintf_unfiltered (gdb_stdlog,
-				"LLW: %s %s, %s (preempt 'handle')\n",
-				lp->step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
-				target_pid_to_str (lp->ptid),
-				signo ? strsignal (signo) : "0");
 	  lp->stopped = 0;
 	  status = 0;
 	  goto retry;
@@ -1381,9 +1231,8 @@
   lp->stopped = 1;
 
   if (debug_lin_lwp)
-    fprintf_unfiltered (gdb_stdlog, "LLW: Candidate event %s in %s.\n",
-			status_to_str (status), 
-			target_pid_to_str (lp->ptid));
+    fprintf_unfiltered (gdb_stdlog, "Candidate event %s in LWP %ld.\n",
+			status_to_str (status), GET_LWP (lp->ptid));
 
   /* Now stop all other LWP's ...  */
   iterate_over_lwps (stop_callback, NULL);
@@ -1411,8 +1260,8 @@
       trap_ptid = (threaded ? lp->ptid : pid_to_ptid (GET_LWP (lp->ptid)));
       if (debug_lin_lwp)
 	fprintf_unfiltered (gdb_stdlog, 
-			    "LLW: trap_ptid is %s.\n",
-			    target_pid_to_str (trap_ptid));
+			    "LLW: trap_ptid is %ld\n",
+			    GET_LWP (trap_ptid));
     }
   else
     trap_ptid = null_ptid;
@@ -1424,14 +1273,7 @@
 static int
 kill_callback (struct lwp_info *lp, void *data)
 {
-  errno = 0;
   ptrace (PTRACE_KILL, GET_LWP (lp->ptid), 0, 0);
-  if (debug_lin_lwp)
-    fprintf_unfiltered (gdb_stdlog, 
-			"KC:  PTRACE_KILL %s, 0, 0 (%s)\n",
-			target_pid_to_str (lp->ptid),
-			errno ? safe_strerror (errno) : "OK");
-
   return 0;
 }
 
@@ -1452,12 +1294,6 @@
       do
 	{
 	  pid = waitpid (GET_LWP (lp->ptid), NULL, __WCLONE);
-	  if (pid != (pid_t) -1 && debug_lin_lwp)
-	    {
-	      fprintf_unfiltered (gdb_stdlog,
-				  "KWC: wait %s received unknown.\n",
-				  target_pid_to_str (lp->ptid));
-	    }
 	}
       while (pid == GET_LWP (lp->ptid));
 
@@ -1467,12 +1303,6 @@
   do
     {
       pid = waitpid (GET_LWP (lp->ptid), NULL, 0);
-      if (pid != (pid_t) -1 && debug_lin_lwp)
-	{
-	  fprintf_unfiltered (gdb_stdlog,
-			      "KWC: wait %s received unk.\n", 
-			      target_pid_to_str (lp->ptid));
-	}
     }
   while (pid == GET_LWP (lp->ptid));
 
@@ -1539,11 +1369,6 @@
 
   errno = 0;
   ptrace (PTRACE_PEEKUSER, GET_LWP (ptid), 0, 0);
-  if (debug_lin_lwp)
-    fprintf_unfiltered (gdb_stdlog,
-			"LLTA: PTRACE_PEEKUSER %s, 0, 0 (%s)\n",
-			target_pid_to_str (ptid), 
-			errno ? safe_strerror (errno) : "OK");
   if (errno)
     return 0;
 
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 942a5ac..4c894b1 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -81,17 +81,6 @@
 				     struct symtab *s,
 				     char *q);
 
-static struct symtabs_and_lines decode_dollar (char *copy,
-					       int funfirstline,
-					       struct symtab *default_symtab,
-					       char ***canonical,
-					       struct symtab *s);
-
-static struct symtabs_and_lines decode_variable (char *copy,
-						 int funfirstline,
-						 char ***canonical,
-						 struct symtab *s);
-
 static struct
 symtabs_and_lines symbol_found (int funfirstline,
 				char ***canonical,
@@ -559,10 +548,17 @@
 decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
 	       int default_line, char ***canonical)
 {
+  struct symtabs_and_lines values;
+  struct symtab_and_line val;
   char *p;
   char *q;
   struct symtab *s = NULL;
 
+  struct symbol *sym;
+  /* The symtab that SYM was found in.  */
+  struct symtab *sym_symtab;
+
+  struct minimal_symbol *msymbol;
   char *copy;
   /* This is NULL if there are no parens in *ARGPTR, or a pointer to
      the closing parenthesis if there are parens.  */
@@ -574,6 +570,8 @@
   int is_quote_enclosed;
   char *saved_arg = *argptr;
 
+  init_sal (&val);		/* initialize to zeroes */
+
   /* Defaults have defaults.  */
 
   initialize_defaults (&default_symtab, &default_line);
@@ -707,13 +705,87 @@
      be history value, or it may be a convenience variable */
 
   if (*copy == '$')
-    return decode_dollar (copy, funfirstline, default_symtab,
-			  canonical, s);
+    {
+      struct value *valx;
+      int index = 0;
+      int need_canonical = 0;
+
+      p = (copy[1] == '$') ? copy + 2 : copy + 1;
+      while (*p >= '0' && *p <= '9')
+	p++;
+      if (!*p)			/* reached end of token without hitting non-digit */
+	{
+	  /* We have a value history reference */
+	  sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
+	  valx = access_value_history ((copy[1] == '$') ? -index : index);
+	  if (TYPE_CODE (VALUE_TYPE (valx)) != TYPE_CODE_INT)
+	    error ("History values used in line specs must have integer values.");
+	}
+      else
+	{
+	  /* Not all digits -- may be user variable/function or a
+	     convenience variable */
+
+	  /* Look up entire name as a symbol first */
+	  sym = lookup_symbol (copy, 0, VAR_NAMESPACE, 0, &sym_symtab);
+	  s = (struct symtab *) 0;
+	  need_canonical = 1;
+	  /* Symbol was found --> jump to normal symbol processing.  */
+	  if (sym)
+	    return symbol_found (funfirstline, canonical, copy, sym,
+				 NULL, sym_symtab);
+
+	  /* If symbol was not found, look in minimal symbol tables */
+	  msymbol = lookup_minimal_symbol (copy, NULL, NULL);
+	  /* Min symbol was found --> jump to minsym processing. */
+	  if (msymbol)
+	    return minsym_found (funfirstline, msymbol);
+
+	  /* Not a user variable or function -- must be convenience variable */
+	  need_canonical = (s == 0) ? 1 : 0;
+	  valx = value_of_internalvar (lookup_internalvar (copy + 1));
+	  if (TYPE_CODE (VALUE_TYPE (valx)) != TYPE_CODE_INT)
+	    error ("Convenience variables used in line specs must have integer values.");
+	}
+
+      /* Either history value or convenience value from above, in valx */
+      val.symtab = s ? s : default_symtab;
+      val.line = value_as_long (valx);
+      val.pc = 0;
+
+      values.sals = (struct symtab_and_line *) xmalloc (sizeof val);
+      values.sals[0] = val;
+      values.nelts = 1;
+
+      if (need_canonical)
+	build_canonical_line_spec (values.sals, NULL, canonical);
+
+      return values;
+    }
+
 
   /* Look up that token as a variable.
      If file specified, use that file's per-file block to start with.  */
 
-  return decode_variable (copy, funfirstline, canonical, s);
+  sym = lookup_symbol (copy,
+		       (s ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK)
+			: get_selected_block (0)),
+		       VAR_NAMESPACE, 0, &sym_symtab);
+
+  if (sym != NULL)
+    return symbol_found (funfirstline, canonical, copy, sym, s, sym_symtab);
+
+  msymbol = lookup_minimal_symbol (copy, NULL, NULL);
+
+  if (msymbol != NULL)
+    return minsym_found (funfirstline, msymbol);
+
+  if (!have_full_symbols () &&
+      !have_partial_symbols () && !have_minimal_symbols ())
+    error ("No symbol table is loaded.  Use the \"file\" command.");
+
+  error ("Function \"%s\" not defined.", copy);
+  return values;		/* for lint */
 }
 
 
@@ -1298,116 +1370,6 @@
 
 
 
-/* Decode a linespec starting with a dollar sign.  */
-
-static struct symtabs_and_lines
-decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
-	       char ***canonical, struct symtab *s)
-{
-  struct value *valx;
-  int index = 0;
-  int need_canonical = 0;
-  struct symtabs_and_lines values;
-  struct symtab_and_line val;
-  char *p;
-  struct symbol *sym;
-  /* The symtab that SYM was found in.  */
-  struct symtab *sym_symtab;
-  struct minimal_symbol *msymbol;
-
-  p = (copy[1] == '$') ? copy + 2 : copy + 1;
-  while (*p >= '0' && *p <= '9')
-    p++;
-  if (!*p)			/* reached end of token without hitting non-digit */
-    {
-      /* We have a value history reference */
-      sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
-      valx = access_value_history ((copy[1] == '$') ? -index : index);
-      if (TYPE_CODE (VALUE_TYPE (valx)) != TYPE_CODE_INT)
-	error ("History values used in line specs must have integer values.");
-    }
-  else
-    {
-      /* Not all digits -- may be user variable/function or a
-	 convenience variable */
-
-      /* Look up entire name as a symbol first */
-      sym = lookup_symbol (copy, 0, VAR_NAMESPACE, 0, &sym_symtab);
-      s = (struct symtab *) 0;
-      need_canonical = 1;
-      /* Symbol was found --> jump to normal symbol processing.  */
-      if (sym)
-	return symbol_found (funfirstline, canonical, copy, sym,
-			     NULL, sym_symtab);
-
-      /* If symbol was not found, look in minimal symbol tables */
-      msymbol = lookup_minimal_symbol (copy, NULL, NULL);
-      /* Min symbol was found --> jump to minsym processing. */
-      if (msymbol)
-	return minsym_found (funfirstline, msymbol);
-
-      /* Not a user variable or function -- must be convenience variable */
-      need_canonical = (s == 0) ? 1 : 0;
-      valx = value_of_internalvar (lookup_internalvar (copy + 1));
-      if (TYPE_CODE (VALUE_TYPE (valx)) != TYPE_CODE_INT)
-	error ("Convenience variables used in line specs must have integer values.");
-    }
-
-  init_sal (&val);
-
-  /* Either history value or convenience value from above, in valx */
-  val.symtab = s ? s : default_symtab;
-  val.line = value_as_long (valx);
-  val.pc = 0;
-
-  values.sals = (struct symtab_and_line *) xmalloc (sizeof val);
-  values.sals[0] = val;
-  values.nelts = 1;
-
-  if (need_canonical)
-    build_canonical_line_spec (values.sals, NULL, canonical);
-
-  return values;
-}
-
-
-
-/* Decode a linespec that's a variable.  If S is non-NULL,
-   look in that symtab's static variables first.  */
-
-static struct symtabs_and_lines
-decode_variable (char *copy, int funfirstline, char ***canonical,
-		 struct symtab *s)
-{
-  struct symbol *sym;
-  /* The symtab that SYM was found in.  */
-  struct symtab *sym_symtab;
-
-  struct minimal_symbol *msymbol;
-
-  sym = lookup_symbol (copy,
-		       (s ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK)
-			: get_selected_block (0)),
-		       VAR_NAMESPACE, 0, &sym_symtab);
-
-  if (sym != NULL)
-    return symbol_found (funfirstline, canonical, copy, sym, s, sym_symtab);
-
-  msymbol = lookup_minimal_symbol (copy, NULL, NULL);
-
-  if (msymbol != NULL)
-    return minsym_found (funfirstline, msymbol);
-
-  if (!have_full_symbols () &&
-      !have_partial_symbols () && !have_minimal_symbols ())
-    error ("No symbol table is loaded.  Use the \"file\" command.");
-
-  error ("Function \"%s\" not defined.", copy);
-}
-
-
-
-
 /* Now come some functions that are called from multiple places within
    decode_line_1.  */
 
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 400f0a9..eeb6335 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -426,20 +426,20 @@
 void
 m32r_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset)
 {
-  struct frame_info *fi = deprecated_frame_xmalloc ();
-  struct cleanup *old_chain = make_cleanup (xfree, fi);
+  struct frame_info fi;
 
   /* Set up a dummy frame_info. */
-  fi->next = NULL;
-  fi->prev = NULL;
-  fi->frame = 0;
-  fi->pc = pc;
+  fi.next = NULL;
+  fi.prev = NULL;
+  fi.frame = 0;
+  fi.pc = pc;
 
   /* Analyze the prolog and fill in the extra info.  */
-  m32r_init_extra_frame_info (fi);
+  m32r_init_extra_frame_info (&fi);
+
 
   /* Results will tell us which type of frame it uses.  */
-  if (fi->using_frame_pointer)
+  if (fi.using_frame_pointer)
     {
       *reg = FP_REGNUM;
       *offset = 0;
@@ -449,7 +449,6 @@
       *reg = SP_REGNUM;
       *offset = 0;
     }
-  do_cleanups (old_chain);
 }
 
 /* Function: find_callers_reg
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 69c54d1..7b2dc43 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for Motorola 68HC11 & 68HC12
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Stephane Carrez, stcarrez@nerim.fr
 
 This file is part of GDB.
@@ -401,7 +401,7 @@
 static CORE_ADDR
 m68hc11_frame_saved_pc (struct frame_info *frame)
 {
-  return get_frame_extra_info (frame)->return_pc;
+  return frame->extra_info->return_pc;
 }
 
 static CORE_ADDR
@@ -409,10 +409,10 @@
 {
   CORE_ADDR addr;
 
-  addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION + 2;
-  if (get_frame_extra_info (frame)->return_kind == RETURN_RTC)
+  addr = frame->frame + frame->extra_info->size + STACK_CORRECTION + 2;
+  if (frame->extra_info->return_kind == RETURN_RTC)
     addr += 1;
-  else if (get_frame_extra_info (frame)->return_kind == RETURN_RTI)
+  else if (frame->extra_info->return_kind == RETURN_RTI)
     addr += 7;
 
   return addr;
@@ -421,7 +421,7 @@
 static CORE_ADDR
 m68hc11_frame_locals_address (struct frame_info *frame)
 {
-  return get_frame_base (frame);
+  return frame->frame;
 }
 
 /* Discard from the stack the innermost frame, restoring all saved
@@ -434,9 +434,7 @@
   register CORE_ADDR fp, sp;
   register int regnum;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     generic_pop_dummy_frame ();
   else
     {
@@ -445,12 +443,12 @@
 
       /* Copy regs from where they were saved in the frame.  */
       for (regnum = 0; regnum < M68HC11_ALL_REGS; regnum++)
-	if (get_frame_saved_regs (frame)[regnum])
+	if (frame->saved_regs[regnum])
 	  write_register (regnum,
-                          read_memory_integer (get_frame_saved_regs (frame)[regnum], 2));
+                          read_memory_integer (frame->saved_regs[regnum], 2));
 
-      write_register (HARD_PC_REGNUM, get_frame_extra_info (frame)->return_pc);
-      sp = (fp + get_frame_extra_info (frame)->size + 2) & 0x0ffff;
+      write_register (HARD_PC_REGNUM, frame->extra_info->return_pc);
+      sp = (fp + frame->extra_info->size + 2) & 0x0ffff;
       write_register (HARD_SP_REGNUM, sp);
     }
   flush_cached_frames ();
@@ -814,21 +812,19 @@
 {
   CORE_ADDR addr;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
-    return get_frame_base (frame);	/* dummy frame same as caller's frame */
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return frame->frame;	/* dummy frame same as caller's frame */
 
-  if (get_frame_extra_info (frame)->return_pc == 0
-      || inside_entry_file (get_frame_extra_info (frame)->return_pc))
+  if (frame->extra_info->return_pc == 0
+      || inside_entry_file (frame->extra_info->return_pc))
     return (CORE_ADDR) 0;
 
-  if (get_frame_base (frame) == 0)
+  if (frame->frame == 0)
     {
       return (CORE_ADDR) 0;
     }
 
-  addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION - 2;
+  addr = frame->frame + frame->extra_info->size + STACK_CORRECTION - 2;
   addr = read_memory_unsigned_integer (addr, 2) & 0x0FFFF;
   return addr;
 }  
@@ -844,37 +840,36 @@
   CORE_ADDR pc;
   CORE_ADDR addr;
 
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
   else
-    memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
+    memset (fi->saved_regs, 0, sizeof (fi->saved_regs));
 
-  pc = get_frame_pc (fi);
-  get_frame_extra_info (fi)->return_kind = m68hc11_get_return_insn (pc);
-  m68hc11_guess_from_prologue (pc, get_frame_base (fi), &pc,
-			       &get_frame_extra_info (fi)->size,
-                               get_frame_saved_regs (fi));
+  pc = fi->pc;
+  fi->extra_info->return_kind = m68hc11_get_return_insn (pc);
+  m68hc11_guess_from_prologue (pc, fi->frame, &pc, &fi->extra_info->size,
+                               fi->saved_regs);
 
-  addr = get_frame_base (fi) + get_frame_extra_info (fi)->size + STACK_CORRECTION;
+  addr = fi->frame + fi->extra_info->size + STACK_CORRECTION;
   if (soft_regs[SOFT_FP_REGNUM].name)
-    get_frame_saved_regs (fi)[SOFT_FP_REGNUM] = addr - 2;
+    fi->saved_regs[SOFT_FP_REGNUM] = addr - 2;
 
   /* Take into account how the function was called/returns.  */
-  if (get_frame_extra_info (fi)->return_kind == RETURN_RTC)
+  if (fi->extra_info->return_kind == RETURN_RTC)
     {
-      get_frame_saved_regs (fi)[HARD_PAGE_REGNUM] = addr;
+      fi->saved_regs[HARD_PAGE_REGNUM] = addr;
       addr++;
     }
-  else if (get_frame_extra_info (fi)->return_kind == RETURN_RTI)
+  else if (fi->extra_info->return_kind == RETURN_RTI)
     {
-      get_frame_saved_regs (fi)[HARD_CCR_REGNUM] = addr;
-      get_frame_saved_regs (fi)[HARD_D_REGNUM] = addr + 1;
-      get_frame_saved_regs (fi)[HARD_X_REGNUM] = addr + 3;
-      get_frame_saved_regs (fi)[HARD_Y_REGNUM] = addr + 5;
+      fi->saved_regs[HARD_CCR_REGNUM] = addr;
+      fi->saved_regs[HARD_D_REGNUM] = addr + 1;
+      fi->saved_regs[HARD_X_REGNUM] = addr + 3;
+      fi->saved_regs[HARD_Y_REGNUM] = addr + 5;
       addr += 7;
     }
-  get_frame_saved_regs (fi)[HARD_SP_REGNUM] = addr;
-  get_frame_saved_regs (fi)[HARD_PC_REGNUM] = get_frame_saved_regs (fi)[HARD_SP_REGNUM];
+  fi->saved_regs[HARD_SP_REGNUM] = addr;
+  fi->saved_regs[HARD_PC_REGNUM] = fi->saved_regs[HARD_SP_REGNUM];
 }
 
 static void
@@ -882,36 +877,37 @@
 {
   CORE_ADDR addr;
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
   
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
   
   m68hc11_frame_init_saved_regs (fi);
 
   if (fromleaf)
     {
-      get_frame_extra_info (fi)->return_kind = m68hc11_get_return_insn (get_frame_pc (fi));
-      get_frame_extra_info (fi)->return_pc = m68hc11_saved_pc_after_call (fi);
+      fi->extra_info->return_kind = m68hc11_get_return_insn (fi->pc);
+      fi->extra_info->return_pc = m68hc11_saved_pc_after_call (fi);
     }
   else
     {
-      addr = get_frame_saved_regs (fi)[HARD_PC_REGNUM];
+      addr = fi->saved_regs[HARD_PC_REGNUM];
       addr = read_memory_unsigned_integer (addr, 2) & 0x0ffff;
 
       /* Take into account the 68HC12 specific call (PC + page).  */
-      if (get_frame_extra_info (fi)->return_kind == RETURN_RTC
+      if (fi->extra_info->return_kind == RETURN_RTC
           && addr >= 0x08000 && addr < 0x0c000
           && USE_PAGE_REGISTER)
         {
-          CORE_ADDR page_addr = get_frame_saved_regs (fi)[HARD_PAGE_REGNUM];
+          CORE_ADDR page_addr = fi->saved_regs[HARD_PAGE_REGNUM];
 
           unsigned page = read_memory_unsigned_integer (page_addr, 1);
           addr -= 0x08000;
           addr += ((page & 0x0ff) << 14);
           addr += 0x1000000;
         }
-      get_frame_extra_info (fi)->return_pc = addr;
+      fi->extra_info->return_pc = addr;
     }
 }
 
@@ -1335,12 +1331,14 @@
 
 
   set_gdbarch_frame_chain (gdbarch, m68hc11_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
   set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
   set_gdbarch_frame_locals_address (gdbarch, m68hc11_frame_locals_address);
   set_gdbarch_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
 
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
 
   set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 182cac6..8735e07 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -1,6 +1,5 @@
 /* Target dependent code for the Motorola 68000 series.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
-   2002, 2003
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -258,9 +257,9 @@
 m68k_frame_chain (struct frame_info *thisframe)
 {
   if (get_frame_type (thisframe) == SIGTRAMP_FRAME)
-    return get_frame_base (thisframe);
-  else if (!inside_entry_file (get_frame_pc (thisframe)))
-    return read_memory_unsigned_integer (get_frame_base (thisframe), 4);
+    return thisframe->frame;
+  else if (!inside_entry_file (thisframe->pc))
+    return read_memory_unsigned_integer (thisframe->frame, 4);
   else
     return 0;
 }
@@ -283,15 +282,15 @@
 {
   if (get_frame_type (frame) == SIGTRAMP_FRAME)
     {
-      if (get_next_frame (frame))
-	return read_memory_unsigned_integer (get_frame_base (get_next_frame (frame))
+      if (frame->next)
+	return read_memory_unsigned_integer (frame->next->frame
 					     + SIG_PC_FP_OFFSET, 4);
       else
 	return read_memory_unsigned_integer (read_register (SP_REGNUM)
 					     + SIG_PC_FP_OFFSET - 8, 4);
     }
   else
-    return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
+    return read_memory_unsigned_integer (frame->frame + 4, 4);
 }
 
 
@@ -332,17 +331,17 @@
   /* we assume here that the only frameless functions are the system calls
      or other functions who do not put anything on the stack. */
   if (get_frame_type (frame_info) == SIGTRAMP_FRAME)
-    return get_frame_base (frame_info) + 12;
+    return frame_info->frame + 12;
   else if (frameless_look_for_prologue (frame_info))
     {
       /* Check for an interrupted system call */
-      if (get_next_frame (frame_info) && (get_frame_type (get_next_frame (frame_info)) == SIGTRAMP_FRAME))
-	return get_frame_base (get_next_frame (frame_info)) + 16;
+      if (frame_info->next && (get_frame_type (frame_info->next) == SIGTRAMP_FRAME))
+	return frame_info->next->frame + 16;
       else
-	return get_frame_base (frame_info) + 4;
+	return frame_info->frame + 4;
     }
   else
-    return get_frame_base (frame_info);
+    return frame_info->frame;
 }
 
 CORE_ADDR
@@ -479,25 +478,25 @@
   m68k_frame_init_saved_regs (frame);
   for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
     {
-      if (get_frame_saved_regs (frame)[regnum])
+      if (frame->saved_regs[regnum])
 	{
-	  read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer, 12);
+	  read_memory (frame->saved_regs[regnum], raw_buffer, 12);
 	  deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
 					   12);
 	}
     }
   for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
     {
-      if (get_frame_saved_regs (frame)[regnum])
+      if (frame->saved_regs[regnum])
 	{
 	  write_register (regnum,
-			  read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
+			  read_memory_integer (frame->saved_regs[regnum], 4));
 	}
     }
-  if (get_frame_saved_regs (frame)[PS_REGNUM])
+  if (frame->saved_regs[PS_REGNUM])
     {
       write_register (PS_REGNUM,
-		      read_memory_integer (get_frame_saved_regs (frame)[PS_REGNUM], 4));
+		      read_memory_integer (frame->saved_regs[PS_REGNUM], 4));
     }
   write_register (FP_REGNUM, read_memory_integer (fp, 4));
   write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -589,19 +588,19 @@
 
   /* First possible address for a pc in a call dummy for this frame.  */
   CORE_ADDR possible_call_dummy_start =
-    get_frame_base (frame_info) - 28 - FP_REGNUM * 4 - 4 - 8 * 12;
+    frame_info->frame - 28 - FP_REGNUM * 4 - 4 - 8 * 12;
 
   int nextinsn;
 
-  if (get_frame_saved_regs (frame_info))
+  if (frame_info->saved_regs)
     return;
 
   frame_saved_regs_zalloc (frame_info);
 
-  memset (get_frame_saved_regs (frame_info), 0, SIZEOF_FRAME_SAVED_REGS);
+  memset (frame_info->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
 
-  if (get_frame_pc (frame_info) >= possible_call_dummy_start
-      && get_frame_pc (frame_info) <= get_frame_base (frame_info))
+  if (frame_info->pc >= possible_call_dummy_start
+      && frame_info->pc <= frame_info->frame)
     {
 
       /* It is a call dummy.  We could just stop now, since we know
@@ -609,12 +608,12 @@
          to parse the "prologue" which is part of the call dummy.
          This is needlessly complex and confusing.  FIXME.  */
 
-      next_addr = get_frame_base (frame_info);
+      next_addr = frame_info->frame;
       pc = possible_call_dummy_start;
     }
   else
     {
-      pc = get_pc_function_start (get_frame_pc (frame_info));
+      pc = get_pc_function_start (frame_info->pc);
 
       nextinsn = read_memory_unsigned_integer (pc, 2);
       if (P_PEA_FP == nextinsn
@@ -622,7 +621,7 @@
 	{
 	  /* pea %fp
 	     move.l %sp, %fp */
-	  next_addr = get_frame_base (frame_info);
+	  next_addr = frame_info->frame;
 	  pc += 4;
 	}
       else if (P_LINKL_FP == nextinsn)
@@ -630,7 +629,7 @@
 	/* Find the address above the saved   
 	   regs using the amount of storage from the link instruction.  */
 	{
-	  next_addr = get_frame_base (frame_info) + read_memory_integer (pc + 2, 4);
+	  next_addr = frame_info->frame + read_memory_integer (pc + 2, 4);
 	  pc += 6;
 	}
       else if (P_LINKW_FP == nextinsn)
@@ -638,7 +637,7 @@
 	/* Find the address above the saved   
 	   regs using the amount of storage from the link instruction.  */
 	{
-	  next_addr = get_frame_base (frame_info) + read_memory_integer (pc + 2, 2);
+	  next_addr = frame_info->frame + read_memory_integer (pc + 2, 2);
 	  pc += 4;
 	}
       else
@@ -659,7 +658,7 @@
 	  /* Regmask's low bit is for register fp7, the first pushed */
 	  for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
 	    if (regmask & 1)
-	      get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 12);
+	      frame_info->saved_regs[regnum] = (next_addr -= 12);
 	  pc += 4;
 	}
       /* fmovemx to (fp + displacement) */
@@ -667,12 +666,12 @@
 	{
 	  register CORE_ADDR addr;
 
-	  addr = get_frame_base (frame_info) + read_memory_integer (pc + 4, 2);
+	  addr = frame_info->frame + read_memory_integer (pc + 4, 2);
 	  /* Regmask's low bit is for register fp7, the first pushed */
 	  for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		get_frame_saved_regs (frame_info)[regnum] = addr;
+		frame_info->saved_regs[regnum] = addr;
 		addr += 12;
 	      }
 	  pc += 6;
@@ -684,7 +683,7 @@
 	  for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		get_frame_saved_regs (frame_info)[regnum] = next_addr;
+		frame_info->saved_regs[regnum] = next_addr;
 		next_addr += 4;
 	      }
 	  pc += 4;
@@ -694,12 +693,12 @@
 	{
 	  register CORE_ADDR addr;
 
-	  addr = get_frame_base (frame_info) + read_memory_integer (pc + 4, 2);
+	  addr = frame_info->frame + read_memory_integer (pc + 4, 2);
 	  /* Regmask's low bit is for register 0, the first written */
 	  for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		get_frame_saved_regs (frame_info)[regnum] = addr;
+		frame_info->saved_regs[regnum] = addr;
 		addr += 4;
 	      }
 	  pc += 6;
@@ -710,14 +709,14 @@
 	  /* Regmask's low bit is for register 15, the first pushed */
 	  for (regnum = 16; --regnum >= 0; regmask >>= 1)
 	    if (regmask & 1)
-	      get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 4);
+	      frame_info->saved_regs[regnum] = (next_addr -= 4);
 	  pc += 4;
 	}
       /* movl r,-(sp) */
       else if (0x2f00 == (0xfff0 & nextinsn))
 	{
 	  regnum = 0xf & nextinsn;
-	  get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 4);
+	  frame_info->saved_regs[regnum] = (next_addr -= 4);
 	  pc += 2;
 	}
       /* fmovemx to index of sp */
@@ -727,7 +726,7 @@
 	  for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		get_frame_saved_regs (frame_info)[regnum] = next_addr;
+		frame_info->saved_regs[regnum] = next_addr;
 		next_addr += 12;
 	      }
 	  pc += 10;
@@ -735,16 +734,16 @@
       /* clrw -(sp); movw ccr,-(sp) */
       else if (0x4267 == nextinsn && 0x42e7 == regmask)
 	{
-	  get_frame_saved_regs (frame_info)[PS_REGNUM] = (next_addr -= 4);
+	  frame_info->saved_regs[PS_REGNUM] = (next_addr -= 4);
 	  pc += 4;
 	}
       else
 	break;
     }
 lose:;
-  get_frame_saved_regs (frame_info)[SP_REGNUM] = get_frame_base (frame_info) + 8;
-  get_frame_saved_regs (frame_info)[FP_REGNUM] = get_frame_base (frame_info);
-  get_frame_saved_regs (frame_info)[PC_REGNUM] = get_frame_base (frame_info) + 4;
+  frame_info->saved_regs[SP_REGNUM] = (frame_info)->frame + 8;
+  frame_info->saved_regs[FP_REGNUM] = (frame_info)->frame;
+  frame_info->saved_regs[PC_REGNUM] = (frame_info)->frame + 4;
 #ifdef SIG_SP_FP_OFFSET
   /* Adjust saved SP_REGNUM for fake _sigtramp frames.  */
   if ((get_frame_type (frame_info) == SIGTRAMP_FRAME) && frame_info->next)
@@ -1011,6 +1010,7 @@
   set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
 
   set_gdbarch_frame_chain (gdbarch, m68k_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, m68k_frame_saved_pc);
   set_gdbarch_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
   set_gdbarch_frameless_function_invocation (gdbarch,
diff --git a/gdb/maint.c b/gdb/maint.c
index db7d42d..92f9a16 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -151,17 +151,7 @@
     }
   else
     {
-      switch (current_language->la_language)
-	{
-	case language_objc:
-	  /* Commented out until ObjC handling is enabled. */
-	  /* demangled = objc_demangle (args); */
-	  /* break; */
-	case language_cplus:
-	default:
-	  demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
-	  break;
-	}
+      demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
       if (demangled != NULL)
 	{
 	  printf_unfiltered ("%s\n", demangled);
@@ -661,7 +651,7 @@
 		  "Commands for use by GDB maintainers.\n\
 Includes commands to dump specific internal GDB structures in\n\
 a human readable form, to cause GDB to deliberately dump core,\n\
-to test internal functions such as the C++/ObjC demangler, etc.",
+to test internal functions such as the C++ demangler, etc.",
 		  &maintenancelist, "maintenance ", 0,
 		  &cmdlist);
 
@@ -723,7 +713,7 @@
 	   &maintenancelist);
 
   add_cmd ("demangle", class_maintenance, maintenance_demangle,
-	   "Demangle a C++/ObjC mangled name.\n\
+	   "Demangle a C++ mangled name.\n\
 Call internal GDB demangler routine to demangle a C++ link name\n\
 and prints the result.",
 	   &maintenancelist);
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 134f9dd..ae2821f 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1,5 +1,5 @@
 /* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -289,22 +289,19 @@
 
   if (dummy == NULL)
     {
-      struct frame_extra_info *extra_info;
-      CORE_ADDR *saved_regs;
-      dummy = deprecated_frame_xmalloc ();
-      saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
-      deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
-      extra_info = XMALLOC (struct frame_extra_info);
-      deprecated_set_frame_extra_info_hack (dummy, extra_info);
+      dummy = (struct frame_info *) xmalloc (sizeof (struct frame_info));
+      dummy->saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
+      dummy->extra_info =
+	(struct frame_extra_info *) xmalloc (sizeof (struct frame_extra_info));
     }
 
-  deprecated_set_frame_next_hack (dummy, NULL);
-  deprecated_set_frame_prev_hack (dummy, NULL);
-  deprecated_update_frame_pc_hack (dummy, pc);
-  deprecated_update_frame_base_hack (dummy, frame);
-  get_frame_extra_info (dummy)->status = 0;
-  get_frame_extra_info (dummy)->framesize = 0;
-  memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
+  dummy->next = NULL;
+  dummy->prev = NULL;
+  dummy->pc = pc;
+  dummy->frame = frame;
+  dummy->extra_info->status = 0;
+  dummy->extra_info->framesize = 0;
+  memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS);
   mcore_analyze_prologue (dummy, 0, 0);
   return dummy;
 }
@@ -348,7 +345,7 @@
 
   /* If provided, use the PC in the frame to look up the
      start of this function. */
-  pc = (fi == NULL ? pc : get_frame_pc (fi));
+  pc = (fi == NULL ? pc : fi->pc);
 
   /* Find the start of this function. */
   status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
@@ -362,7 +359,7 @@
   if (func_addr == entry_point_address ())
     {
       if (fi != NULL)
-	get_frame_extra_info (fi)->status |= NO_MORE_FRAMES;
+	fi->extra_info->status |= NO_MORE_FRAMES;
       return pc;
     }
 
@@ -387,21 +384,21 @@
   if (fi != NULL && IS_RTS (insn))
     {
       mcore_insn_debug (("MCORE: got jmp r15"));
-      if (get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, read_sp ());
-      return get_frame_pc (fi);
+      if (fi->next == NULL)
+	fi->frame = read_sp ();
+      return fi->pc;
     }
 
   /* Check for first insn of prologue */
-  if (fi != NULL && get_frame_pc (fi) == func_addr)
+  if (fi != NULL && fi->pc == func_addr)
     {
-      if (get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, read_sp ());
-      return get_frame_pc (fi);
+      if (fi->next == NULL)
+	fi->frame = read_sp ();
+      return fi->pc;
     }
 
   /* Figure out where to stop scanning */
-  stop = (fi ? get_frame_pc (fi) : func_end);
+  stop = (fi ? fi->pc : func_end);
 
   /* Don't walk off the end of the function */
   stop = (stop > func_end ? func_end : stop);
@@ -608,19 +605,19 @@
   /* Save everything we have learned about this frame into FI. */
   if (fi != NULL)
     {
-      get_frame_extra_info (fi)->framesize = framesize;
-      get_frame_extra_info (fi)->fp_regnum = fp_regnum;
-      get_frame_extra_info (fi)->status = flags;
+      fi->extra_info->framesize = framesize;
+      fi->extra_info->fp_regnum = fp_regnum;
+      fi->extra_info->status = flags;
 
       /* Fix the frame pointer. When gcc uses r8 as a frame pointer,
          it is really an arg ptr. We adjust fi->frame to be a "real"
          frame pointer. */
-      if (get_next_frame (fi) == NULL)
+      if (fi->next == NULL)
 	{
-	  if (get_frame_extra_info (fi)->status & MY_FRAME_IN_SP)
-	    deprecated_update_frame_base_hack (fi, read_sp () + framesize);
+	  if (fi->extra_info->status & MY_FRAME_IN_SP)
+	    fi->frame = read_sp () + framesize;
 	  else
-	    deprecated_update_frame_base_hack (fi, read_register (fp_regnum) + framesize);
+	    fi->frame = read_register (fp_regnum) + framesize;
 	}
 
       /* Note where saved registers are stored. The offsets in REGISTER_OFFSETS
@@ -629,7 +626,7 @@
 	{
 	  if (register_offsets[rn] >= 0)
 	    {
-	      get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - register_offsets[rn];
+	      fi->saved_regs[rn] = fi->frame - register_offsets[rn];
 	      mcore_insn_debug (("Saved register %s stored at 0x%08x, value=0x%08x\n",
 			       mcore_register_names[rn], fi->saved_regs[rn],
 			      read_memory_integer (fi->saved_regs[rn], 4)));
@@ -653,11 +650,11 @@
   CORE_ADDR callers_addr;
 
   /* Analyze the prologue of this function. */
-  if (get_frame_extra_info (fi)->status == 0)
+  if (fi->extra_info->status == 0)
     mcore_analyze_prologue (fi, 0, 0);
 
   /* If mcore_analyze_prologue set NO_MORE_FRAMES, quit now. */
-  if (get_frame_extra_info (fi)->status & NO_MORE_FRAMES)
+  if (fi->extra_info->status & NO_MORE_FRAMES)
     return 0;
 
   /* Now that we've analyzed our prologue, we can start to ask
@@ -671,31 +668,31 @@
 
      If our caller does not have a frame pointer, then his frame base
      is <our base> + -<caller's frame size>. */
-  dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), get_frame_base (fi));
+  dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), fi->frame);
 
-  if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_FP)
+  if (dummy->extra_info->status & MY_FRAME_IN_FP)
     {
-      int fp = get_frame_extra_info (dummy)->fp_regnum;
+      int fp = dummy->extra_info->fp_regnum;
 
       /* Our caller has a frame pointer. */
-      if (get_frame_saved_regs (fi)[fp] != 0)
+      if (fi->saved_regs[fp] != 0)
 	{
 	  /* The "FP" was saved on the stack.  Don't forget to adjust
 	     the "FP" with the framesize to get a real FP. */
-	  callers_addr = read_memory_integer (get_frame_saved_regs (fi)[fp], REGISTER_SIZE)
-	    + get_frame_extra_info (dummy)->framesize;
+	  callers_addr = read_memory_integer (fi->saved_regs[fp], REGISTER_SIZE)
+	    + dummy->extra_info->framesize;
 	}
       else
 	{
 	  /* It's still in the register.  Don't forget to adjust
 	     the "FP" with the framesize to get a real FP. */
-	  callers_addr = read_register (fp) + get_frame_extra_info (dummy)->framesize;
+	  callers_addr = read_register (fp) + dummy->extra_info->framesize;
 	}
     }
   else
     {
       /* Our caller does not have a frame pointer. */
-      callers_addr = get_frame_base (fi) + get_frame_extra_info (dummy)->framesize;
+      callers_addr = fi->frame + dummy->extra_info->framesize;
     }
 
   return callers_addr;
@@ -726,13 +723,13 @@
 CORE_ADDR
 mcore_frame_args_address (struct frame_info * fi)
 {
-  return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
+  return fi->frame - fi->extra_info->framesize;
 }
 
 CORE_ADDR
 mcore_frame_locals_address (struct frame_info * fi)
 {
-  return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
+  return fi->frame - fi->extra_info->framesize;
 }
 
 /* Return the frame pointer in use at address PC. */
@@ -741,14 +738,14 @@
 mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
 {
   struct frame_info *dummy = analyze_dummy_frame (pc, 0);
-  if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_SP)
+  if (dummy->extra_info->status & MY_FRAME_IN_SP)
     {
       *reg = SP_REGNUM;
       *offset = 0;
     }
   else
     {
-      *reg = get_frame_extra_info (dummy)->fp_regnum;
+      *reg = dummy->extra_info->fp_regnum;
       *offset = 0;
     }
 }
@@ -758,14 +755,12 @@
 CORE_ADDR
 mcore_find_callers_reg (struct frame_info *fi, int regnum)
 {
-  for (; fi != NULL; fi = get_next_frame (fi))
+  for (; fi != NULL; fi = fi->next)
     {
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				       get_frame_base (fi)))
-	return deprecated_read_register_dummy (get_frame_pc (fi),
-					       get_frame_base (fi), regnum);
-      else if (get_frame_saved_regs (fi)[regnum] != 0)
-	return read_memory_integer (get_frame_saved_regs (fi)[regnum],
+      if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+	return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
+      else if (fi->saved_regs[regnum] != 0)
+	return read_memory_integer (fi->saved_regs[regnum],
 				    REGISTER_SIZE);
     }
 
@@ -778,10 +773,8 @@
 mcore_frame_saved_pc (struct frame_info * fi)
 {
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
-    return deprecated_read_register_dummy (get_frame_pc (fi),
-					   get_frame_base (fi), PC_REGNUM);
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+    return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
   else
     return mcore_find_callers_reg (fi, PR_REGNUM);
 }
@@ -797,8 +790,7 @@
   int rn;
   struct frame_info *fi = get_current_frame ();
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     generic_pop_dummy_frame ();
   else
     {
@@ -808,11 +800,11 @@
       /* Restore any saved registers. */
       for (rn = 0; rn < NUM_REGS; rn++)
 	{
-	  if (get_frame_saved_regs (fi)[rn] != 0)
+	  if (fi->saved_regs[rn] != 0)
 	    {
 	      ULONGEST value;
 
-	      value = read_memory_unsigned_integer (get_frame_saved_regs (fi)[rn],
+	      value = read_memory_unsigned_integer (fi->saved_regs[rn],
 						    REGISTER_SIZE);
 	      write_register (rn, value);
 	    }
@@ -1046,21 +1038,21 @@
 void
 mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  if (fi && get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi && fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
   frame_saved_regs_zalloc (fi);
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
-  get_frame_extra_info (fi)->status = 0;
-  get_frame_extra_info (fi)->framesize = 0;
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
+  fi->extra_info->status = 0;
+  fi->extra_info->framesize = 0;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
          by assuming it's always FP.  */
-      deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), SP_REGNUM));
+      fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, SP_REGNUM);
     }
   else
     mcore_analyze_prologue (fi, 0, 0);
@@ -1139,6 +1131,7 @@
 
   set_gdbarch_init_extra_frame_info (gdbarch, mcore_init_extra_frame_info);
   set_gdbarch_frame_chain (gdbarch, mcore_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
   set_gdbarch_frame_init_saved_regs (gdbarch, mcore_frame_init_saved_regs);
   set_gdbarch_frame_saved_pc (gdbarch, mcore_frame_saved_pc);
   set_gdbarch_deprecated_store_return_value (gdbarch, mcore_store_return_value);
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index bd0e124..f6ec396 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1,6 +1,6 @@
 /* Read a symbol table in ECOFF format (Third-Eye).
    Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 1998, 1999, 2000, 2001, 2002, 2003
+   1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Original version contributed by Alessandro Forin (af@cs.cmu.edu) at
    CMU.  Major work by Per Bothner, John Gilmore and Ian Lance Taylor
@@ -751,38 +751,6 @@
 
     case stProc:		/* Procedure, usually goes into global block */
     case stStaticProc:		/* Static procedure, goes into current block */
-      /* For stProc symbol records, we need to check the storage class
-         as well, as only (stProc, scText) entries represent "real"
-         procedures - See the Compaq document titled "Object File /
-         Symbol Table Format Specification" for more information.
-         If the storage class is not scText, we discard the whole block
-         of symbol records for this stProc.  */
-      if (sh->st == stProc && sh->sc != scText)
-        {
-          char *ext_tsym = ext_sh;
-          int keep_counting = 1;
-          SYMR tsym;
-
-          while (keep_counting)
-            {
-              ext_tsym += external_sym_size;
-              (*swap_sym_in) (cur_bfd, ext_tsym, &tsym);
-              count++;
-              switch (tsym.st)
-                {
-                  case stParam:
-                    break;
-                  case stEnd:
-                    keep_counting = 0;
-                    break;
-                  default:
-                    complaint (&symfile_complaints,
-                               "unknown symbol type 0x%x", sh->st);
-                    break;
-                }
-            }
-          break;
-        }
       s = new_symbol (name);
       SYMBOL_NAMESPACE (s) = VAR_NAMESPACE;
       SYMBOL_CLASS (s) = LOC_BLOCK;
@@ -827,11 +795,6 @@
       /* Make a type for the procedure itself */
       SYMBOL_TYPE (s) = lookup_function_type (t);
 
-      /* All functions in C++ have prototypes.  For C we don't have enough
-         information in the debug info.  */
-      if (SYMBOL_LANGUAGE (s) == language_cplus)
-	TYPE_FLAGS (SYMBOL_TYPE (s)) |= TYPE_FLAG_PROTOTYPED;
-
       /* Create and enter a new lexical context */
       b = new_block (top_stack->maxsyms);
       SYMBOL_BLOCK_VALUE (s) = b;
@@ -902,24 +865,7 @@
 	    switch (tsym.st)
 	      {
 	      case stEnd:
-                /* C++ encodes class types as structures where there the
-                   methods are encoded as stProc. The scope of stProc
-                   symbols also ends with stEnd, thus creating a risk of
-                   taking the wrong stEnd symbol record as the end of
-                   the current struct, which would cause GDB to undercount
-                   the real number of fields in this struct.  To make sure
-                   we really reached the right stEnd symbol record, we
-                   check the associated name, and match it against the
-                   struct name.  Since method names are mangled while
-                   the class name is not, there is no risk of having a
-                   method whose name is identical to the class name
-                   (in particular constructor method names are different
-                   from the class name).  There is therefore no risk that
-                   this check stops the count on the StEnd of a method.  */
-                if (strcmp (debug_info->ss + cur_fdr->issBase + tsym.iss,
-                            name) == 0)
-                  goto end_of_fields;
-                break;
+		goto end_of_fields;
 
 	      case stMember:
 		if (nfields == 0 && type_code == TYPE_CODE_UNDEF)
@@ -3360,39 +3306,6 @@
 		  /* FALLTHROUGH */
 
 		case stProc:
-		  /* Ignore all parameter symbol records.  */
-		  if (sh.index >= hdr->iauxMax)
-		    {
-		      /* Should not happen, but does when cross-compiling
-		         with the MIPS compiler.  FIXME -- pull later.  */
-		      index_complaint (name);
-		      new_sdx = cur_sdx + 1;	/* Don't skip at all */
-		    }
-		  else
-		    new_sdx = AUX_GET_ISYM (fh->fBigendian,
-					    (debug_info->external_aux
-					     + fh->iauxBase
-					     + sh.index));
-
-		  if (new_sdx <= cur_sdx)
-		    {
-		      /* This should not happen either... FIXME.  */
-		      complaint (&symfile_complaints,
-				 "bad proc end in aux found from symbol %s",
-				 name);
-		      new_sdx = cur_sdx + 1;	/* Don't skip backward */
-		    }
-
-                  /* For stProc symbol records, we need to check the
-                     storage class as well, as only (stProc, scText)
-                     entries represent "real" procedures - See the
-                     Compaq document titled "Object File / Symbol Table
-                     Format Specification" for more information.  If the
-                     storage class is not scText, we discard the whole
-                     block of symbol records for this stProc.  */
-                  if (sh.st == stProc && sh.sc != scText)
-                    goto skip;
-
 		  /* Usually there is a local and a global stProc symbol
 		     for a function. This means that the function name
 		     has already been entered into the mimimal symbol table
@@ -3415,8 +3328,30 @@
 					 &objfile->static_psymbols,
 				    0, sh.value, psymtab_language, objfile);
 
+		  /* Skip over procedure to next one. */
+		  if (sh.index >= hdr->iauxMax)
+		    {
+		      /* Should not happen, but does when cross-compiling
+		         with the MIPS compiler.  FIXME -- pull later.  */
+		      index_complaint (name);
+		      new_sdx = cur_sdx + 1;	/* Don't skip at all */
+		    }
+		  else
+		    new_sdx = AUX_GET_ISYM (fh->fBigendian,
+					    (debug_info->external_aux
+					     + fh->iauxBase
+					     + sh.index));
 		  procaddr = sh.value;
 
+		  if (new_sdx <= cur_sdx)
+		    {
+		      /* This should not happen either... FIXME.  */
+		      complaint (&symfile_complaints,
+				 "bad proc end in aux found from symbol %s",
+				 name);
+		      new_sdx = cur_sdx + 1;	/* Don't skip backward */
+		    }
+
 		  cur_sdx = new_sdx;
 		  (*swap_sym_in) (cur_bfd,
 				  ((char *) debug_info->external_sym
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 7bc2ce8..18f50bb 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,8 +1,3 @@
-2003-01-09  Andrew Cagney  <ac131313@redhat.com>
-
-	* mi-cmd-env.c: Include "gdb_string.h" instead of <string.h>.
-	Move all includes to after "defs.h".
-
 2002-12-13  Jeff Johnston  <jjohnstn@redhat.com>
 
 	* mi-cmds.c (-environment-directory) Change to use mi_cmd_env_dir,
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index a8b4afd..104a73b 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -19,6 +19,9 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <string.h>
+#include <sys/stat.h>
+
 #include "defs.h"
 #include "inferior.h"
 #include "value.h"
@@ -32,9 +35,6 @@
 #include "ui-out.h"
 #include "top.h"
 
-#include "gdb_string.h"
-#include <sys/stat.h>
-
 static void env_cli_command (const char *cli, char *args);
 static void env_mod_path (char *dirname, char **which_path);
 extern void _initialize_mi_cmd_env (void);
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 9823c87..b1ef28f 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1,6 +1,5 @@
 /* GDB routines for manipulating the minimal symbol tables.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
@@ -136,15 +135,14 @@
 
 /* Look through all the current minimal symbol tables and find the
    first minimal symbol that matches NAME.  If OBJF is non-NULL, limit
-   the search to that objfile.  If SFILE is non-NULL, the only file-scope
-   symbols considered will be from that source file (global symbols are
-   still preferred).  Returns a pointer to the minimal symbol that
+   the search to that objfile.  If SFILE is non-NULL, limit the search
+   to that source file.  Returns a pointer to the minimal symbol that
    matches, or NULL if no match is found.
 
    Note:  One instance where there may be duplicate minimal symbols with
    the same name is when the symbol tables for a shared library and the
    symbol tables for an executable contain global symbols with the same
-   names (the dynamic linker deals with the duplication).  */
+   names (the dynamic linker deals with the duplication). */
 
 struct minimal_symbol *
 lookup_minimal_symbol (register const char *name, const char *sfile,
@@ -250,13 +248,12 @@
 }
 
 /* Look through all the current minimal symbol tables and find the
-   first minimal symbol that matches NAME and has text type.  If OBJF
-   is non-NULL, limit the search to that objfile.  If SFILE is non-NULL,
-   the only file-scope symbols considered will be from that source file
-   (global symbols are still preferred).  Returns a pointer to the minimal
-   symbol that matches, or NULL if no match is found.
-
-   This function only searches the mangled (linkage) names.  */
+   first minimal symbol that matches NAME and of text type.  
+   If OBJF is non-NULL, limit
+   the search to that objfile.  If SFILE is non-NULL, limit the search
+   to that source file.  Returns a pointer to the minimal symbol that
+   matches, or NULL if no match is found.
+ */
 
 struct minimal_symbol *
 lookup_minimal_symbol_text (register const char *name, const char *sfile,
@@ -267,8 +264,6 @@
   struct minimal_symbol *found_symbol = NULL;
   struct minimal_symbol *found_file_symbol = NULL;
 
-  unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
-
 #ifdef SOFUN_ADDRESS_MAYBE_MISSING
   if (sfile != NULL)
     {
@@ -284,9 +279,10 @@
     {
       if (objf == NULL || objf == objfile)
 	{
-	  for (msymbol = objfile->msymbol_hash[hash];
-	       msymbol != NULL && found_symbol == NULL;
-	       msymbol = msymbol->hash_next)
+	  for (msymbol = objfile->msymbols;
+	       msymbol != NULL && SYMBOL_NAME (msymbol) != NULL &&
+	       found_symbol == NULL;
+	       msymbol++)
 	    {
 	      if (SYMBOL_MATCHES_NAME (msymbol, name) &&
 		  (MSYMBOL_TYPE (msymbol) == mst_text ||
@@ -327,13 +323,12 @@
 }
 
 /* Look through all the current minimal symbol tables and find the
-   first minimal symbol that matches NAME and is a solib trampoline.  If OBJF
-   is non-NULL, limit the search to that objfile.  If SFILE is non-NULL,
-   the only file-scope symbols considered will be from that source file
-   (global symbols are still preferred).  Returns a pointer to the minimal
-   symbol that matches, or NULL if no match is found.
-
-   This function only searches the mangled (linkage) names.  */
+   first minimal symbol that matches NAME and of solib trampoline type.  
+   If OBJF is non-NULL, limit
+   the search to that objfile.  If SFILE is non-NULL, limit the search
+   to that source file.  Returns a pointer to the minimal symbol that
+   matches, or NULL if no match is found.
+ */
 
 struct minimal_symbol *
 lookup_minimal_symbol_solib_trampoline (register const char *name,
@@ -343,8 +338,6 @@
   struct minimal_symbol *msymbol;
   struct minimal_symbol *found_symbol = NULL;
 
-  unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
-
 #ifdef SOFUN_ADDRESS_MAYBE_MISSING
   if (sfile != NULL)
     {
@@ -360,9 +353,10 @@
     {
       if (objf == NULL || objf == objfile)
 	{
-	  for (msymbol = objfile->msymbol_hash[hash];
-	       msymbol != NULL && found_symbol == NULL;
-	       msymbol = msymbol->hash_next)
+	  for (msymbol = objfile->msymbols;
+	       msymbol != NULL && SYMBOL_NAME (msymbol) != NULL &&
+	       found_symbol == NULL;
+	       msymbol++)
 	    {
 	      if (SYMBOL_MATCHES_NAME (msymbol, name) &&
 		  MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index ae4e689..e5aecff 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -24,9 +24,7 @@
 #include "target.h"
 #include "solib-svr4.h"
 #include "osabi.h"
-#include "mips-tdep.h"
 #include "gdb_string.h"
-#include "gdb_assert.h"
 
 /* Copied from <asm/elf.h>.  */
 #define ELF_NGREG       45
@@ -85,18 +83,6 @@
   return 1;
 }
 
-/* Transform the bits comprising a 32-bit register to the right
-   size for supply_register().  This is needed when MIPS_REGSIZE is 8.  */
-
-static void
-supply_32bit_reg (int regnum, const void *addr)
-{
-  char *buf = alloca (MAX_REGISTER_RAW_SIZE);
-  store_signed_integer (buf, REGISTER_RAW_SIZE (regnum),
-                        extract_signed_integer (addr, 4));
-  supply_register (regnum, buf);
-}
-
 /* Unpack an elf_gregset_t into GDB's register cache.  */
 
 void 
@@ -109,15 +95,15 @@
   memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
 
   for (regi = EF_REG0; regi <= EF_REG31; regi++)
-    supply_32bit_reg ((regi - EF_REG0), (char *)(regp + regi));
+    supply_register ((regi - EF_REG0), (char *)(regp + regi));
 
-  supply_32bit_reg (LO_REGNUM, (char *)(regp + EF_LO));
-  supply_32bit_reg (HI_REGNUM, (char *)(regp + EF_HI));
+  supply_register (LO_REGNUM, (char *)(regp + EF_LO));
+  supply_register (HI_REGNUM, (char *)(regp + EF_HI));
 
-  supply_32bit_reg (PC_REGNUM, (char *)(regp + EF_CP0_EPC));
-  supply_32bit_reg (BADVADDR_REGNUM, (char *)(regp + EF_CP0_BADVADDR));
-  supply_32bit_reg (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
-  supply_32bit_reg (CAUSE_REGNUM, (char *)(regp + EF_CP0_CAUSE));
+  supply_register (PC_REGNUM, (char *)(regp + EF_CP0_EPC));
+  supply_register (BADVADDR_REGNUM, (char *)(regp + EF_CP0_BADVADDR));
+  supply_register (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
+  supply_register (CAUSE_REGNUM, (char *)(regp + EF_CP0_CAUSE));
 
   /* Fill inaccessible registers with zero.  */
   supply_register (UNUSED_REGNUM, zerobuf);
@@ -132,7 +118,7 @@
 {
   int regaddr, regi;
   elf_greg_t *regp = *gregsetp;
-  void *dst;
+  void *src, *dst;
 
   if (regno == -1)
     {
@@ -151,8 +137,9 @@
 
   if (regno < 32)
     {
+      src = &deprecated_registers[REGISTER_BYTE (regno)];
       dst = regp + regno + EF_REG0;
-      regcache_collect (regno, dst);
+      memcpy (dst, src, sizeof (elf_greg_t));
       return;
     }
 
@@ -181,8 +168,9 @@
 
   if (regaddr != -1)
     {
+      src = &deprecated_registers[REGISTER_BYTE (regno)];
       dst = regp + regaddr;
-      regcache_collect (regno, dst);
+      memcpy (dst, src, sizeof (elf_greg_t));
     }
 }
 
@@ -239,8 +227,8 @@
 /* Map gdb internal register number to ptrace ``address''.
    These ``addresses'' are normally defined in <asm/ptrace.h>.  */
 
-static CORE_ADDR
-mips_linux_register_addr (int regno, CORE_ADDR blockend)
+CORE_ADDR
+register_addr (int regno, CORE_ADDR blockend)
 {
   int regaddr;
 
@@ -271,6 +259,53 @@
   return regaddr;
 }
 
+/*  Use a local version of this function to get the correct types for
+    regsets, until multi-arch core support is ready.  */
+
+static void
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
+		      int which, CORE_ADDR reg_addr)
+{
+  elf_gregset_t gregset;
+  elf_fpregset_t fpregset;
+
+  if (which == 0)
+    {
+      if (core_reg_size != sizeof (gregset))
+	{
+	  warning ("wrong size gregset struct in core file");
+	}
+      else
+	{
+	  memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
+	  supply_gregset (&gregset);
+	}
+    }
+  else if (which == 2)
+    {
+      if (core_reg_size != sizeof (fpregset))
+	{
+	  warning ("wrong size fpregset struct in core file");
+	}
+      else
+	{
+	  memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
+	  supply_fpregset (&fpregset);
+	}
+    }
+}
+
+/* Register that we are able to handle ELF file formats using standard
+   procfs "regset" structures.  */
+
+static struct core_fns regset_core_fns =
+{
+  bfd_target_elf_flavour,		/* core_flavour */
+  default_check_format,			/* check_format */
+  default_core_sniffer,			/* core_sniffer */
+  fetch_core_registers,			/* core_read_registers */
+  NULL					/* next */
+};
 
 /* Fetch (and possibly build) an appropriate link_map_offsets
    structure for native GNU/Linux MIPS targets using the struct offsets
@@ -312,419 +347,18 @@
   return lmp;
 }
 
-/* Support for 64-bit ABIs.  */
-
-/* Copied from <asm/elf.h>.  */
-#define MIPS64_ELF_NGREG       45
-#define MIPS64_ELF_NFPREG      33
-
-typedef unsigned char mips64_elf_greg_t[8];
-typedef mips64_elf_greg_t mips64_elf_gregset_t[MIPS64_ELF_NGREG];
-
-typedef unsigned char mips64_elf_fpreg_t[8];
-typedef mips64_elf_fpreg_t mips64_elf_fpregset_t[MIPS64_ELF_NFPREG];
-
-/* 0 - 31 are integer registers, 32 - 63 are fp registers.  */
-#define MIPS64_FPR_BASE                 32
-#define MIPS64_PC                       64
-#define MIPS64_CAUSE                    65
-#define MIPS64_BADVADDR                 66
-#define MIPS64_MMHI                     67
-#define MIPS64_MMLO                     68
-#define MIPS64_FPC_CSR                  69
-#define MIPS64_FPC_EIR                  70
-
-#define MIPS64_EF_REG0			 0
-#define MIPS64_EF_REG31			31
-#define MIPS64_EF_LO			32
-#define MIPS64_EF_HI			33
-#define MIPS64_EF_CP0_EPC		34
-#define MIPS64_EF_CP0_BADVADDR		35
-#define MIPS64_EF_CP0_STATUS		36
-#define MIPS64_EF_CP0_CAUSE		37
-
-#define MIPS64_EF_SIZE			304
-
-/* Figure out where the longjmp will land.
-   We expect the first arg to be a pointer to the jmp_buf structure from
-   which we extract the pc (MIPS_LINUX_JB_PC) that we will land at.  The pc
-   is copied into PC.  This routine returns 1 on success.  */
-
-/* Details about jmp_buf.  */
-
-#define MIPS64_LINUX_JB_PC 0
-
-static int
-mips64_linux_get_longjmp_target (CORE_ADDR *pc)
-{
-  CORE_ADDR jb_addr;
-  void *buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
-  int element_size = TARGET_PTR_BIT == 32 ? 4 : 8;
-
-  jb_addr = read_register (A0_REGNUM);
-
-  if (target_read_memory (jb_addr + MIPS64_LINUX_JB_PC * element_size,
-			  buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
-    return 0;
-
-  *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
-  return 1;
-}
-
-/* Unpack an elf_gregset_t into GDB's register cache.  */
-
-static void 
-mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
-{
-  int regi;
-  mips64_elf_greg_t *regp = *gregsetp;
-  char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
-
-  memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
-
-  for (regi = MIPS64_EF_REG0; regi <= MIPS64_EF_REG31; regi++)
-    supply_register ((regi - MIPS64_EF_REG0), (char *)(regp + regi));
-
-  supply_register (LO_REGNUM, (char *)(regp + MIPS64_EF_LO));
-  supply_register (HI_REGNUM, (char *)(regp + MIPS64_EF_HI));
-
-  supply_register (PC_REGNUM, (char *)(regp + MIPS64_EF_CP0_EPC));
-  supply_register (BADVADDR_REGNUM, (char *)(regp + MIPS64_EF_CP0_BADVADDR));
-  supply_register (PS_REGNUM, (char *)(regp + MIPS64_EF_CP0_STATUS));
-  supply_register (CAUSE_REGNUM, (char *)(regp + MIPS64_EF_CP0_CAUSE));
-
-  /* Fill inaccessible registers with zero.  */
-  supply_register (UNUSED_REGNUM, zerobuf);
-  for (regi = FIRST_EMBED_REGNUM; regi < LAST_EMBED_REGNUM; regi++)
-    supply_register (regi, zerobuf);
-}
-
-/* Pack our registers (or one register) into an elf_gregset_t.  */
-
-static void
-mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
-{
-  int regaddr, regi;
-  mips64_elf_greg_t *regp = *gregsetp;
-  void *src, *dst;
-
-  if (regno == -1)
-    {
-      memset (regp, 0, sizeof (mips64_elf_gregset_t));
-      for (regi = 0; regi < 32; regi++)
-        mips64_fill_gregset (gregsetp, regi);
-      mips64_fill_gregset (gregsetp, LO_REGNUM);
-      mips64_fill_gregset (gregsetp, HI_REGNUM);
-      mips64_fill_gregset (gregsetp, PC_REGNUM);
-      mips64_fill_gregset (gregsetp, BADVADDR_REGNUM);
-      mips64_fill_gregset (gregsetp, PS_REGNUM);
-      mips64_fill_gregset (gregsetp, CAUSE_REGNUM);
-
-      return;
-   }
-
-  if (regno < 32)
-    {
-      dst = regp + regno + MIPS64_EF_REG0;
-      regcache_collect (regno, dst);
-      return;
-    }
-
-  regaddr = -1;
-  switch (regno)
-    {
-      case LO_REGNUM:
-	regaddr = MIPS64_EF_LO;
-	break;
-      case HI_REGNUM:
-	regaddr = MIPS64_EF_HI;
-	break;
-      case PC_REGNUM:
-	regaddr = MIPS64_EF_CP0_EPC;
-	break;
-      case BADVADDR_REGNUM:
-	regaddr = MIPS64_EF_CP0_BADVADDR;
-	break;
-      case PS_REGNUM:
-	regaddr = MIPS64_EF_CP0_STATUS;
-	break;
-      case CAUSE_REGNUM:
-	regaddr = MIPS64_EF_CP0_CAUSE;
-	break;
-    }
-
-  if (regaddr != -1)
-    {
-      dst = regp + regaddr;
-      regcache_collect (regno, dst);
-    }
-}
-
-/* Likewise, unpack an elf_fpregset_t.  */
-
-static void
-mips64_supply_fpregset (mips64_elf_fpregset_t *fpregsetp)
-{
-  register int regi;
-  char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
-
-  memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
-
-  for (regi = 0; regi < 32; regi++)
-    supply_register (FP0_REGNUM + regi,
-		     (char *)(*fpregsetp + regi));
-
-  supply_register (FCRCS_REGNUM, (char *)(*fpregsetp + 32));
-
-  /* FIXME: how can we supply FCRIR_REGNUM?  The ABI doesn't tell us. */
-  supply_register (FCRIR_REGNUM, zerobuf);
-}
-
-/* Likewise, pack one or all floating point registers into an
-   elf_fpregset_t.  */
-
-static void
-mips64_fill_fpregset (mips64_elf_fpregset_t *fpregsetp, int regno)
-{
-  char *from, *to;
-
-  if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
-    {
-      from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
-      to = (char *) (*fpregsetp + regno - FP0_REGNUM);
-      memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
-    }
-  else if (regno == FCRCS_REGNUM)
-    {
-      from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
-      to = (char *) (*fpregsetp + 32);
-      memcpy (to, from, REGISTER_RAW_SIZE (regno));
-    }
-  else if (regno == -1)
-    {
-      int regi;
-
-      for (regi = 0; regi < 32; regi++)
-	mips64_fill_fpregset (fpregsetp, FP0_REGNUM + regi);
-      mips64_fill_fpregset(fpregsetp, FCRCS_REGNUM);
-    }
-}
-
-
-/* Map gdb internal register number to ptrace ``address''.
-   These ``addresses'' are normally defined in <asm/ptrace.h>.  */
-
-static CORE_ADDR
-mips64_linux_register_addr (int regno, CORE_ADDR blockend)
-{
-  int regaddr;
-
-  if (regno < 0 || regno >= NUM_REGS)
-    error ("Bogon register number %d.", regno);
-
-  if (regno < 32)
-    regaddr = regno;
-  else if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
-    regaddr = MIPS64_FPR_BASE + (regno - FP0_REGNUM);
-  else if (regno == PC_REGNUM)
-    regaddr = MIPS64_PC;
-  else if (regno == CAUSE_REGNUM)
-    regaddr = MIPS64_CAUSE;
-  else if (regno == BADVADDR_REGNUM)
-    regaddr = MIPS64_BADVADDR;
-  else if (regno == LO_REGNUM)
-    regaddr = MIPS64_MMLO;
-  else if (regno == HI_REGNUM)
-    regaddr = MIPS64_MMHI;
-  else if (regno == FCRCS_REGNUM)
-    regaddr = MIPS64_FPC_CSR;
-  else if (regno == FCRIR_REGNUM)
-    regaddr = MIPS64_FPC_EIR;
-  else
-    error ("Unknowable register number %d.", regno);
-
-  return regaddr;
-}
-
-/*  Use a local version of this function to get the correct types for
-    regsets, until multi-arch core support is ready.  */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
-		      int which, CORE_ADDR reg_addr)
-{
-  elf_gregset_t gregset;
-  elf_fpregset_t fpregset;
-  mips64_elf_gregset_t gregset64;
-  mips64_elf_fpregset_t fpregset64;
-
-  if (which == 0)
-    {
-      if (core_reg_size == sizeof (gregset))
-	{
-	  memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
-	  supply_gregset (&gregset);
-	}
-      else if (core_reg_size == sizeof (gregset64))
-	{
-	  memcpy ((char *) &gregset64, core_reg_sect, sizeof (gregset64));
-	  mips64_supply_gregset (&gregset64);
-	}
-      else
-	{
-	  warning ("wrong size gregset struct in core file");
-	}
-    }
-  else if (which == 2)
-    {
-      if (core_reg_size == sizeof (fpregset))
-	{
-	  memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
-	  supply_fpregset (&fpregset);
-	}
-      else if (core_reg_size == sizeof (fpregset64))
-	{
-	  memcpy ((char *) &fpregset64, core_reg_sect, sizeof (fpregset64));
-	  mips64_supply_fpregset (&fpregset64);
-	}
-      else
-	{
-	  warning ("wrong size fpregset struct in core file");
-	}
-    }
-}
-
-/* Register that we are able to handle ELF file formats using standard
-   procfs "regset" structures.  */
-
-static struct core_fns regset_core_fns =
-{
-  bfd_target_elf_flavour,		/* core_flavour */
-  default_check_format,			/* check_format */
-  default_core_sniffer,			/* core_sniffer */
-  fetch_core_registers,			/* core_read_registers */
-  NULL					/* next */
-};
-
-/* Fetch (and possibly build) an appropriate link_map_offsets
-   structure for native GNU/Linux MIPS targets using the struct offsets
-   defined in link.h (but without actual reference to that file).
-
-   This makes it possible to access GNU/Linux MIPS shared libraries from a
-   GDB that was built on a different host platform (for cross debugging).  */
-
-static struct link_map_offsets *
-mips64_linux_svr4_fetch_link_map_offsets (void)
-{ 
-  static struct link_map_offsets lmo;
-  static struct link_map_offsets *lmp = NULL;
-
-  if (lmp == NULL)
-    { 
-      lmp = &lmo;
-
-      lmo.r_debug_size = 16;	/* The actual size is 40 bytes, but
-				   this is all we need.  */
-      lmo.r_map_offset = 8;
-      lmo.r_map_size   = 8;
-
-      lmo.link_map_size = 40;
-
-      lmo.l_addr_offset = 0;
-      lmo.l_addr_size   = 8;
-
-      lmo.l_name_offset = 8;
-      lmo.l_name_size   = 8;
-
-      lmo.l_next_offset = 24;
-      lmo.l_next_size   = 8;
-
-      lmo.l_prev_offset = 32;
-      lmo.l_prev_size   = 8;
-    }
-
-  return lmp;
-}
-
-/* Handle for obtaining pointer to the current register_addr() function
-   for a given architecture.  */
-static struct gdbarch_data *register_addr_data;
-
-CORE_ADDR
-register_addr (int regno, CORE_ADDR blockend)
-{
-  CORE_ADDR (*register_addr_ptr) (int, CORE_ADDR) =
-    gdbarch_data (current_gdbarch, register_addr_data);
-
-  gdb_assert (register_addr_ptr != 0);
-
-  return register_addr_ptr (regno, blockend);
-}
-
-static void
-set_mips_linux_register_addr (struct gdbarch *gdbarch,
-                              CORE_ADDR (*register_addr_ptr) (int, CORE_ADDR))
-{
-  set_gdbarch_data (gdbarch, register_addr_data, register_addr_ptr);
-}
-
-static void *
-init_register_addr_data (struct gdbarch *gdbarch)
-{
-  return 0;
-}
-
 static void
 mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  enum mips_abi abi = mips_abi (gdbarch);
-
-  switch (abi)
-    {
-      case MIPS_ABI_O32:
-	set_gdbarch_get_longjmp_target (gdbarch,
-	                                mips_linux_get_longjmp_target);
-	set_solib_svr4_fetch_link_map_offsets
-	  (gdbarch, mips_linux_svr4_fetch_link_map_offsets);
-	set_mips_linux_register_addr (gdbarch, mips_linux_register_addr);
-	break;
-      case MIPS_ABI_N32:
-	set_gdbarch_get_longjmp_target (gdbarch,
-	                                mips_linux_get_longjmp_target);
-	set_solib_svr4_fetch_link_map_offsets
-	  (gdbarch, mips_linux_svr4_fetch_link_map_offsets);
-	set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr);
-	break;
-      case MIPS_ABI_N64:
-	set_gdbarch_get_longjmp_target (gdbarch,
-	                                mips64_linux_get_longjmp_target);
-	set_solib_svr4_fetch_link_map_offsets
-	  (gdbarch, mips64_linux_svr4_fetch_link_map_offsets);
-	set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr);
-	break;
-      default:
-	internal_error (__FILE__, __LINE__, "can't handle ABI");
-	break;
-    }
+  set_gdbarch_get_longjmp_target (gdbarch, mips_linux_get_longjmp_target);
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, mips_linux_svr4_fetch_link_map_offsets);
 }
 
 void
 _initialize_mips_linux_tdep (void)
 {
-  const struct bfd_arch_info *arch_info;
-
-  register_addr_data =
-    register_gdbarch_data (init_register_addr_data, 0);
-
-  for (arch_info = bfd_lookup_arch (bfd_arch_mips, 0);
-       arch_info != NULL;
-       arch_info = arch_info->next)
-    {
-      gdbarch_register_osabi (bfd_arch_mips, arch_info->mach, GDB_OSABI_LINUX,
-			      mips_linux_init_abi);
-    }
-
+  gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_LINUX,
+			  mips_linux_init_abi);
   add_core_fns (&regset_core_fns);
 }
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 4615b3b..1686ee4 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1,7 +1,7 @@
 /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
 
    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
@@ -129,6 +129,8 @@
     int mips_default_stack_argsize;
     int gdb_target_is_mips64;
     int default_mask_address_p;
+
+    enum gdb_osabi osabi;
   };
 
 #define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
@@ -492,12 +494,12 @@
 mips_print_extra_frame_info (struct frame_info *fi)
 {
   if (fi
-      && get_frame_extra_info (fi)
-      && get_frame_extra_info (fi)->proc_desc
-      && get_frame_extra_info (fi)->proc_desc->pdr.framereg < NUM_REGS)
+      && fi->extra_info
+      && fi->extra_info->proc_desc
+      && fi->extra_info->proc_desc->pdr.framereg < NUM_REGS)
     printf_filtered (" frame pointer is at %s+%s\n",
-		     REGISTER_NAME (get_frame_extra_info (fi)->proc_desc->pdr.framereg),
-		     paddr_d (get_frame_extra_info (fi)->proc_desc->pdr.frameoffset));
+		     REGISTER_NAME (fi->extra_info->proc_desc->pdr.framereg),
+		     paddr_d (fi->extra_info->proc_desc->pdr.frameoffset));
 }
 
 /* Number of bytes of storage in the actual machine representation for
@@ -1420,21 +1422,21 @@
     {
       for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
 	{
-	  reg_position = get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
+	  reg_position = fci->frame + SIGFRAME_REGSAVE_OFF
 	    + ireg * SIGFRAME_REG_SIZE;
-	  get_frame_saved_regs (fci)[ireg] = reg_position;
+	  fci->saved_regs[ireg] = reg_position;
 	}
       for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
 	{
-	  reg_position = get_frame_base (fci) + SIGFRAME_FPREGSAVE_OFF
+	  reg_position = fci->frame + SIGFRAME_FPREGSAVE_OFF
 	    + ireg * SIGFRAME_REG_SIZE;
-	  get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
+	  fci->saved_regs[FP0_REGNUM + ireg] = reg_position;
 	}
-      get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_base (fci) + SIGFRAME_PC_OFF;
+      fci->saved_regs[PC_REGNUM] = fci->frame + SIGFRAME_PC_OFF;
       return;
     }
 
-  proc_desc = get_frame_extra_info (fci)->proc_desc;
+  proc_desc = fci->extra_info->proc_desc;
   if (proc_desc == NULL)
     /* I'm not sure how/whether this can happen.  Normally when we can't
        find a proc_desc, we "synthesize" one using heuristic_proc_desc
@@ -1449,8 +1451,7 @@
 				   a signal, we assume that all registers have been saved.
 				   This assumes that all register saves in a function happen before
 				   the first function call.  */
-       (get_next_frame (fci) == NULL
-	|| (get_frame_type (get_next_frame (fci)) == SIGTRAMP_FRAME))
+       (fci->next == NULL || (get_frame_type (fci->next) == SIGTRAMP_FRAME))
 
   /* In a dummy frame we know exactly where things are saved.  */
        && !PROC_DESC_IS_DUMMY (proc_desc)
@@ -1458,7 +1459,7 @@
   /* Don't bother unless we are inside a function prologue.  Outside the
      prologue, we know where everything is. */
 
-       && in_prologue (get_frame_pc (fci), PROC_LOW_ADDR (proc_desc))
+       && in_prologue (fci->pc, PROC_LOW_ADDR (proc_desc))
 
   /* Not sure exactly what kernel_trap means, but if it means
      the kernel saves the registers without a prologue doing it,
@@ -1482,7 +1483,7 @@
 
       /* Scan through this function's instructions preceding the current
          PC, and look for those that save registers.  */
-      while (addr < get_frame_pc (fci))
+      while (addr < fci->pc)
 	{
 	  inst = mips_fetch_instruction (addr);
 	  if (pc_is_mips16 (addr))
@@ -1497,11 +1498,11 @@
 
   /* Fill in the offsets for the registers which gen_mask says
      were saved.  */
-  reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
+  reg_position = fci->frame + PROC_REG_OFFSET (proc_desc);
   for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
     if (gen_mask & 0x80000000)
       {
-	get_frame_saved_regs (fci)[ireg] = reg_position;
+	fci->saved_regs[ireg] = reg_position;
 	reg_position -= MIPS_SAVED_REGSIZE;
       }
 
@@ -1518,14 +1519,14 @@
 	  int sreg_count = (inst >> 6) & 3;
 
 	  /* Check if the ra register was pushed on the stack.  */
-	  reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
+	  reg_position = fci->frame + PROC_REG_OFFSET (proc_desc);
 	  if (inst & 0x20)
 	    reg_position -= MIPS_SAVED_REGSIZE;
 
 	  /* Check if the s0 and s1 registers were pushed on the stack.  */
 	  for (reg = 16; reg < sreg_count + 16; reg++)
 	    {
-	      get_frame_saved_regs (fci)[reg] = reg_position;
+	      fci->saved_regs[reg] = reg_position;
 	      reg_position -= MIPS_SAVED_REGSIZE;
 	    }
 	}
@@ -1533,7 +1534,7 @@
 
   /* Fill in the offsets for the registers which float_mask says
      were saved.  */
-  reg_position = get_frame_base (fci) + PROC_FREG_OFFSET (proc_desc);
+  reg_position = fci->frame + PROC_FREG_OFFSET (proc_desc);
 
   /* Apparently, the freg_offset gives the offset to the first 64 bit
      saved.
@@ -1556,11 +1557,11 @@
   for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
     if (float_mask & 0x80000000)
       {
-	get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
+	fci->saved_regs[FP0_REGNUM + ireg] = reg_position;
 	reg_position -= MIPS_SAVED_REGSIZE;
       }
 
-  get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_saved_regs (fci)[RA_REGNUM];
+  fci->saved_regs[PC_REGNUM] = fci->saved_regs[RA_REGNUM];
 }
 
 /* Set up the 'saved_regs' array.  This is a data structure containing
@@ -1573,11 +1574,11 @@
 static void
 mips_frame_init_saved_regs (struct frame_info *frame)
 {
-  if (get_frame_saved_regs (frame) == NULL)
+  if (frame->saved_regs == NULL)
     {
       mips_find_saved_regs (frame);
     }
-  get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame);
+  frame->saved_regs[SP_REGNUM] = frame->frame;
 }
 
 static CORE_ADDR
@@ -1681,11 +1682,8 @@
 {
   CORE_ADDR pc, tmp;
 
-  pc = ((fromleaf)
-	? SAVED_PC_AFTER_CALL (get_next_frame (prev))
-	: get_next_frame (prev)
-	? FRAME_SAVED_PC (get_next_frame (prev))
-	: read_pc ());
+  pc = ((fromleaf) ? SAVED_PC_AFTER_CALL (prev->next) :
+	prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
   tmp = SKIP_TRAMPOLINE_CODE (pc);
   return tmp ? tmp : pc;
 }
@@ -1695,20 +1693,20 @@
 mips_frame_saved_pc (struct frame_info *frame)
 {
   CORE_ADDR saved_pc;
-  mips_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+  mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
   /* We have to get the saved pc from the sigcontext
      if it is a signal handler frame.  */
   int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM
   : (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
     {
       LONGEST tmp;
       frame_unwind_signed_register (frame, PC_REGNUM, &tmp);
       saved_pc = tmp;
     }
   else if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
-    saved_pc = read_memory_integer (get_frame_base (frame) - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
+    saved_pc = read_memory_integer (frame->frame - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
   else
     saved_pc = read_next_frame_reg (frame, pcreg);
 
@@ -2437,7 +2435,7 @@
       /* A dummy frame, uses SP not FP.  Get the old SP value.  If all
          is well, frame->frame the bottom of the current frame will
          contain that value.  */
-      return get_frame_base (frame);
+      return frame->frame;
     }
 
   /* Look up the procedure descriptor for this PC.  */
@@ -2457,7 +2455,7 @@
       && !(get_frame_type (frame) == SIGTRAMP_FRAME)
       /* For a generic dummy frame, let get_frame_pointer() unwind a
          register value saved as part of the dummy frame call.  */
-      && !(DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0)))
+      && !(DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0)))
     return 0;
   else
     return get_frame_pointer (frame, proc_desc);
@@ -2470,14 +2468,13 @@
 
   /* Use proc_desc calculated in frame_chain */
   mips_extra_func_info_t proc_desc =
-    get_next_frame (fci)
-    ? cached_proc_desc
-    : find_proc_desc (get_frame_pc (fci), get_next_frame (fci), 1);
+    fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1);
 
-  frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info));
+  fci->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  deprecated_set_frame_saved_regs_hack (fci, NULL);
-  get_frame_extra_info (fci)->proc_desc =
+  fci->saved_regs = NULL;
+  fci->extra_info->proc_desc =
     proc_desc == &temp_proc_desc ? 0 : proc_desc;
   if (proc_desc)
     {
@@ -2485,10 +2482,10 @@
       /* This may not be quite right, if proc has a real frame register.
          Get the value of the frame relative sp, procedure might have been
          interrupted by a signal at it's very start.  */
-      if (get_frame_pc (fci) == PROC_LOW_ADDR (proc_desc)
+      if (fci->pc == PROC_LOW_ADDR (proc_desc)
 	  && !PROC_DESC_IS_DUMMY (proc_desc))
-	deprecated_update_frame_base_hack (fci, read_next_frame_reg (get_next_frame (fci), SP_REGNUM));
-      else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fci), 0, 0))
+	fci->frame = read_next_frame_reg (fci->next, SP_REGNUM);
+      else if (DEPRECATED_PC_IN_CALL_DUMMY (fci->pc, 0, 0))
 	/* Do not ``fix'' fci->frame.  It will have the value of the
            generic dummy frame's top-of-stack (since the draft
            fci->frame is obtained by returning the unwound stack
@@ -2497,7 +2494,7 @@
            part of the dummy frames data.  */
 	/* Do nothing.  */;
       else
-	deprecated_update_frame_base_hack (fci, get_frame_pointer (get_next_frame (fci), proc_desc));
+	fci->frame = get_frame_pointer (fci->next, proc_desc);
 
       if (proc_desc == &temp_proc_desc)
 	{
@@ -2510,31 +2507,31 @@
 	  /* FIXME: cagney/2002-11-18: This problem will go away once
              frame.c:get_prev_frame() is modified to set the frame's
              type before calling functions like this.  */
-	  find_pc_partial_function (get_frame_pc (fci), &name,
+	  find_pc_partial_function (fci->pc, &name,
 				    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
-	  if (!PC_IN_SIGTRAMP (get_frame_pc (fci), name))
+	  if (!PC_IN_SIGTRAMP (fci->pc, name))
 	    {
 	      frame_saved_regs_zalloc (fci);
-	      memcpy (get_frame_saved_regs (fci), temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
-	      get_frame_saved_regs (fci)[PC_REGNUM]
-		= get_frame_saved_regs (fci)[RA_REGNUM];
+	      memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
+	      fci->saved_regs[PC_REGNUM]
+		= fci->saved_regs[RA_REGNUM];
 	      /* Set value of previous frame's stack pointer.  Remember that
 	         saved_regs[SP_REGNUM] is special in that it contains the
 		 value of the stack pointer register.  The other saved_regs
 		 values are addresses (in the inferior) at which a given
 		 register's value may be found.  */
-	      get_frame_saved_regs (fci)[SP_REGNUM] = get_frame_base (fci);
+	      fci->saved_regs[SP_REGNUM] = fci->frame;
 	    }
 	}
 
       /* hack: if argument regs are saved, guess these contain args */
       /* assume we can't tell how many args for now */
-      get_frame_extra_info (fci)->num_args = -1;
+      fci->extra_info->num_args = -1;
       for (regnum = MIPS_LAST_ARG_REGNUM; regnum >= A0_REGNUM; regnum--)
 	{
 	  if (PROC_REG_MASK (proc_desc) & (1 << regnum))
 	    {
-	      get_frame_extra_info (fci)->num_args = regnum - A0_REGNUM + 1;
+	      fci->extra_info->num_args = regnum - A0_REGNUM + 1;
 	      break;
 	    }
 	}
@@ -3816,9 +3813,9 @@
   register int regnum;
   struct frame_info *frame = get_current_frame ();
   CORE_ADDR new_sp = get_frame_base (frame);
-  mips_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+  mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
     {
       generic_pop_dummy_frame ();
       flush_cached_frames ();
@@ -3826,22 +3823,22 @@
     }
 
   write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-  if (get_frame_saved_regs (frame) == NULL)
+  if (frame->saved_regs == NULL)
     FRAME_INIT_SAVED_REGS (frame);
   for (regnum = 0; regnum < NUM_REGS; regnum++)
     if (regnum != SP_REGNUM && regnum != PC_REGNUM
-	&& get_frame_saved_regs (frame)[regnum])
+	&& frame->saved_regs[regnum])
       {
 	/* Floating point registers must not be sign extended, 
 	   in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8.  */
 
 	if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32)
 	  write_register (regnum,
-			  read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
+			  read_memory_unsigned_integer (frame->saved_regs[regnum],
 							MIPS_SAVED_REGSIZE));
 	else
 	  write_register (regnum,
-			  read_memory_integer (get_frame_saved_regs (frame)[regnum],
+			  read_memory_integer (frame->saved_regs[regnum],
 					       MIPS_SAVED_REGSIZE));
       }
 
@@ -5456,6 +5453,24 @@
 }
 
 
+/* If the current gcc for this target does not produce correct debugging
+   information for float parameters, both prototyped and unprototyped, then
+   define this macro.  This forces gdb to  always assume that floats are
+   passed as doubles and then converted in the callee.
+
+   For the mips chip, it appears that the debug info marks the parameters as
+   floats regardless of whether the function is prototyped, but the actual
+   values are passed as doubles for the non-prototyped case and floats for
+   the prototyped case.  Thus we choose to make the non-prototyped case work
+   for C and break the prototyped case, since the non-prototyped case is
+   probably much more common.  (FIXME). */
+
+static int
+mips_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+  return current_language->la_language == language_c;
+}
+
 /* When debugging a 64 MIPS target running a 32 bit ABI, the size of
    the register stored on the stack (32) is different to its real raw
    size (64).  The below ensures that registers are fetched from the
@@ -5610,6 +5625,7 @@
   struct gdbarch_tdep *tdep;
   int elf_flags;
   enum mips_abi mips_abi, found_abi, wanted_abi;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
   /* Reset the disassembly info, in case it was set to something
      non-default.  */
@@ -5624,6 +5640,10 @@
       /* First of all, extract the elf_flags, if available.  */
       if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
 	elf_flags = elf_elfheader (info.abfd)->e_flags;
+
+      /* Try to determine the OS ABI of the object we are loading.  If
+	 we end up with `unknown', just leave it that way.  */
+      osabi = gdbarch_lookup_osabi (info.abfd);
     }
 
   /* Check ELF_FLAGS to see if it specifies the ABI being used.  */
@@ -5720,13 +5740,15 @@
 	continue;
       if (gdbarch_tdep (arches->gdbarch)->mips_abi != mips_abi)
 	continue;
-      return arches->gdbarch;
+      if (gdbarch_tdep (arches->gdbarch)->osabi == osabi)
+        return arches->gdbarch;
     }
 
   /* Need a new architecture.  Fill in a target specific vector.  */
   tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
+  tdep->osabi = osabi;
 
   /* Initially set everything according to the default ABI/ISA.  */
   set_gdbarch_short_bit (gdbarch, 16);
@@ -5743,7 +5765,7 @@
   set_gdbarch_elf_make_msymbol_special (gdbarch, 
 					mips_elf_make_msymbol_special);
 
-  if (info.osabi == GDB_OSABI_IRIX)
+  if (osabi == GDB_OSABI_IRIX)
     set_gdbarch_num_regs (gdbarch, 71);
   else
     set_gdbarch_num_regs (gdbarch, 90);
@@ -5991,7 +6013,10 @@
   set_gdbarch_register_convert_to_raw (gdbarch, 
 				       mips_register_convert_to_raw);
 
+  set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
+
   set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_frameless_function_invocation (gdbarch, 
 					     generic_frameless_function_invocation_not);
   set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
@@ -6022,7 +6047,7 @@
   set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
 
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
   set_gdbarch_extract_struct_value_address (gdbarch, 
@@ -6427,6 +6452,10 @@
   fprintf_unfiltered (file,
 		      "mips_dump_tdep: _PROC_MAGIC_ = %d\n",
 		      _PROC_MAGIC_);
+
+  fprintf_unfiltered (file,
+		      "mips_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
 }
 
 void
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index da83eb2..fdc0941 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -121,7 +121,7 @@
 
   /* Use the PC in the frame if it's provided to look up the
      start of this function.  */
-  pc = (fi ? get_frame_pc (fi) : pc);
+  pc = (fi ? fi->pc : pc);
 
   /* Find the start of this function.  */
   status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
@@ -147,35 +147,35 @@
      been deallocated.
 
      fi->frame is bogus, we need to fix it.  */
-  if (fi && get_frame_pc (fi) + 1 == func_end)
+  if (fi && fi->pc + 1 == func_end)
     {
-      status = target_read_memory (get_frame_pc (fi), buf, 1);
+      status = target_read_memory (fi->pc, buf, 1);
       if (status != 0)
 	{
-	  if (get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
-	  return get_frame_pc (fi);
+	  if (fi->next == NULL)
+	    fi->frame = read_sp ();
+	  return fi->pc;
 	}
 
       if (buf[0] == 0xfe)
 	{
-	  if (get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
-	  return get_frame_pc (fi);
+	  if (fi->next == NULL)
+	    fi->frame = read_sp ();
+	  return fi->pc;
 	}
     }
 
   /* Similarly if we're stopped on the first insn of a prologue as our
      frame hasn't been allocated yet.  */
-  if (fi && get_frame_pc (fi) == func_addr)
+  if (fi && fi->pc == func_addr)
     {
-      if (get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, read_sp ());
-      return get_frame_pc (fi);
+      if (fi->next == NULL)
+	fi->frame = read_sp ();
+      return fi->pc;
     }
 
   /* Figure out where to stop scanning.  */
-  stop = fi ? get_frame_pc (fi) : func_end;
+  stop = fi ? fi->pc : func_end;
 
   /* Don't walk off the end of the function.  */
   stop = stop > func_end ? func_end : stop;
@@ -186,8 +186,8 @@
   status = target_read_memory (addr, buf, 2);
   if (status != 0)
     {
-      if (fi && get_next_frame (fi) == NULL && fi->status & MY_FRAME_IN_SP)
-	deprecated_update_frame_base_hack (fi, read_sp ());
+      if (fi && fi->next == NULL && fi->status & MY_FRAME_IN_SP)
+	fi->frame = read_sp ();
       return addr;
     }
 
@@ -217,16 +217,16 @@
 	{
 	  /* We still haven't allocated our local stack.  Handle this
 	     as if we stopped on the first or last insn of a function.   */
-	  if (fi && get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL)
+	    fi->frame = read_sp ();
 	  return addr;
 	}
 
       status = target_read_memory (addr, buf, 2);
       if (status != 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL)
+	    fi->frame = read_sp ();
 	  return addr;
 	}
       if (buf[0] == 0xf2 && buf[1] == 0x7e)
@@ -244,8 +244,8 @@
 	}
       else
 	{
-	  if (fi && get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL)
+	    fi->frame = read_sp ();
 	  return addr;
 	}
     }
@@ -262,8 +262,8 @@
   status = target_read_memory (addr, buf, 2);
   if (status != 0)
     {
-      if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	deprecated_update_frame_base_hack (fi, read_sp ());
+      if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	fi->frame = read_sp ();
       return addr;
     }
   if (buf[0] == 0xd3)
@@ -274,8 +274,8 @@
       addr += 2;
       if (addr >= stop)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp () - stack_size;
 	  return addr;
 	}
     }
@@ -284,8 +284,8 @@
       status = target_read_memory (addr + 2, buf, 2);
       if (status != 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp ();
 	  return addr;
 	}
       stack_size = extract_signed_integer (buf, 2);
@@ -294,8 +294,8 @@
       addr += 4;
       if (addr >= stop)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp () - stack_size;
 	  return addr;
 	}
     }
@@ -304,8 +304,8 @@
       status = target_read_memory (addr + 2, buf, 3);
       if (status != 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp ();
 	  return addr;
 	}
       stack_size = extract_signed_integer (buf, 3);
@@ -314,8 +314,8 @@
       addr += 5;
       if (addr >= stop)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp () - stack_size;
 	  return addr;
 	}
     }
@@ -333,8 +333,8 @@
       status = target_read_memory (addr + 1, buf, 2);
       if (status != 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp ();
 	  return addr;
 	}
 
@@ -345,8 +345,8 @@
       status = find_pc_partial_function (temp, &name, NULL, NULL);
       if (status == 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp ();
 	  return addr;
 	}
 
@@ -359,10 +359,10 @@
 
       if (addr >= stop)
 	{
-	  if (fi && get_next_frame (fi) == NULL)
+	  if (fi && fi->next == NULL)
 	    {
 	      fi->stack_size -= 16;
-	      deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
+	      fi->frame = read_sp () - fi->stack_size;
 	    }
 	  return addr;
 	}
@@ -374,8 +374,8 @@
       status = target_read_memory (addr + 2, buf, 3);
       if (status != 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp ();
 	  return addr;
 	}
 
@@ -386,8 +386,8 @@
       status = find_pc_partial_function (temp, &name, NULL, NULL);
       if (status == 0)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
+	    fi->frame = read_sp ();
 	  return addr;
 	}
 
@@ -400,10 +400,10 @@
 
       if (addr >= stop)
 	{
-	  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
+	  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
 	    {
 	      fi->stack_size -= 16;
-	      deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
+	      fi->frame = read_sp () - fi->stack_size;
 	    }
 	  return addr;
 	}
@@ -420,8 +420,8 @@
 	fi->stack_size -= 16;
 
       /* Update fi->frame if necessary.  */
-      if (fi && get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
+      if (fi && fi->next == NULL)
+	fi->frame = read_sp () - fi->stack_size;
 
       /* After the out of line prologue, there may be another
          stack adjustment for the outgoing arguments.
@@ -435,10 +435,10 @@
 	{
 	  if (fi)
 	    {
-	      fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-	      fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-	      fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-	      fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
+	      fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
+	      fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
+	      fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
+	      fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
 	    }
 	  return addr;
 	}
@@ -455,10 +455,10 @@
 	    {
 	      if (fi)
 		{
-		  fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-		  fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-		  fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-		  fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
+		  fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
+		  fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
+		  fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
+		  fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
 		}
 	      return addr;
 	    }
@@ -470,12 +470,12 @@
 	  status = target_read_memory (addr + 2, buf, 3);
 	  if (status != 0)
 	    {
-	      if (fi && get_next_frame (fi) == NULL)
+	      if (fi && fi->next == NULL)
 		{
-		  fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-		  fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-		  fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-		  fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
+		  fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
+		  fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
+		  fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
+		  fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
 		}
 	      return addr;
 	    }
@@ -487,17 +487,17 @@
 
       /* Now that we know the size of the outgoing arguments, fix
          fi->frame again if this is the innermost frame.  */
-      if (fi && get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, get_frame_base (fi) - outgoing_args_size);
+      if (fi && fi->next == NULL)
+	fi->frame -= outgoing_args_size;
 
       /* Note the register save information and update the stack
          size for this frame too.  */
       if (fi)
 	{
-	  fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-	  fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-	  fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-	  fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
+	  fi->fsr.regs[2] = fi->frame + fi->stack_size + 4;
+	  fi->fsr.regs[3] = fi->frame + fi->stack_size + 8;
+	  fi->fsr.regs[5] = fi->frame + fi->stack_size + 12;
+	  fi->fsr.regs[6] = fi->frame + fi->stack_size + 16;
 	  fi->stack_size += outgoing_args_size;
 	}
       /* There can be no more prologue insns, so return now.  */
@@ -509,8 +509,8 @@
      If MY_FRAME_IN_SP is set and we're the innermost frame, then we
      need to fix fi->frame so that backtracing, find_frame_saved_regs,
      etc work correctly.  */
-  if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
-    deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
+  if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
+    fi->frame = read_sp () - fi->stack_size;
 
   /* And last we have the register saves.  These are relatively
      simple because they're physically done off the stack pointer,
@@ -534,7 +534,7 @@
 	  status = target_read_memory (addr + 2, buf, 1);
 	  if (status != 0)
 	    return addr;
-	  fi->fsr.regs[2] = (get_frame_base (fi) + stack_size
+	  fi->fsr.regs[2] = (fi->frame + stack_size
 			     + extract_signed_integer (buf, 1));
 	}
       addr += 3;
@@ -551,7 +551,7 @@
 	  status = target_read_memory (addr + 2, buf, 1);
 	  if (status != 0)
 	    return addr;
-	  fi->fsr.regs[3] = (get_frame_base (fi) + stack_size
+	  fi->fsr.regs[3] = (fi->frame + stack_size
 			     + extract_signed_integer (buf, 1));
 	}
       addr += 3;
@@ -568,7 +568,7 @@
 	  status = target_read_memory (addr + 1, buf, 1);
 	  if (status != 0)
 	    return addr;
-	  fi->fsr.regs[5] = (get_frame_base (fi) + stack_size
+	  fi->fsr.regs[5] = (fi->frame + stack_size
 			     + extract_signed_integer (buf, 1));
 	}
       addr += 2;
@@ -585,7 +585,7 @@
 	  status = target_read_memory (addr + 1, buf, 1);
 	  if (status != 0)
 	    return addr;
-	  fi->fsr.regs[6] = (get_frame_base (fi) + stack_size
+	  fi->fsr.regs[6] = (fi->frame + stack_size
 			     + extract_signed_integer (buf, 1));
 	  fi->status &= ~CALLER_A2_IN_A0;
 	}
@@ -607,9 +607,7 @@
 CORE_ADDR
 mn10200_frame_chain (struct frame_info *fi)
 {
-  struct frame_info *dummy_frame = deprecated_frame_xmalloc ();
-  struct cleanup *old_chain = make_cleanup (xfree, dummy_frame);
-  CORE_ADDR ret;
+  struct frame_info dummy_frame;
 
   /* Walk through the prologue to determine the stack size,
      location of saved registers, end of the prologue, etc.  */
@@ -640,33 +638,31 @@
 
      So we set up a dummy frame and call mn10200_analyze_prologue to
      find stuff for us.  */
-  deprecated_update_frame_pc_hack (dummy_frame, FRAME_SAVED_PC (fi));
-  deprecated_update_frame_base_hack (dummy_frame, get_frame_base (fi));
-  memset (dummy_frame->fsr.regs, '\000', sizeof dummy_frame->fsr.regs);
-  dummy_frame->status = 0;
-  dummy_frame->stack_size = 0;
-  mn10200_analyze_prologue (dummy_frame, 0);
+  dummy_frame.pc = FRAME_SAVED_PC (fi);
+  dummy_frame.frame = fi->frame;
+  memset (dummy_frame.fsr.regs, '\000', sizeof dummy_frame.fsr.regs);
+  dummy_frame.status = 0;
+  dummy_frame.stack_size = 0;
+  mn10200_analyze_prologue (&dummy_frame, 0);
 
-  if (dummy_frame->status & MY_FRAME_IN_FP)
+  if (dummy_frame.status & MY_FRAME_IN_FP)
     {
       /* Our caller has a frame pointer.  So find the frame in $a2, $a0,
          or in the stack.  */
       if (fi->fsr.regs[6])
-	ret = (read_memory_integer (fi->fsr.regs[FP_REGNUM], REGISTER_SIZE)
-	       & 0xffffff);
+	return (read_memory_integer (fi->fsr.regs[FP_REGNUM], REGISTER_SIZE)
+		& 0xffffff);
       else if (fi->status & CALLER_A2_IN_A0)
-	ret = read_register (4);
+	return read_register (4);
       else
-	ret = read_register (FP_REGNUM);
+	return read_register (FP_REGNUM);
     }
   else
     {
       /* Our caller does not have a frame pointer.  So his frame starts
          at the base of our frame (fi->frame) + <his size> + 4 (saved pc).  */
-      ret = get_frame_base (fi) + -dummy_frame->stack_size + 4;
+      return fi->frame + -dummy_frame.stack_size + 4;
     }
-  do_cleanups (old_chain);
-  return ret;
 }
 
 /* Function: skip_prologue
@@ -689,9 +685,7 @@
 {
   int regnum;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     generic_pop_dummy_frame ();
   else
     {
@@ -860,7 +854,7 @@
 mn10200_frame_saved_pc (struct frame_info *fi)
 {
   /* The saved PC will always be at the base of the current frame.  */
-  return (read_memory_integer (get_frame_base (fi), REGISTER_SIZE) & 0xffffff);
+  return (read_memory_integer (fi->frame, REGISTER_SIZE) & 0xffffff);
 }
 
 /* Function: init_extra_frame_info
@@ -868,7 +862,7 @@
    registers.  Most of the work is done in mn10200_analyze_prologue().
 
    Note that when we are called for the last frame (currently active frame),
-   that get_frame_pc (fi) and fi->frame will already be setup.  However, fi->frame will
+   that fi->pc and fi->frame will already be setup.  However, fi->frame will
    be valid only if this routine uses FP.  For previous frames, fi-frame will
    always be correct.  mn10200_analyze_prologue will fix fi->frame if
    it's not valid.
@@ -880,8 +874,8 @@
 void
 mn10200_init_extra_frame_info (struct frame_info *fi)
 {
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
   memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
   fi->status = 0;
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index a3dd012..e503d19 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
 
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
    Foundation, Inc.
 
    This file is part of GDB.
@@ -153,21 +153,17 @@
   static struct frame_info *dummy = NULL;
   if (dummy == NULL)
     {
-      struct frame_extra_info *extra_info;
-      CORE_ADDR *saved_regs;
-      dummy = deprecated_frame_xmalloc ();
-      saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
-      deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
-      extra_info = XMALLOC (struct frame_extra_info);
-      deprecated_set_frame_extra_info_hack (dummy, extra_info);
+      dummy = xmalloc (sizeof (struct frame_info));
+      dummy->saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
+      dummy->extra_info = xmalloc (sizeof (struct frame_extra_info));
     }
-  deprecated_set_frame_next_hack (dummy, NULL);
-  deprecated_set_frame_prev_hack (dummy, NULL);
-  deprecated_update_frame_pc_hack (dummy, pc);
-  deprecated_update_frame_base_hack (dummy, frame);
-  get_frame_extra_info (dummy)->status = 0;
-  get_frame_extra_info (dummy)->stack_size = 0;
-  memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
+  dummy->next = NULL;
+  dummy->prev = NULL;
+  dummy->pc = pc;
+  dummy->frame = frame;
+  dummy->extra_info->status = 0;
+  dummy->extra_info->stack_size = 0;
+  memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS);
   mn10300_analyze_prologue (dummy, 0);
   return dummy;
 }
@@ -209,12 +205,12 @@
 static void
 fix_frame_pointer (struct frame_info *fi, int stack_size)
 {
-  if (fi && get_next_frame (fi) == NULL)
+  if (fi && fi->next == NULL)
     {
-      if (get_frame_extra_info (fi)->status & MY_FRAME_IN_SP)
-	deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
-      else if (get_frame_extra_info (fi)->status & MY_FRAME_IN_FP)
-	deprecated_update_frame_base_hack (fi, read_register (A3_REGNUM));
+      if (fi->extra_info->status & MY_FRAME_IN_SP)
+	fi->frame = read_sp () - stack_size;
+      else if (fi->extra_info->status & MY_FRAME_IN_FP)
+	fi->frame = read_register (A3_REGNUM);
     }
 }
 
@@ -235,59 +231,59 @@
       /* The `other' bit leaves a blank area of four bytes at the
          beginning of its block of saved registers, making it 32 bytes
          long in total.  */
-      get_frame_saved_regs (fi)[LAR_REGNUM]    = get_frame_base (fi) + offset + 4;
-      get_frame_saved_regs (fi)[LIR_REGNUM]    = get_frame_base (fi) + offset + 8;
-      get_frame_saved_regs (fi)[MDR_REGNUM]    = get_frame_base (fi) + offset + 12;
-      get_frame_saved_regs (fi)[A0_REGNUM + 1] = get_frame_base (fi) + offset + 16;
-      get_frame_saved_regs (fi)[A0_REGNUM]     = get_frame_base (fi) + offset + 20;
-      get_frame_saved_regs (fi)[D0_REGNUM + 1] = get_frame_base (fi) + offset + 24;
-      get_frame_saved_regs (fi)[D0_REGNUM]     = get_frame_base (fi) + offset + 28;
+      fi->saved_regs[LAR_REGNUM]    = fi->frame + offset + 4;
+      fi->saved_regs[LIR_REGNUM]    = fi->frame + offset + 8;
+      fi->saved_regs[MDR_REGNUM]    = fi->frame + offset + 12;
+      fi->saved_regs[A0_REGNUM + 1] = fi->frame + offset + 16;
+      fi->saved_regs[A0_REGNUM]     = fi->frame + offset + 20;
+      fi->saved_regs[D0_REGNUM + 1] = fi->frame + offset + 24;
+      fi->saved_regs[D0_REGNUM]     = fi->frame + offset + 28;
       offset += 32;
     }
   if (movm_args & movm_a3_bit)
     {
-      get_frame_saved_regs (fi)[A3_REGNUM] = get_frame_base (fi) + offset;
+      fi->saved_regs[A3_REGNUM] = fi->frame + offset;
       offset += 4;
     }
   if (movm_args & movm_a2_bit)
     {
-      get_frame_saved_regs (fi)[A2_REGNUM] = get_frame_base (fi) + offset;
+      fi->saved_regs[A2_REGNUM] = fi->frame + offset;
       offset += 4;
     }
   if (movm_args & movm_d3_bit)
     {
-      get_frame_saved_regs (fi)[D3_REGNUM] = get_frame_base (fi) + offset;
+      fi->saved_regs[D3_REGNUM] = fi->frame + offset;
       offset += 4;
     }
   if (movm_args & movm_d2_bit)
     {
-      get_frame_saved_regs (fi)[D2_REGNUM] = get_frame_base (fi) + offset;
+      fi->saved_regs[D2_REGNUM] = fi->frame + offset;
       offset += 4;
     }
   if (AM33_MODE)
     {
       if (movm_args & movm_exother_bit)
         {
-          get_frame_saved_regs (fi)[MCVF_REGNUM]   = get_frame_base (fi) + offset;
-          get_frame_saved_regs (fi)[MCRL_REGNUM]   = get_frame_base (fi) + offset + 4;
-          get_frame_saved_regs (fi)[MCRH_REGNUM]   = get_frame_base (fi) + offset + 8;
-          get_frame_saved_regs (fi)[MDRQ_REGNUM]   = get_frame_base (fi) + offset + 12;
-          get_frame_saved_regs (fi)[E0_REGNUM + 1] = get_frame_base (fi) + offset + 16;
-          get_frame_saved_regs (fi)[E0_REGNUM + 0] = get_frame_base (fi) + offset + 20;
+          fi->saved_regs[MCVF_REGNUM]   = fi->frame + offset;
+          fi->saved_regs[MCRL_REGNUM]   = fi->frame + offset + 4;
+          fi->saved_regs[MCRH_REGNUM]   = fi->frame + offset + 8;
+          fi->saved_regs[MDRQ_REGNUM]   = fi->frame + offset + 12;
+          fi->saved_regs[E0_REGNUM + 1] = fi->frame + offset + 16;
+          fi->saved_regs[E0_REGNUM + 0] = fi->frame + offset + 20;
           offset += 24;
         }
       if (movm_args & movm_exreg1_bit)
         {
-          get_frame_saved_regs (fi)[E0_REGNUM + 7] = get_frame_base (fi) + offset;
-          get_frame_saved_regs (fi)[E0_REGNUM + 6] = get_frame_base (fi) + offset + 4;
-          get_frame_saved_regs (fi)[E0_REGNUM + 5] = get_frame_base (fi) + offset + 8;
-          get_frame_saved_regs (fi)[E0_REGNUM + 4] = get_frame_base (fi) + offset + 12;
+          fi->saved_regs[E0_REGNUM + 7] = fi->frame + offset;
+          fi->saved_regs[E0_REGNUM + 6] = fi->frame + offset + 4;
+          fi->saved_regs[E0_REGNUM + 5] = fi->frame + offset + 8;
+          fi->saved_regs[E0_REGNUM + 4] = fi->frame + offset + 12;
           offset += 16;
         }
       if (movm_args & movm_exreg0_bit)
         {
-          get_frame_saved_regs (fi)[E0_REGNUM + 3] = get_frame_base (fi) + offset;
-          get_frame_saved_regs (fi)[E0_REGNUM + 2] = get_frame_base (fi) + offset + 4;
+          fi->saved_regs[E0_REGNUM + 3] = fi->frame + offset;
+          fi->saved_regs[E0_REGNUM + 2] = fi->frame + offset + 4;
           offset += 8;
         }
     }
@@ -401,7 +397,7 @@
 
   /* Use the PC in the frame if it's provided to look up the
      start of this function.  */
-  pc = (fi ? get_frame_pc (fi) : pc);
+  pc = (fi ? fi->pc : pc);
 
   /* Find the start of this function.  */
   status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
@@ -417,13 +413,13 @@
   if (strcmp (name, "start") == 0)
     {
       if (fi != NULL)
-	get_frame_extra_info (fi)->status = NO_MORE_FRAMES;
+	fi->extra_info->status = NO_MORE_FRAMES;
       return pc;
     }
 
   /* At the start of a function our frame is in the stack pointer.  */
   if (fi)
-    get_frame_extra_info (fi)->status = MY_FRAME_IN_SP;
+    fi->extra_info->status = MY_FRAME_IN_SP;
 
   /* Get the next two bytes into buf, we need two because rets is a two
      byte insn and the first isn't enough to uniquely identify it.  */
@@ -438,22 +434,22 @@
      In this case fi->frame is bogus, we need to fix it.  */
   if (fi && buf[0] == 0xf0 && buf[1] == 0xfc)
     {
-      if (get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, read_sp ());
-      return get_frame_pc (fi);
+      if (fi->next == NULL)
+	fi->frame = read_sp ();
+      return fi->pc;
     }
 
   /* Similarly if we're stopped on the first insn of a prologue as our
      frame hasn't been allocated yet.  */
-  if (fi && get_frame_pc (fi) == func_addr)
+  if (fi && fi->pc == func_addr)
     {
-      if (get_next_frame (fi) == NULL)
-	deprecated_update_frame_base_hack (fi, read_sp ());
-      return get_frame_pc (fi);
+      if (fi->next == NULL)
+	fi->frame = read_sp ();
+      return fi->pc;
     }
 
   /* Figure out where to stop scanning.  */
-  stop = fi ? get_frame_pc (fi) : func_end;
+  stop = fi ? fi->pc : func_end;
 
   /* Don't walk off the end of the function.  */
   stop = stop > func_end ? func_end : stop;
@@ -475,7 +471,7 @@
   if (buf[0] == 0xf2 && (buf[1] & 0xf3) == 0xf0)
     {
       if (fi)
-	get_frame_extra_info (fi)->status = NO_MORE_FRAMES;
+	fi->extra_info->status = NO_MORE_FRAMES;
       return addr;
     }
 
@@ -496,8 +492,8 @@
       if (addr >= stop)
 	{
 	  /* Fix fi->frame since it's bogus at this point.  */
-	  if (fi && get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL)
+	    fi->frame = read_sp ();
 
 	  /* Note if/where callee saved registers were saved.  */
 	  set_movm_offsets (fi, movm_args);
@@ -509,8 +505,8 @@
       if (status != 0)
 	{
 	  /* Fix fi->frame since it's bogus at this point.  */
-	  if (fi && get_next_frame (fi) == NULL)
-	    deprecated_update_frame_base_hack (fi, read_sp ());
+	  if (fi && fi->next == NULL)
+	    fi->frame = read_sp ();
 
 	  /* Note if/where callee saved registers were saved.  */
 	  set_movm_offsets (fi, movm_args);
@@ -526,8 +522,8 @@
       /* The frame pointer is now valid.  */
       if (fi)
 	{
-	  get_frame_extra_info (fi)->status |= MY_FRAME_IN_FP;
-	  get_frame_extra_info (fi)->status &= ~MY_FRAME_IN_SP;
+	  fi->extra_info->status |= MY_FRAME_IN_FP;
+	  fi->extra_info->status &= ~MY_FRAME_IN_SP;
 	}
 
       /* Quit now if we're beyond the stop point.  */
@@ -601,7 +597,7 @@
       /* Note the size of the stack in the frame info structure.  */
       stack_size = extract_signed_integer (buf, imm_size);
       if (fi)
-	get_frame_extra_info (fi)->stack_size = stack_size;
+	fi->extra_info->stack_size = stack_size;
 
       /* We just consumed 2 + imm_size bytes.  */
       addr += 2 + imm_size;
@@ -637,14 +633,14 @@
 
   /* Reserve four bytes for every register saved.  */
   for (i = 0; i < NUM_REGS; i++)
-    if (get_frame_saved_regs (fi)[i])
+    if (fi->saved_regs[i])
       adjust += 4;
 
   /* If we saved LIR, then it's most likely we used a `movm'
      instruction with the `other' bit set, in which case the SP is
      decremented by an extra four bytes, "to simplify calculation
      of the transfer area", according to the processor manual.  */
-  if (get_frame_saved_regs (fi)[LIR_REGNUM])
+  if (fi->saved_regs[LIR_REGNUM])
     adjust += 4;
 
   return adjust;
@@ -664,11 +660,11 @@
   struct frame_info *dummy;
   /* Walk through the prologue to determine the stack size,
      location of saved registers, end of the prologue, etc.  */
-  if (get_frame_extra_info (fi)->status == 0)
+  if (fi->extra_info->status == 0)
     mn10300_analyze_prologue (fi, (CORE_ADDR) 0);
 
   /* Quit now if mn10300_analyze_prologue set NO_MORE_FRAMES.  */
-  if (get_frame_extra_info (fi)->status & NO_MORE_FRAMES)
+  if (fi->extra_info->status & NO_MORE_FRAMES)
     return 0;
 
   /* Now that we've analyzed our prologue, determine the frame
@@ -688,14 +684,14 @@
   /* The easiest way to get that info is to analyze our caller's frame.
      So we set up a dummy frame and call mn10300_analyze_prologue to
      find stuff for us.  */
-  dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), get_frame_base (fi));
+  dummy = analyze_dummy_frame (FRAME_SAVED_PC (fi), fi->frame);
 
-  if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_FP)
+  if (dummy->extra_info->status & MY_FRAME_IN_FP)
     {
       /* Our caller has a frame pointer.  So find the frame in $a3 or
          in the stack.  */
-      if (get_frame_saved_regs (fi)[A3_REGNUM])
-	return (read_memory_integer (get_frame_saved_regs (fi)[A3_REGNUM], REGISTER_SIZE));
+      if (fi->saved_regs[A3_REGNUM])
+	return (read_memory_integer (fi->saved_regs[A3_REGNUM], REGISTER_SIZE));
       else
 	return read_register (A3_REGNUM);
     }
@@ -706,7 +702,7 @@
       /* Our caller does not have a frame pointer.  So his frame starts
          at the base of our frame (fi->frame) + register save space
          + <his size>.  */
-      return get_frame_base (fi) + adjust + -get_frame_extra_info (dummy)->stack_size;
+      return fi->frame + adjust + -dummy->extra_info->stack_size;
     }
 }
 
@@ -732,11 +728,11 @@
 
   /* Restore any saved registers.  */
   for (regnum = 0; regnum < NUM_REGS; regnum++)
-    if (get_frame_saved_regs (frame)[regnum] != 0)
+    if (frame->saved_regs[regnum] != 0)
       {
         ULONGEST value;
 
-        value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
+        value = read_memory_unsigned_integer (frame->saved_regs[regnum],
                                               REGISTER_RAW_SIZE (regnum));
         write_register (regnum, value);
       }
@@ -879,7 +875,7 @@
 {
   int adjust = saved_regs_size (fi);
 
-  return (read_memory_integer (get_frame_base (fi) + adjust, REGISTER_SIZE));
+  return (read_memory_integer (fi->frame + adjust, REGISTER_SIZE));
 }
 
 /* Function: mn10300_init_extra_frame_info
@@ -887,7 +883,7 @@
    registers.  Most of the work is done in mn10300_analyze_prologue().
 
    Note that when we are called for the last frame (currently active frame),
-   that get_frame_pc (fi) and fi->frame will already be setup.  However, fi->frame will
+   that fi->pc and fi->frame will already be setup.  However, fi->frame will
    be valid only if this routine uses FP.  For previous frames, fi-frame will
    always be correct.  mn10300_analyze_prologue will fix fi->frame if
    it's not valid.
@@ -899,14 +895,15 @@
 static void
 mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
   frame_saved_regs_zalloc (fi);
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  get_frame_extra_info (fi)->status = 0;
-  get_frame_extra_info (fi)->stack_size = 0;
+  fi->extra_info->status = 0;
+  fi->extra_info->stack_size = 0;
 
   mn10300_analyze_prologue (fi, 0);
 }
@@ -933,10 +930,10 @@
   /* Set up a dummy frame_info, Analyze the prolog and fill in the
      extra info.  */
   /* Results will tell us which type of frame it uses.  */
-  if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_SP)
+  if (dummy->extra_info->status & MY_FRAME_IN_SP)
     {
       *reg = SP_REGNUM;
-      *offset = -(get_frame_extra_info (dummy)->stack_size);
+      *offset = -(dummy->extra_info->stack_size);
     }
   else
     {
@@ -1165,7 +1162,9 @@
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
 
   /* Stack unwinding.  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_saved_pc_after_call (gdbarch, mn10300_saved_pc_after_call);
   set_gdbarch_init_extra_frame_info (gdbarch, mn10300_init_extra_frame_info);
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index fe5ebdf..6e51b83 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -1,6 +1,6 @@
 /* Target dependent code for the NS32000, for GDB.
    Copyright 1986, 1988, 1991, 1992, 1994, 1995, 1998, 1999, 2000, 2001,
-   2002, 2003 Free Software Foundation, Inc.
+   2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,8 +26,8 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "target.h"
+
 #include "arch-utils.h"
-#include "osabi.h"
 
 #include "ns32k-tdep.h"
 #include "gdb_string.h"
@@ -186,7 +186,7 @@
   int width;
 
   numargs = -1;
-  enter_addr = ns32k_get_enter_addr (get_frame_pc (fi));
+  enter_addr = ns32k_get_enter_addr ((fi)->pc);
   if (enter_addr > 0)
     {
       pc = ((enter_addr == 1)
@@ -308,10 +308,10 @@
      FP value, and that address is saved at the previous FP value as a
      4-byte word.  */
 
-  if (inside_entry_file (get_frame_pc (frame)))
+  if (inside_entry_file (frame->pc))
     return 0;
 
-  return (read_memory_integer (get_frame_base (frame), 4));
+  return (read_memory_integer (frame->frame, 4));
 }
 
 
@@ -325,9 +325,9 @@
 
   buf = alloca (ptrbytes);
   /* Get sigcontext address, it is the third parameter on the stack.  */
-  if (get_next_frame (frame))
+  if (frame->next)
     sigcontext_addr = read_memory_typed_address
-      (FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
+      (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
        builtin_type_void_data_ptr);
   else
     sigcontext_addr = read_memory_typed_address
@@ -345,14 +345,14 @@
   if ((get_frame_type (frame) == SIGTRAMP_FRAME))
     return (ns32k_sigtramp_saved_pc (frame)); /* XXXJRT */
 
-  return (read_memory_integer (get_frame_base (frame) + 4, 4));
+  return (read_memory_integer (frame->frame + 4, 4));
 }
 
 static CORE_ADDR
 ns32k_frame_args_address (struct frame_info *frame)
 {
-  if (ns32k_get_enter_addr (get_frame_pc (frame)) > 1)
-    return (get_frame_base (frame));
+  if (ns32k_get_enter_addr (frame->pc) > 1)
+    return (frame->frame);
 
   return (read_register (SP_REGNUM) - 4);
 }
@@ -360,7 +360,7 @@
 static CORE_ADDR
 ns32k_frame_locals_address (struct frame_info *frame)
 {
-  return (get_frame_base (frame));
+  return (frame->frame);
 }
 
 /* Code to initialize the addresses of the saved registers of frame described
@@ -375,33 +375,33 @@
   int localcount;
   CORE_ADDR enter_addr, next_addr;
 
-  if (get_frame_saved_regs (frame))
+  if (frame->saved_regs)
     return;
 
   frame_saved_regs_zalloc (frame);
 
-  enter_addr = ns32k_get_enter_addr (get_frame_pc (frame));
+  enter_addr = ns32k_get_enter_addr (frame->pc);
   if (enter_addr > 1)
     {
       regmask = read_memory_integer (enter_addr + 1, 1) & 0xff;
       localcount = ns32k_localcount (enter_addr);
-      next_addr = get_frame_base (frame) + localcount;
+      next_addr = frame->frame + localcount;
 
       for (regnum = 0; regnum < 8; regnum++)
 	{
           if (regmask & (1 << regnum))
-	    get_frame_saved_regs (frame)[regnum] = next_addr -= 4;
+	    frame->saved_regs[regnum] = next_addr -= 4;
 	}
 
-      get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame) + 4;
-      get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 4;
-      get_frame_saved_regs (frame)[FP_REGNUM] = read_memory_integer (get_frame_base (frame), 4);
+      frame->saved_regs[SP_REGNUM] = frame->frame + 4;
+      frame->saved_regs[PC_REGNUM] = frame->frame + 4;
+      frame->saved_regs[FP_REGNUM] = read_memory_integer (frame->frame, 4);
     }
   else if (enter_addr == 1)
     {
       CORE_ADDR sp = read_register (SP_REGNUM);
-      get_frame_saved_regs (frame)[PC_REGNUM] = sp;
-      get_frame_saved_regs (frame)[SP_REGNUM] = sp + 4;
+      frame->saved_regs[PC_REGNUM] = sp;
+      frame->saved_regs[SP_REGNUM] = sp + 4;
     }
 }
 
@@ -428,13 +428,13 @@
   CORE_ADDR fp;
   int regnum;
 
-  fp = get_frame_base (frame);
+  fp = frame->frame;
   FRAME_INIT_SAVED_REGS (frame);
 
   for (regnum = 0; regnum < 8; regnum++)
-    if (get_frame_saved_regs (frame)[regnum])
+    if (frame->saved_regs[regnum])
       write_register (regnum,
-		      read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
+		      read_memory_integer (frame->saved_regs[regnum], 4));
 
   write_register (FP_REGNUM, read_memory_integer (fp, 4));
   write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -536,19 +536,36 @@
 static struct gdbarch *
 ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
+  struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
-  /* If there is already a candidate, use it.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  /* Try to determine the OS ABI of the object we are loading.  */
+  if (info.abfd != NULL)
+    {
+      osabi = gdbarch_lookup_osabi (info.abfd);
+    }
 
-  gdbarch = gdbarch_alloc (&info, NULL);
+  /* Find a candidate among extant architectures.  */
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the OS ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
+
+  tdep = xmalloc (sizeof (struct gdbarch_tdep));
+  gdbarch = gdbarch_alloc (&info, tdep);
 
   /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
      ready to unwind the PC first (see frame.c:get_prev_frame()).  */
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
 
+  tdep->osabi = osabi;
+
   /* Register info */
   ns32k_gdbarch_init_32082 (gdbarch);
   set_gdbarch_num_regs (gdbarch, NS32K_SP_REGNUM);
@@ -573,6 +590,7 @@
                                    generic_frameless_function_invocation_not);
   
   set_gdbarch_frame_chain (gdbarch, ns32k_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
 
   set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
@@ -613,15 +631,27 @@
   set_gdbarch_function_start_offset (gdbarch, 0);
 
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return (gdbarch);
 }
 
+static void
+ns32k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (tdep == NULL)
+    return;
+
+  fprintf_unfiltered (file, "ns32k_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+}
+
 void
 _initialize_ns32k_tdep (void)
 {
-  gdbarch_register (bfd_arch_ns32k, ns32k_gdbarch_init, NULL);
+  gdbarch_register (bfd_arch_ns32k, ns32k_gdbarch_init, ns32k_dump_tdep);
 
   tm_print_insn = print_insn_ns32k;
 }
diff --git a/gdb/ns32k-tdep.h b/gdb/ns32k-tdep.h
index c2dc71a..c046324 100644
--- a/gdb/ns32k-tdep.h
+++ b/gdb/ns32k-tdep.h
@@ -1,5 +1,5 @@
 /* Target-dependent definitions for GDB on NS32000 systems.
-   Copyright 1987, 1989, 1991, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1987, 1989, 1991, 1993, 1994, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -22,6 +22,8 @@
 #ifndef NS32K_TDEP_H
 #define NS32K_TDEP_H
 
+#include "osabi.h"
+
 /* Register numbers of various important registers.
    Note that some of these values are "real" register numbers,
    and correspond to the general registers of the machine,
@@ -53,6 +55,11 @@
 #define NS32K_MAX_REGISTER_RAW_SIZE     8
 #define NS32K_MAX_REGISTER_VIRTUAL_SIZE 8
 
+struct gdbarch_tdep
+{
+  enum gdb_osabi osabi;
+};
+
 void ns32k_gdbarch_init_32082 (struct gdbarch *);
 void ns32k_gdbarch_init_32382 (struct gdbarch *);
 
diff --git a/gdb/ns32knbsd-tdep.c b/gdb/ns32knbsd-tdep.c
index 33b99d9..ad360c8 100644
--- a/gdb/ns32knbsd-tdep.c
+++ b/gdb/ns32knbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for NS32000 systems running NetBSD.
-   Copyright 2002, 2003 Free Software Foundation, Inc. 
+   Copyright 2002 Free Software Foundation, Inc. 
    Contributed by Wasabi Systems, Inc. 
  
    This file is part of GDB.
@@ -20,7 +20,6 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "osabi.h"
 
 #include "ns32k-tdep.h"
 #include "gdb_string.h"
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 78f207d..69eedd6 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -1022,9 +1022,9 @@
       /* It's a float since it contains a point or an exponent.  */
 
       if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
-	sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
+	sscanf (p, "%g", &putithere->typed_val_float.dval);
       else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
-	sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
+	sscanf (p, "%lg", &putithere->typed_val_float.dval);
       else
 	{
 #ifdef PRINTF_HAS_LONG_DOUBLE
@@ -1277,7 +1277,6 @@
 	return tokentab2[i].token;
       }
 
-  c = 0;
   switch (tokchr = *tokstart)
     {
     case 0:
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 00a57dd..45fe798 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -151,7 +151,8 @@
     function = find_function_in_inferior("objc_lookup_class");
   else
     {
-      complaint (&symfile_complaints, "no way to lookup Objective-C classes");
+      complaint (&symfile_complaints, "no way to lookup Objective-C classes",
+		 0);
       return 0;
     }
 
@@ -178,7 +179,8 @@
     function = find_function_in_inferior("sel_get_any_uid");
   else
     {
-      complaint (&symfile_complaints, "no way to lookup Objective-C selectors");
+      complaint (&symfile_complaints, "no way to lookup Objective-C selectors",
+		 0);
       return 0;
     }
 
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 5b4531a..47d08a2 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -1,5 +1,5 @@
 /* OS ABI variant handling for GDB.
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,32 +24,15 @@
 #include "gdb_string.h"
 
 #include "osabi.h"
-#include "arch-utils.h"
-#include "gdbcmd.h"
-#include "command.h"
 
 #include "elf-bfd.h"
 
-#ifndef GDB_OSABI_DEFAULT
-#define GDB_OSABI_DEFAULT GDB_OSABI_UNKNOWN
-#endif
-
-/* State for the "set osabi" command.  */
-static enum { osabi_auto, osabi_default, osabi_user } user_osabi_state;
-static enum gdb_osabi user_selected_osabi;
-static const char *gdb_osabi_available_names[GDB_OSABI_INVALID + 3] = {
-  "auto",
-  "default",
-  "none",
-  NULL
-};
-static const char *set_osabi_string;
 
 /* This table matches the indices assigned to enum gdb_osabi.  Keep
    them in sync.  */
 static const char * const gdb_osabi_names[] =
 {
-  "none",
+  "<unknown>",
 
   "SVR4",
   "GNU/Hurd",
@@ -105,7 +88,6 @@
 {
   struct gdb_osabi_handler **handler_p;
   const struct bfd_arch_info *arch_info = bfd_lookup_arch (arch, machine);
-  const char **name_ptr;
 
   /* Registering an OS ABI handler for "unknown" is not allowed.  */
   if (osabi == GDB_OSABI_UNKNOWN)
@@ -146,16 +128,6 @@
   (*handler_p)->arch_info = arch_info;
   (*handler_p)->osabi = osabi;
   (*handler_p)->init_osabi = init_osabi;
-
-  /* Add this OS ABI to the list of enum values for "set osabi", if it isn't
-     already there.  */
-  for (name_ptr = gdb_osabi_available_names; *name_ptr; name_ptr ++)
-    {
-      if (*name_ptr == gdbarch_osabi_name (osabi))
-	return;
-    }
-  *name_ptr++ = gdbarch_osabi_name (osabi);
-  *name_ptr = NULL;
 }
 
 
@@ -199,20 +171,6 @@
   enum gdb_osabi osabi, match;
   int match_specific;
 
-  /* If we aren't in "auto" mode, return the specified OS ABI.  */
-  if (user_osabi_state == osabi_user)
-    return user_selected_osabi;
-
-  /* If we don't have a binary, return the default OS ABI (if set) or
-     an inconclusive result (otherwise).  */
-  if (abfd == NULL) 
-    {
-      if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
-	return GDB_OSABI_DEFAULT;
-      else
-	return GDB_OSABI_UNINITIALIZED;
-    }
-
   match = GDB_OSABI_UNKNOWN;
   match_specific = 0;
 
@@ -272,22 +230,18 @@
 	}
     }
 
-  /* If we didn't find a match, but a default was specified at configure
-     time, return the default.  */
-  if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN && match == GDB_OSABI_UNKNOWN)
-    return GDB_OSABI_DEFAULT;
-  else
-    return match;
+  return match;
 }
 
 void
-gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
+gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch,
+                    enum gdb_osabi osabi)
 {
   const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
   const struct bfd_arch_info *compatible;
   struct gdb_osabi_handler *handler;
 
-  if (info.osabi == GDB_OSABI_UNKNOWN)
+  if (osabi == GDB_OSABI_UNKNOWN)
     {
       /* Don't complain about an unknown OSABI.  Assume the user knows
          what they are doing.  */
@@ -297,7 +251,7 @@
   for (handler = gdb_osabi_handler_list; handler != NULL;
        handler = handler->next)
     {
-      if (handler->osabi != info.osabi)
+      if (handler->osabi != osabi)
 	continue;
 
       /* Check whether the machine type and architecture of the
@@ -325,7 +279,7 @@
        "A handler for the OS ABI \"%s\" is not built into this "
        "configuration of GDB.  "
        "Attempting to continue with the default %s settings",
-       gdbarch_osabi_name (info.osabi),
+       gdbarch_osabi_name (osabi),
        bfd_printable_arch_mach (arch_info->arch, arch_info->mach));
 }
 
@@ -488,66 +442,10 @@
   return osabi;
 }
 
-static void
-set_osabi (char *args, int from_tty, struct cmd_list_element *c)
-{
-  struct gdbarch_info info;
 
-  if (strcmp (set_osabi_string, "auto") == 0)
-    user_osabi_state = osabi_auto;
-  else if (strcmp (set_osabi_string, "default") == 0)
-    {
-      user_selected_osabi = GDB_OSABI_DEFAULT;
-      user_osabi_state = osabi_user;
-    }
-  else if (strcmp (set_osabi_string, "none") == 0)
-    {
-      user_selected_osabi = GDB_OSABI_UNKNOWN;
-      user_osabi_state = osabi_user;
-    }
-  else
-    {
-      int i;
-      for (i = 1; i < GDB_OSABI_INVALID; i++)
-	if (strcmp (set_osabi_string, gdbarch_osabi_name (i)) == 0)
-	  {
-	    user_selected_osabi = i;
-	    user_osabi_state = osabi_user;
-	    break;
-	  }
-      if (i == GDB_OSABI_INVALID)
-	internal_error (__FILE__, __LINE__,
-			"Invalid OS ABI \"%s\" passed to command handler.",
-			set_osabi_string);
-    }
-
-  /* NOTE: At some point (true multiple architectures) we'll need to be more
-     graceful here.  */
-  gdbarch_info_init (&info);
-  if (! gdbarch_update_p (info))
-    internal_error (__FILE__, __LINE__, "Updating OS ABI failed.");
-}
-
-void
-show_osabi (char *args, int from_tty)
-{
-  if (user_osabi_state == osabi_auto)
-    printf_filtered ("The current OS ABI is \"auto\" (currently \"%s\").\n",
-		     gdbarch_osabi_name (gdbarch_osabi (current_gdbarch)));
-  else
-    printf_filtered ("The current OS ABI is \"%s\".\n",
-		     gdbarch_osabi_name (user_selected_osabi));
-
-  if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
-    printf_filtered ("The default OS ABI is \"%s\".\n",
-		     gdbarch_osabi_name (GDB_OSABI_DEFAULT));
-}
-
 void
 _initialize_gdb_osabi (void)
 {
-  struct cmd_list_element *c;
-
   if (strcmp (gdb_osabi_names[GDB_OSABI_INVALID], "<invalid>") != 0)
     internal_error
       (__FILE__, __LINE__,
@@ -557,16 +455,4 @@
   gdbarch_register_osabi_sniffer (bfd_arch_unknown,
 				  bfd_target_elf_flavour,
 				  generic_elf_osabi_sniffer);
-
-  if (!GDB_MULTI_ARCH)
-    return;
-
-  /* Register the "set osabi" command.  */
-  c = add_set_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
-			&set_osabi_string, "Set OS ABI of target.", &setlist);
-
-  set_cmd_sfunc (c, set_osabi);
-  add_cmd ("osabi", class_support, show_osabi, "Show OS/ABI of target.",
-	   &showlist);
-  user_osabi_state = osabi_auto;
 }
diff --git a/gdb/osabi.h b/gdb/osabi.h
index d0e33b3..ebff831 100644
--- a/gdb/osabi.h
+++ b/gdb/osabi.h
@@ -1,5 +1,5 @@
 /* OS ABI variant handling for GDB.
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
    
    This file is part of GDB.
 
@@ -21,6 +21,37 @@
 #ifndef OSABI_H
 #define OSABI_H
 
+/* List of known OS ABIs.  If you change this, make sure to update the
+   table in osabi.c.  */
+enum gdb_osabi
+{
+  GDB_OSABI_UNKNOWN = 0,	/* keep this first */
+
+  GDB_OSABI_SVR4,
+  GDB_OSABI_HURD,
+  GDB_OSABI_SOLARIS,
+  GDB_OSABI_OSF1,
+  GDB_OSABI_LINUX,
+  GDB_OSABI_FREEBSD_AOUT,
+  GDB_OSABI_FREEBSD_ELF,
+  GDB_OSABI_NETBSD_AOUT,
+  GDB_OSABI_NETBSD_ELF,
+  GDB_OSABI_WINCE,
+  GDB_OSABI_GO32,
+  GDB_OSABI_NETWARE,
+  GDB_OSABI_IRIX,
+  GDB_OSABI_LYNXOS,
+  GDB_OSABI_INTERIX,
+  GDB_OSABI_HPUX_ELF,
+  GDB_OSABI_HPUX_SOM,
+
+  GDB_OSABI_ARM_EABI_V1,
+  GDB_OSABI_ARM_EABI_V2,
+  GDB_OSABI_ARM_APCS,
+
+  GDB_OSABI_INVALID		/* keep this last */
+};
+
 /* Register an OS ABI sniffer.  Each arch/flavour may have more than
    one sniffer.  This is used to e.g. differentiate one OS's a.out from
    another.  The first sniffer to return something other than
@@ -42,7 +73,8 @@
 enum gdb_osabi gdbarch_lookup_osabi (bfd *);
 
 /* Initialize the gdbarch for the specified OS ABI variant.  */
-void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *);
+void gdbarch_init_osabi (struct gdbarch_info, struct gdbarch *,
+                         enum gdb_osabi);
 
 /* Return the name of the specified OS ABI.  */
 const char *gdbarch_osabi_name (enum gdb_osabi);
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c118cf4..0f6699e 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1,7 +1,7 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
    Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1997, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,7 +31,6 @@
 #include "objfiles.h"
 #include "regcache.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "solib-svr4.h"
 #include "ppc-tdep.h"
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index cf81eb9..48c5647 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -1,5 +1,5 @@
 /* Target-dependent code for GDB, the GNU debugger.
-   Copyright 2000, 2001, 2002, 2003
+   Copyright 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -22,6 +22,8 @@
 #ifndef PPC_TDEP_H
 #define PPC_TDEP_H
 
+#include "osabi.h"
+
 struct frame_info;
 struct value;
 
@@ -54,6 +56,7 @@
 struct gdbarch_tdep
   {
     int wordsize;              /* size in bytes of fixed-point word */
+    enum gdb_osabi osabi;      /* OS / ABI from ELF header */
     int *regoff;               /* byte offsets in register arrays */
     const struct reg *regs;    /* from current variant */
     int ppc_gp0_regnum;		/* GPR register 0 */
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 21ab858..e58bb6a 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for PowerPC systems running NetBSD.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -25,7 +25,6 @@
 #include "target.h"
 #include "breakpoint.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "ppc-tdep.h"
 #include "ppcnbsd-tdep.h"
@@ -208,6 +207,9 @@
 ppcnbsd_init_abi (struct gdbarch_info info,
                   struct gdbarch *gdbarch)
 {
+  /* Stop at main.  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+
   set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
 
   set_solib_svr4_fetch_link_map_offsets (gdbarch,
diff --git a/gdb/regformats/reg-m68k.dat b/gdb/regformats/reg-m68k.dat
index 8928b45..1f0b078 100644
--- a/gdb/regformats/reg-m68k.dat
+++ b/gdb/regformats/reg-m68k.dat
@@ -31,3 +31,5 @@
 32:fpcontrol
 32:fpstatus
 32:fpiaddr
+32:fpcode
+32:fpflags
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a3a8d3d..98cf2d9 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
    Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003
+   1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -34,7 +34,6 @@
 #include "doublest.h"
 #include "value.h"
 #include "parser-defs.h"
-#include "osabi.h"
 
 #include "libbfd.h"		/* for bfd_default_set_arch_mach */
 #include "coff/internal.h"	/* for libcoff.h */
@@ -1856,6 +1855,17 @@
     }
 }
 
+/* For the PowerPC, it appears that the debug info marks float parameters as
+   floats regardless of whether the function is prototyped, but the actual
+   values are always passed in as doubles.  Tell gdb to always assume that
+   floats are passed as doubles and then converted in the callee.  */
+
+static int
+rs6000_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+  return 1;
+}
+
 /* Return whether register N requires conversion when moving from raw format
    to virtual format.
 
@@ -2658,6 +2668,7 @@
   unsigned long mach;
   bfd abfd;
   int sysv_abi;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
   asection *sect;
 
   from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
@@ -2668,6 +2679,9 @@
 
   sysv_abi = info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
 
+  if (info.abfd)
+    osabi = gdbarch_lookup_osabi (info.abfd);
+
   /* Check word size.  If INFO is from a binary file, infer it from
      that, else choose a likely default.  */
   if (from_xcoff_exec)
@@ -2702,7 +2716,7 @@
          meaningful, because 64-bit CPUs can run in 32-bit mode.  So, perform
          separate word size check.  */
       tdep = gdbarch_tdep (arches->gdbarch);
-      if (tdep && tdep->wordsize == wordsize)
+      if (tdep && tdep->wordsize == wordsize && tdep->osabi == osabi)
 	return arches->gdbarch;
     }
 
@@ -2728,6 +2742,7 @@
     }
   tdep = xmalloc (sizeof (struct gdbarch_tdep));
   tdep->wordsize = wordsize;
+  tdep->osabi = osabi;
 
   /* For e500 executables, the apuinfo section is of help here.  Such
      section contains the identifier and revision number of each
@@ -2891,6 +2906,7 @@
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
   set_gdbarch_push_return_address (gdbarch, ppc_push_return_address);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+  set_gdbarch_coerce_float_to_double (gdbarch, rs6000_coerce_float_to_double);
 
   set_gdbarch_register_convertible (gdbarch, rs6000_register_convertible);
   set_gdbarch_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
@@ -2928,6 +2944,8 @@
     set_gdbarch_use_struct_convention (gdbarch,
 				       generic_use_struct_convention);
 
+  set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+
   set_gdbarch_frameless_function_invocation (gdbarch,
                                          rs6000_frameless_function_invocation);
   set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
@@ -2952,7 +2970,7 @@
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return gdbarch;
 }
@@ -2965,7 +2983,8 @@
   if (tdep == NULL)
     return;
 
-  /* FIXME: Dump gdbarch_tdep.  */
+  fprintf_unfiltered (file, "rs6000_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
 }
 
 static struct cmd_list_element *info_powerpc_cmdlist = NULL;
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c313532..964c23a 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for GDB, the GNU debugger.
 
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    Contributed by D.J. Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
    for IBM Deutschland Entwicklung GmbH, IBM Corporation.
@@ -285,12 +285,12 @@
   save_link_regidx = subtract_sp_regidx = 0;
   if (fextra_info)
     {
-      if (fi && get_frame_base (fi))
+      if (fi && fi->frame)
 	{
-          orig_sp = get_frame_base (fi);
+          orig_sp = fi->frame;
           if (! init_extra_info && fextra_info->initialised)
             orig_sp += fextra_info->stack_bought;
-	  saved_regs = get_frame_saved_regs (fi);
+	  saved_regs = fi->saved_regs;
 	}
       if (init_extra_info || !fextra_info->initialised)
 	{
@@ -316,19 +316,18 @@
       if (instr[0] == S390_SYSCALL_OPCODE && test_pc == pc)
 	{
 	  good_prologue = 1;
-	  if (saved_regs && fextra_info && get_next_frame (fi)
-	      && get_frame_extra_info (get_next_frame (fi))
-	      && get_frame_extra_info (get_next_frame (fi))->sigcontext)
+	  if (saved_regs && fextra_info && fi->next && fi->next->extra_info
+	      && fi->next->extra_info->sigcontext)
 	    {
 	      /* We are backtracing from a signal handler */
-	      save_reg_addr = get_frame_extra_info (get_next_frame (fi))->sigcontext +
+	      save_reg_addr = fi->next->extra_info->sigcontext +
 		REGISTER_BYTE (S390_GP0_REGNUM);
 	      for (regidx = 0; regidx < S390_NUM_GPRS; regidx++)
 		{
 		  saved_regs[S390_GP0_REGNUM + regidx] = save_reg_addr;
 		  save_reg_addr += S390_GPR_SIZE;
 		}
-	      save_reg_addr = get_frame_extra_info (get_next_frame (fi))->sigcontext +
+	      save_reg_addr = fi->next->extra_info->sigcontext +
 		(GDB_TARGET_IS_ESAME ? S390X_SIGREGS_FP0_OFFSET :
 		 S390_SIGREGS_FP0_OFFSET);
 	      for (regidx = 0; regidx < S390_NUM_FPRS; regidx++)
@@ -772,10 +771,10 @@
 {
   CORE_ADDR function_start = 0;
 
-  if (get_frame_extra_info (fi) && get_frame_extra_info (fi)->initialised)
-    function_start = get_frame_extra_info (fi)->function_start;
-  else if (get_frame_pc (fi))
-    function_start = get_pc_function_start (get_frame_pc (fi));
+  if (fi->extra_info && fi->extra_info->initialised)
+    function_start = fi->extra_info->function_start;
+  else if (fi->pc)
+    function_start = get_pc_function_start (fi->pc);
   return function_start;
 }
 
@@ -788,14 +787,14 @@
   struct frame_extra_info fextra_info, *fextra_info_ptr;
   int frameless = 0;
 
-  if (get_next_frame (fi) == NULL)		/* no may be frameless */
+  if (fi->next == NULL)		/* no may be frameless */
     {
-      if (get_frame_extra_info (fi))
-	fextra_info_ptr = get_frame_extra_info (fi);
+      if (fi->extra_info)
+	fextra_info_ptr = fi->extra_info;
       else
 	{
 	  fextra_info_ptr = &fextra_info;
-	  s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
+	  s390_get_frame_info (s390_sniff_pc_function_start (fi->pc, fi),
 			       fextra_info_ptr, fi, 1);
 	}
       frameless = ((fextra_info_ptr->stack_bought == 0));
@@ -830,10 +829,11 @@
       if (sighandler_fi)
 	{
 	  if (s390_frameless_function_invocation (sighandler_fi))
-	    orig_sp = get_frame_base (sighandler_fi);
+	    orig_sp = sighandler_fi->frame;
 	  else
 	    orig_sp = ADDR_BITS_REMOVE ((CORE_ADDR)
-					read_memory_integer (get_frame_base (sighandler_fi),
+					read_memory_integer (sighandler_fi->
+							     frame,
 							     S390_GPR_SIZE));
 	  if (orig_sp && sigcaller_pc)
 	    {
@@ -904,12 +904,12 @@
 void
 s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
-  if (get_frame_pc (fi))
-    s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
-			 get_frame_extra_info (fi), fi, 1);
+  fi->extra_info = frame_obstack_alloc (sizeof (struct frame_extra_info));
+  if (fi->pc)
+    s390_get_frame_info (s390_sniff_pc_function_start (fi->pc, fi),
+			 fi->extra_info, fi, 1);
   else
-    s390_memset_extra_info (get_frame_extra_info (fi));
+    s390_memset_extra_info (fi->extra_info);
 }
 
 /* If saved registers of frame FI are not known yet, read and cache them.
@@ -922,19 +922,17 @@
 
   int quick;
 
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     {
       /* zalloc memsets the saved regs */
       frame_saved_regs_zalloc (fi);
-      if (get_frame_pc (fi))
+      if (fi->pc)
 	{
-	  quick = (get_frame_extra_info (fi)
-		   && get_frame_extra_info (fi)->initialised
-		   && get_frame_extra_info (fi)->good_prologue);
-	  s390_get_frame_info (quick
-			       ? get_frame_extra_info (fi)->function_start
-			       : s390_sniff_pc_function_start (get_frame_pc (fi), fi),
-			       get_frame_extra_info (fi), fi, !quick);
+	  quick = (fi->extra_info && fi->extra_info->initialised
+		   && fi->extra_info->good_prologue);
+	  s390_get_frame_info (quick ? fi->extra_info->function_start :
+			       s390_sniff_pc_function_start (fi->pc, fi),
+			       fi->extra_info, fi, !quick);
 	}
     }
 }
@@ -946,35 +944,33 @@
 {
 
   /* Apparently gdb already knows gdb_args_offset itself */
-  return get_frame_base (fi);
+  return fi->frame;
 }
 
 
 static CORE_ADDR
 s390_frame_saved_pc_nofix (struct frame_info *fi)
 {
-  if (get_frame_extra_info (fi) && get_frame_extra_info (fi)->saved_pc_valid)
-    return get_frame_extra_info (fi)->saved_pc;
+  if (fi->extra_info && fi->extra_info->saved_pc_valid)
+    return fi->extra_info->saved_pc;
 
-  if (deprecated_generic_find_dummy_frame (get_frame_pc (fi),
-					   get_frame_base (fi)))
-    return deprecated_read_register_dummy (get_frame_pc (fi),
-					   get_frame_base (fi), S390_PC_REGNUM);
+  if (deprecated_generic_find_dummy_frame (fi->pc, fi->frame))
+    return deprecated_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM);
 
   s390_frame_init_saved_regs (fi);
-  if (get_frame_extra_info (fi))
+  if (fi->extra_info)
     {
-      get_frame_extra_info (fi)->saved_pc_valid = 1;
-      if (get_frame_extra_info (fi)->good_prologue
-          && get_frame_saved_regs (fi)[S390_RETADDR_REGNUM])
-        get_frame_extra_info (fi)->saved_pc
+      fi->extra_info->saved_pc_valid = 1;
+      if (fi->extra_info->good_prologue
+          && fi->saved_regs[S390_RETADDR_REGNUM])
+        fi->extra_info->saved_pc
           = ADDR_BITS_REMOVE (read_memory_integer
-                              (get_frame_saved_regs (fi)[S390_RETADDR_REGNUM],
+                              (fi->saved_regs[S390_RETADDR_REGNUM],
                                S390_GPR_SIZE));
       else
-        get_frame_extra_info (fi)->saved_pc
+        fi->extra_info->saved_pc
           = ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
-      return get_frame_extra_info (fi)->saved_pc;
+      return fi->extra_info->saved_pc;
     }
   return 0;
 }
@@ -984,20 +980,19 @@
 {
   CORE_ADDR saved_pc = 0, sig_pc;
 
-  if (get_frame_extra_info (fi)
-      && get_frame_extra_info (fi)->sig_fixed_saved_pc_valid)
-    return get_frame_extra_info (fi)->sig_fixed_saved_pc;
+  if (fi->extra_info && fi->extra_info->sig_fixed_saved_pc_valid)
+    return fi->extra_info->sig_fixed_saved_pc;
   saved_pc = s390_frame_saved_pc_nofix (fi);
 
-  if (get_frame_extra_info (fi))
+  if (fi->extra_info)
     {
-      get_frame_extra_info (fi)->sig_fixed_saved_pc_valid = 1;
+      fi->extra_info->sig_fixed_saved_pc_valid = 1;
       if (saved_pc)
 	{
 	  if (s390_is_sigreturn (saved_pc, fi, NULL, &sig_pc))
 	    saved_pc = sig_pc;
 	}
-      get_frame_extra_info (fi)->sig_fixed_saved_pc = saved_pc;
+      fi->extra_info->sig_fixed_saved_pc = saved_pc;
     }
   return saved_pc;
 }
@@ -1013,10 +1008,8 @@
 {
   CORE_ADDR prev_fp = 0;
 
-  if (deprecated_generic_find_dummy_frame (get_frame_pc (thisframe),
-					   get_frame_base (thisframe)))
-    return deprecated_read_register_dummy (get_frame_pc (thisframe),
-					   get_frame_base (thisframe),
+  if (deprecated_generic_find_dummy_frame (thisframe->pc, thisframe->frame))
+    return deprecated_read_register_dummy (thisframe->pc, thisframe->frame,
 					   S390_SP_REGNUM);
   else
     {
@@ -1025,7 +1018,7 @@
       struct frame_extra_info prev_fextra_info;
 
       memset (&prev_fextra_info, 0, sizeof (prev_fextra_info));
-      if (get_frame_pc (thisframe))
+      if (thisframe->pc)
 	{
 	  CORE_ADDR saved_pc, sig_pc;
 
@@ -1049,28 +1042,28 @@
 							 frame_pointer_saved_pc
 							 ? 11 : 15)),
 					 S390_GPR_SIZE);
-	  get_frame_extra_info (thisframe)->sigcontext = sregs;
+	  thisframe->extra_info->sigcontext = sregs;
 	}
       else
 	{
-	  if (get_frame_saved_regs (thisframe))
+	  if (thisframe->saved_regs)
 	    {
 	      int regno;
 
               if (prev_fextra_info.frame_pointer_saved_pc
-                  && get_frame_saved_regs (thisframe)[S390_FRAME_REGNUM])
+                  && thisframe->saved_regs[S390_FRAME_REGNUM])
                 regno = S390_FRAME_REGNUM;
               else
                 regno = S390_SP_REGNUM;
 
-	      if (get_frame_saved_regs (thisframe)[regno])
+	      if (thisframe->saved_regs[regno])
                 {
                   /* The SP's entry of `saved_regs' is special.  */
                   if (regno == S390_SP_REGNUM)
-                    prev_fp = get_frame_saved_regs (thisframe)[regno];
+                    prev_fp = thisframe->saved_regs[regno];
                   else
                     prev_fp =
-                      read_memory_integer (get_frame_saved_regs (thisframe)[regno],
+                      read_memory_integer (thisframe->saved_regs[regno],
                                            S390_GPR_SIZE);
                 }
 	    }
@@ -1224,14 +1217,14 @@
   write_register (S390_PC_REGNUM, FRAME_SAVED_PC (frame));
 
   /* Restore any saved registers.  */
-  if (get_frame_saved_regs (frame))
+  if (frame->saved_regs)
     {
       for (regnum = 0; regnum < NUM_REGS; regnum++)
-        if (get_frame_saved_regs (frame)[regnum] != 0)
+        if (frame->saved_regs[regnum] != 0)
           {
             ULONGEST value;
             
-            value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
+            value = read_memory_unsigned_integer (frame->saved_regs[regnum],
                                                   REGISTER_RAW_SIZE (regnum));
             write_register (regnum, value);
           }
@@ -1239,7 +1232,7 @@
       /* Actually cut back the stack.  Remember that the SP's element of
          saved_regs is the old SP itself, not the address at which it is
          saved.  */
-      write_register (S390_SP_REGNUM, get_frame_saved_regs (frame)[S390_SP_REGNUM]);
+      write_register (S390_SP_REGNUM, frame->saved_regs[S390_SP_REGNUM]);
     }
 
   /* Throw away any cached frame information.  */
@@ -1822,6 +1815,7 @@
   set_gdbarch_cannot_fetch_register (gdbarch, s390_cannot_fetch_register);
   set_gdbarch_cannot_store_register (gdbarch, s390_cannot_fetch_register);
   set_gdbarch_use_struct_convention (gdbarch, s390_use_struct_convention);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_register_name (gdbarch, s390_register_name);
   set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
   set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
@@ -1846,6 +1840,8 @@
   set_gdbarch_sizeof_call_dummy_words (gdbarch,
                                        sizeof (s390_call_dummy_words));
   set_gdbarch_call_dummy_words (gdbarch, s390_call_dummy_words);
+  set_gdbarch_coerce_float_to_double (gdbarch,
+                                      standard_coerce_float_to_double);
 
   switch (info.bfd_arch_info->mach)
     {
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 4d3f2c1..5b2f0c5 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -87,7 +87,7 @@
    or Boolean (CONTEXT == TYPE_CODE_BOOL).  */
 
 LONGEST
-scm_unpack (struct type *type, const char *valaddr, enum type_code context)
+scm_unpack (struct type *type, char *valaddr, enum type_code context)
 {
   if (is_scmvalue_type (type))
     {
diff --git a/gdb/scm-lang.h b/gdb/scm-lang.h
index e3af0a1..713b030 100644
--- a/gdb/scm-lang.h
+++ b/gdb/scm-lang.h
@@ -67,4 +67,4 @@
 
 extern int scm_parse (void);
 
-extern LONGEST scm_unpack (struct type *, const char *, enum type_code);
+extern LONGEST scm_unpack (struct type *, char *, enum type_code);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 08281ba..dc68b15 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for Hitachi Super-H, for GDB.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -39,7 +39,6 @@
 #include "floatformat.h"
 #include "regcache.h"
 #include "doublest.h"
-#include "osabi.h"
 
 #include "sh-tdep.h"
 
@@ -929,13 +928,10 @@
 static CORE_ADDR
 sh_frame_chain (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
-    return get_frame_base (frame);	/* dummy frame same as caller's frame */
-  if (get_frame_pc (frame) && !inside_entry_file (get_frame_pc (frame)))
-    return read_memory_integer (get_frame_base (frame)
-				+ get_frame_extra_info (frame)->f_offset, 4);
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return frame->frame;	/* dummy frame same as caller's frame */
+  if (frame->pc && !inside_entry_file (frame->pc))
+    return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, 4);
   else
     return 0;
 }
@@ -970,21 +966,17 @@
 static CORE_ADDR
 sh64_frame_chain (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
-    return get_frame_base (frame);	/* dummy frame same as caller's frame */
-  if (get_frame_pc (frame) && !inside_entry_file (get_frame_pc (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+    return frame->frame;	/* dummy frame same as caller's frame */
+  if (frame->pc && !inside_entry_file (frame->pc))
     {
-      int media_mode = pc_is_isa32 (get_frame_pc (frame));
+      int media_mode = pc_is_isa32 (frame->pc);
       int size;
       if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
 	size = 4;
       else
 	size = REGISTER_RAW_SIZE (translate_insn_rn (FP_REGNUM, media_mode));
-      return read_memory_integer (get_frame_base (frame)
-				  + get_frame_extra_info (frame)->f_offset,
-				  size);
+      return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, size);
     }
   else
     return 0;
@@ -998,20 +990,18 @@
 static CORE_ADDR
 sh_find_callers_reg (struct frame_info *fi, int regnum)
 {
-  for (; fi; fi = get_next_frame (fi))
-    if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				     get_frame_base (fi)))
+  for (; fi; fi = fi->next)
+    if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
       /* When the caller requests PR from the dummy frame, we return PC because
          that's where the previous routine appears to have done a call from. */
-      return deprecated_read_register_dummy (get_frame_pc (fi),
-					     get_frame_base (fi), regnum);
+      return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
     else
       {
 	FRAME_INIT_SAVED_REGS (fi);
-	if (!get_frame_pc (fi))
+	if (!fi->pc)
 	  return 0;
-	if (get_frame_saved_regs (fi)[regnum] != 0)
-	  return read_memory_integer (get_frame_saved_regs (fi)[regnum],
+	if (fi->saved_regs[regnum] != 0)
+	  return read_memory_integer (fi->saved_regs[regnum],
 				      REGISTER_RAW_SIZE (regnum));
       }
   return read_register (regnum);
@@ -1022,28 +1012,26 @@
 {
   int media_mode = 0;
 
-  for (; fi; fi = get_next_frame (fi))
-    if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				     get_frame_base (fi)))
+  for (; fi; fi = fi->next)
+    if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
       /* When the caller requests PR from the dummy frame, we return PC because
          that's where the previous routine appears to have done a call from. */
-      return deprecated_read_register_dummy (get_frame_pc (fi),
-					     get_frame_base (fi), pr_regnum);
+      return deprecated_read_register_dummy (fi->pc, fi->frame, pr_regnum);
     else
       {
 	FRAME_INIT_SAVED_REGS (fi);
-	if (!get_frame_pc (fi))
+	if (!fi->pc)
 	  return 0;
 
-	media_mode = pc_is_isa32 (get_frame_pc (fi));
+	media_mode = pc_is_isa32 (fi->pc);
 
-	if (get_frame_saved_regs (fi)[pr_regnum] != 0)
+	if (fi->saved_regs[pr_regnum] != 0)
 	  {
 	    int gdb_reg_num = translate_insn_rn (pr_regnum, media_mode);
 	    int size = ((gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
 			? 4
 			: REGISTER_RAW_SIZE (gdb_reg_num));
-	    return read_memory_integer (get_frame_saved_regs (fi)[pr_regnum], size);
+	    return read_memory_integer (fi->saved_regs[pr_regnum], size);
 	  }
       }
   return read_register (pr_regnum);
@@ -1065,25 +1053,24 @@
   int opc;
   int insn;
   int r3_val = 0;
-  char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
-							  get_frame_base (fi));
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
   else
-    memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
+    memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
   
   if (dummy_regs)
     {
       /* DANGER!  This is ONLY going to work if the char buffer format of
          the saved registers is byte-for-byte identical to the 
          CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
-      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+      memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
       return;
     }
 
-  get_frame_extra_info (fi)->leaf_function = 1;
-  get_frame_extra_info (fi)->f_offset = 0;
+  fi->extra_info->leaf_function = 1;
+  fi->extra_info->f_offset = 0;
 
   for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
     where[rn] = -1;
@@ -1094,10 +1081,10 @@
      that does not appear to be part of the prologue.  But give up
      after 20 of them, since we're getting silly then. */
 
-  pc = get_pc_function_start (get_frame_pc (fi));
+  pc = get_pc_function_start (fi->pc);
   if (!pc)
     {
-      deprecated_update_frame_pc_hack (fi, 0);
+      fi->pc = 0;
       return;
     }
 
@@ -1115,7 +1102,7 @@
 	{
 	  where[gdbarch_tdep (current_gdbarch)->PR_REGNUM] = depth;
 	  /* If we're storing the pr then this isn't a leaf */
-	  get_frame_extra_info (fi)->leaf_function = 0;
+	  fi->extra_info->leaf_function = 0;
 	  depth += 4;
 	}
       else if (IS_MOV_R3 (insn))
@@ -1153,24 +1140,24 @@
 	  if (rn == FP_REGNUM)
 	    have_fp = 1;
 
-	  get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4;
+	  fi->saved_regs[rn] = fi->frame - where[rn] + depth - 4;
 	}
       else
 	{
-	  get_frame_saved_regs (fi)[rn] = 0;
+	  fi->saved_regs[rn] = 0;
 	}
     }
 
   if (have_fp)
     {
-      get_frame_saved_regs (fi)[SP_REGNUM] = read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4);
+      fi->saved_regs[SP_REGNUM] = read_memory_integer (fi->saved_regs[FP_REGNUM], 4);
     }
   else
     {
-      get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4;
+      fi->saved_regs[SP_REGNUM] = fi->frame - 4;
     }
 
-  get_frame_extra_info (fi)->f_offset = depth - where[FP_REGNUM] - 4;
+  fi->extra_info->f_offset = depth - where[FP_REGNUM] - 4;
   /* Work out the return pc - either from the saved pr or the pr
      value */
 }
@@ -1405,25 +1392,25 @@
   int insn_size;
   int gdb_register_number;
   int register_number;
-  char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), get_frame_base (fi));
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
   
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
   else
-    memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
+    memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
   
   if (dummy_regs)
     {
       /* DANGER!  This is ONLY going to work if the char buffer format of
          the saved registers is byte-for-byte identical to the 
          CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
-      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+      memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
       return;
     }
 
-  get_frame_extra_info (fi)->leaf_function = 1;
-  get_frame_extra_info (fi)->f_offset = 0;
+  fi->extra_info->leaf_function = 1;
+  fi->extra_info->f_offset = 0;
 
   for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
     where[rn] = -1;
@@ -1434,10 +1421,10 @@
      that does not appear to be part of the prologue.  But give up
      after 20 of them, since we're getting silly then. */
 
-  pc = get_pc_function_start (get_frame_pc (fi));
+  pc = get_pc_function_start (fi->pc);
   if (!pc)
     {
-      deprecated_update_frame_pc_hack (fi, 0);
+      fi->pc = 0;
       return;
     }
 
@@ -1473,7 +1460,7 @@
 		  int reg_nr = tdep->PR_C_REGNUM;
 
 		  where[reg_nr] = depth - ((((next_insn & 0xf) ^ 0x8) - 0x8) << 2);
-		  get_frame_extra_info (fi)->leaf_function = 0;
+		  fi->extra_info->leaf_function = 0;
 		  pc += insn_size;
 		}
 	    }
@@ -1501,7 +1488,7 @@
 	      int reg_nr = tdep->PR_C_REGNUM;
 	      where[reg_nr] = depth - (r0_val - 4);
 	      r0_val -= 4;
-	      get_frame_extra_info (fi)->leaf_function = 0;
+	      fi->extra_info->leaf_function = 0;
 	    }
 	  else if (IS_MOV_R14_R0 (insn))
 	    {
@@ -1529,14 +1516,14 @@
 	    {
 	      where[tdep->PR_REGNUM] = 
 		depth - (sign_extend ((insn & 0xffc00) >> 10, 9) << 3);
-	      get_frame_extra_info (fi)->leaf_function = 0;
+	      fi->extra_info->leaf_function = 0;
 	    }
 
 	  else if (IS_STL_R18_R15 (insn))
 	    {
 	      where[tdep->PR_REGNUM] = 
 		depth - (sign_extend ((insn & 0xffc00) >> 10, 9) << 2);
-	      get_frame_extra_info (fi)->leaf_function = 0;
+	      fi->extra_info->leaf_function = 0;
 	    }
 
 	  else if (IS_STQ_R14_R15 (insn))
@@ -1566,11 +1553,11 @@
 
 	  /* Watch out! saved_regs is only for the real registers, and
 	     doesn't include space for the pseudo registers. */
-	  get_frame_saved_regs (fi)[register_number]= get_frame_base (fi) - where[rn] + depth; 
+	  fi->saved_regs[register_number]= fi->frame - where[rn] + depth; 
 	    
 	} 
       else 
-	get_frame_saved_regs (fi)[register_number] = 0; 
+	fi->saved_regs[register_number] = 0; 
     }
 
   if (have_fp)
@@ -1587,12 +1574,12 @@
 	size = 4;
       else
 	size = REGISTER_RAW_SIZE (fp_regnum);
-      get_frame_saved_regs (fi)[sp_regnum] = read_memory_integer (get_frame_saved_regs (fi)[fp_regnum], size);
+      fi->saved_regs[sp_regnum] = read_memory_integer (fi->saved_regs[fp_regnum], size);
     }
   else
-    get_frame_saved_regs (fi)[sp_regnum] = get_frame_base (fi);
+    fi->saved_regs[sp_regnum] = fi->frame;
 
-  get_frame_extra_info (fi)->f_offset = depth - where[fp_regnum]; 
+  fi->extra_info->f_offset = depth - where[fp_regnum]; 
 }
 
 static void
@@ -1606,25 +1593,25 @@
   int opc;
   int insn;
   int r3_val = 0;
-  char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), get_frame_base (fi));
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
   
-  if (get_frame_saved_regs (fi) == NULL)
+  if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
   else
-    memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
+    memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
   
   if (dummy_regs)
     {
       /* DANGER!  This is ONLY going to work if the char buffer format of
          the saved registers is byte-for-byte identical to the 
          CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
-      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+      memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
       return;
     }
 
-  get_frame_extra_info (fi)->leaf_function = 1;
-  get_frame_extra_info (fi)->f_offset = 0;
+  fi->extra_info->leaf_function = 1;
+  fi->extra_info->f_offset = 0;
 
   for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
     where[rn] = -1;
@@ -1635,10 +1622,10 @@
      that does not appear to be part of the prologue.  But give up
      after 20 of them, since we're getting silly then. */
 
-  pc = get_pc_function_start (get_frame_pc (fi));
+  pc = get_pc_function_start (fi->pc);
   if (!pc)
     {
-      deprecated_update_frame_pc_hack (fi, 0);
+      fi->pc = 0;
       return;
     }
 
@@ -1656,7 +1643,7 @@
 	{
 	  where[tdep->PR_REGNUM] = depth;
 	  /* If we're storing the pr then this isn't a leaf */
-	  get_frame_extra_info (fi)->leaf_function = 0;
+	  fi->extra_info->leaf_function = 0;
 	  depth += 4;
 	}
       else if (IS_MOV_R3 (insn))
@@ -1705,25 +1692,25 @@
 	  if (rn == FP_REGNUM)
 	    have_fp = 1;
 
-	  get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4;
+	  fi->saved_regs[rn] = fi->frame - where[rn] + depth - 4;
 	}
       else
 	{
-	  get_frame_saved_regs (fi)[rn] = 0;
+	  fi->saved_regs[rn] = 0;
 	}
     }
 
   if (have_fp)
     {
-      get_frame_saved_regs (fi)[SP_REGNUM] =
-	read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4);
+      fi->saved_regs[SP_REGNUM] =
+	read_memory_integer (fi->saved_regs[FP_REGNUM], 4);
     }
   else
     {
-      get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4;
+      fi->saved_regs[SP_REGNUM] = fi->frame - 4;
     }
 
-  get_frame_extra_info (fi)->f_offset = depth - where[FP_REGNUM] - 4;
+  fi->extra_info->f_offset = depth - where[FP_REGNUM] - 4;
   /* Work out the return pc - either from the saved pr or the pr
      value */
 }
@@ -1733,29 +1720,29 @@
 sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
          by assuming it's always FP.  */
-      deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi),
-									     SP_REGNUM));
-      get_frame_extra_info (fi)->return_pc = deprecated_read_register_dummy (get_frame_pc (fi),
-								  get_frame_base (fi),
+      fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
+						  SP_REGNUM);
+      fi->extra_info->return_pc = deprecated_read_register_dummy (fi->pc,
+								  fi->frame,
 								  PC_REGNUM);
-      get_frame_extra_info (fi)->f_offset = -(CALL_DUMMY_LENGTH + 4);
-      get_frame_extra_info (fi)->leaf_function = 0;
+      fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
+      fi->extra_info->leaf_function = 0;
       return;
     }
   else
     {
       FRAME_INIT_SAVED_REGS (fi);
-      get_frame_extra_info (fi)->return_pc = 
+      fi->extra_info->return_pc = 
 	sh_find_callers_reg (fi, gdbarch_tdep (current_gdbarch)->PR_REGNUM);
     }
 }
@@ -1763,30 +1750,30 @@
 static void
 sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  int media_mode = pc_is_isa32 (get_frame_pc (fi));
+  int media_mode = pc_is_isa32 (fi->pc);
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
 
-  if (get_next_frame (fi)) 
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
          by assuming it's always FP.  */
-      deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), SP_REGNUM));
-      get_frame_extra_info (fi)->return_pc = 
-	deprecated_read_register_dummy (get_frame_pc (fi),
-					get_frame_base (fi), PC_REGNUM);
-      get_frame_extra_info (fi)->f_offset = -(CALL_DUMMY_LENGTH + 4);
-      get_frame_extra_info (fi)->leaf_function = 0;
+      fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
+						  SP_REGNUM);
+      fi->extra_info->return_pc = 
+	deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+      fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
+      fi->extra_info->leaf_function = 0;
       return;
     }
   else
     {
       FRAME_INIT_SAVED_REGS (fi);
-      get_frame_extra_info (fi)->return_pc =
+      fi->extra_info->return_pc =
 	sh64_get_saved_pr (fi, gdbarch_tdep (current_gdbarch)->PR_REGNUM);
     }
 }
@@ -1818,7 +1805,7 @@
      but we are in compact mode, it will become the corresponding 
      compact pseudo register. If there is no corresponding compact 
      pseudo-register what do we do?*/
-  media_mode = pc_is_isa32 (get_frame_pc (frame));
+  media_mode = pc_is_isa32 (frame->pc);
   live_regnum = translate_insn_rn (regnum, media_mode);
 
   /* Note: since the current frame's registers could only have been
@@ -1826,25 +1813,23 @@
      the current frame itself: otherwise, we would be getting the
      previous frame's registers which were saved by the current frame.  */
 
-  while (frame && ((frame = get_next_frame (frame)) != NULL))
+  while (frame && ((frame = frame->next) != NULL))
     {
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				       get_frame_base (frame),
-				       get_frame_base (frame)))
+      if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
 	{
 	  if (lval)		/* found it in a CALL_DUMMY frame */
 	    *lval = not_lval;
 	  if (raw_buffer)
 	    memcpy (raw_buffer,
-		    (deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame))
+		    (deprecated_generic_find_dummy_frame (frame->pc, frame->frame)
 		     + REGISTER_BYTE (regnum)),
 		    REGISTER_RAW_SIZE (regnum));
 	  return;
 	}
 
       FRAME_INIT_SAVED_REGS (frame);
-      if (get_frame_saved_regs (frame) != NULL
-	  && get_frame_saved_regs (frame)[regnum] != 0)
+      if (frame->saved_regs != NULL
+	  && frame->saved_regs[regnum] != 0)
 	{
 	  if (lval)		/* found it saved on the stack */
 	    *lval = lval_memory;
@@ -1852,13 +1837,13 @@
 	    {
 	      if (raw_buffer)	/* SP register treated specially */
 		store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-			       get_frame_saved_regs (frame)[regnum]);
+			       frame->saved_regs[regnum]);
 	    }
 	  else
 	    { /* any other register */
 	      
 	      if (addrp)
-		*addrp = get_frame_saved_regs (frame)[regnum];
+		*addrp = frame->saved_regs[regnum];
 	      if (raw_buffer)
 		{
 		  int size;
@@ -1869,9 +1854,9 @@
 		  else
 		    size = REGISTER_RAW_SIZE (live_regnum);
 		  if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
-		    read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer, size);
+		    read_memory (frame->saved_regs[regnum], raw_buffer, size);
 		  else
-		    read_memory (get_frame_saved_regs (frame)[regnum],
+		    read_memory (frame->saved_regs[regnum],
 				 raw_buffer
 				 + REGISTER_RAW_SIZE (live_regnum)
 				 - size,
@@ -1912,7 +1897,7 @@
 static CORE_ADDR
 sh_frame_saved_pc (struct frame_info *frame)
 {
-  return (get_frame_extra_info (frame)->return_pc);
+  return ((frame)->extra_info->return_pc);
 }
 
 /* Discard from the stack the innermost frame,
@@ -1924,9 +1909,7 @@
   register CORE_ADDR fp;
   register int regnum;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     generic_pop_dummy_frame ();
   else
     {
@@ -1935,11 +1918,11 @@
 
       /* Copy regs from where they were saved in the frame */
       for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
-	if (get_frame_saved_regs (frame)[regnum])
+	if (frame->saved_regs[regnum])
 	  write_register (regnum,
-			  read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
+			  read_memory_integer (frame->saved_regs[regnum], 4));
 
-      write_register (PC_REGNUM, get_frame_extra_info (frame)->return_pc);
+      write_register (PC_REGNUM, frame->extra_info->return_pc);
       write_register (SP_REGNUM, fp + 4);
     }
   flush_cached_frames ();
@@ -1954,11 +1937,9 @@
   register int regnum;
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
 
-  int media_mode = pc_is_isa32 (get_frame_pc (frame));
+  int media_mode = pc_is_isa32 (frame->pc);
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     generic_pop_dummy_frame ();
   else
     {
@@ -1967,7 +1948,7 @@
 
       /* Copy regs from where they were saved in the frame */
       for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
-	if (get_frame_saved_regs (frame)[regnum])
+	if (frame->saved_regs[regnum])
 	  {
 	    int size;
 	    if (tdep->sh_abi == SH_ABI_32
@@ -1978,11 +1959,11 @@
 	      size = REGISTER_RAW_SIZE (translate_insn_rn (regnum,
 							   media_mode));
 	    write_register (regnum,
-			    read_memory_integer (get_frame_saved_regs (frame)[regnum],
+			    read_memory_integer (frame->saved_regs[regnum],
 						 size));
 	  }
 
-      write_register (PC_REGNUM, get_frame_extra_info (frame)->return_pc);
+      write_register (PC_REGNUM, frame->extra_info->return_pc);
       write_register (SP_REGNUM, fp + 8);
     }
   flush_cached_frames ();
@@ -2338,6 +2319,12 @@
 }
 #endif
 
+static int
+sh_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+  return 1;
+}
+
 /* Find a function's return value in the appropriate registers (in
    regbuf), and copy it into valbuf.  Extract from an array REGBUF
    containing the (raw) register state a function return value of type
@@ -2951,7 +2938,7 @@
 static void
 sh64_show_regs (void)
 {
-  if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
+  if (pc_is_isa32 (deprecated_selected_frame->pc))
     sh64_show_media_regs ();
   else
     sh64_show_compact_regs ();
@@ -4126,7 +4113,7 @@
 void
 sh64_do_registers_info (int regnum, int fpregs)
 {
-  if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
+  if (pc_is_isa32 (deprecated_selected_frame->pc))
    sh_do_registers_info (regnum, fpregs);
   else
    sh_compact_do_registers_info (regnum, fpregs); 
@@ -4229,11 +4216,26 @@
   gdbarch_register_name_ftype *sh_register_name;
   gdbarch_deprecated_store_return_value_ftype *sh_store_return_value;
   gdbarch_register_virtual_type_ftype *sh_register_virtual_type;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
-  /* If there is already a candidate, use it.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  /* Try to determine the ABI of the object we are loading.  */
+
+  if (info.abfd != NULL)
+    {
+      osabi = gdbarch_lookup_osabi (info.abfd);
+      /* If we get "unknown" back, just leave it that way.  */
+    }
+
+  /* Find a candidate among the list of pre-declared architectures. */
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
 
   /* None found, create a new architecture from the information
      provided. */
@@ -4244,6 +4246,8 @@
      ready to unwind the PC first (see frame.c:get_prev_frame()).  */
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
 
+  tdep->osabi = osabi;
+
   /* Initialize the register numbers that are not common to all the
      variants to -1, if necessary thse will be overwritten in the case
      statement below. */
@@ -4571,6 +4575,8 @@
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
+  set_gdbarch_coerce_float_to_double (gdbarch, 
+				      sh_coerce_float_to_double);
 
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, sh_push_return_address);
@@ -4583,13 +4589,17 @@
 
   set_gdbarch_frame_args_skip (gdbarch, 0);
   set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, sh_frame_saved_pc);
   set_gdbarch_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
-  /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  /* Hook in ABI-specific overrides, if they have been registered.
+
+     FIXME: if the ABI is unknown, this is probably an embedded target,
+     so we should not warn about this situation.  */
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return gdbarch;
 }
@@ -4602,7 +4612,8 @@
   if (tdep == NULL)
     return;
 
-  /* FIXME: dump the rest of gdbarch_tdep.  */
+  fprintf_unfiltered (file, "sh_dump_tdep: OS ABI = %s\n",
+                      gdbarch_osabi_name (tdep->osabi));
 }
 
 void
diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
index 1b9c8fe..cd7f35a 100644
--- a/gdb/sh-tdep.h
+++ b/gdb/sh-tdep.h
@@ -1,5 +1,5 @@
 /* Target-specific definition for a Hitachi Super-H.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -22,6 +22,8 @@
 #ifndef SH_TDEP_H
 #define SH_TDEP_H
 
+#include "osabi.h"
+
 /* Contributed by Steve Chamberlain sac@cygnus.com */
 
 /* Information that is dependent on the processor variant. */
@@ -87,6 +89,7 @@
     int ARGLAST_REGNUM;
     int FLOAT_ARGLAST_REGNUM;
     int RETURN_REGNUM;
+    enum gdb_osabi osabi;	/* OS/ABI of the inferior */
     enum sh_abi sh_abi;
   };
 
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index f915d2a..d2f042a 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for SuperH running NetBSD, for GDB.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -23,7 +23,6 @@
 #include "gdbcore.h"
 #include "regcache.h"
 #include "value.h"
-#include "osabi.h"
 
 #include "solib-svr4.h"
 
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 3f74dce..6cc9f45 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -418,8 +418,7 @@
   int threshold_warning_given = 0;
 
   /* First validate our arguments.  */
-  re_err = re_comp (arg_string ? arg_string : ".");
-  if (re_err != NULL)
+  if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
     {
       error ("Invalid regexp: %s", re_err);
     }
diff --git a/gdb/somsolib.h b/gdb/somsolib.h
index 60118b2..4b23760 100644
--- a/gdb/somsolib.h
+++ b/gdb/somsolib.h
@@ -36,8 +36,8 @@
 
 extern CORE_ADDR som_solib_get_got_by_pc (CORE_ADDR);
 
-extern int som_solib_section_offsets (struct objfile *,
-				      struct section_offsets *);
+extern int
+som_solib_section_offsets (struct objfile *, struct section_offsets *);
 
 /* Function to be called when the inferior starts up, to discover the names
    of shared libraries that are dynamically linked, the base addresses to
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index b8a014f..45fce0b 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1,7 +1,7 @@
 /* Target-dependent code for the SPARC for GDB, the GNU debugger.
 
    Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+   1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
    Inc.
 
    This file is part of GDB.
@@ -111,6 +111,8 @@
     int reg_save_offset;
     int call_dummy_call_offset;
     int print_insn_mach;
+
+    enum gdb_osabi osabi;
   };
 
 /* Now make GDB_TARGET_IS_SPARC64 a runtime test.  */
@@ -292,19 +294,18 @@
   CORE_ADDR prologue_start, prologue_end;
   int insn;
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+  fi->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
   frame_saved_regs_zalloc (fi);
 
-  get_frame_extra_info (fi)->bottom =
-    (get_next_frame (fi)
-     ? (get_frame_base (fi) == get_frame_base (get_next_frame (fi))
-	? get_frame_extra_info (get_next_frame (fi))->bottom
-	: get_frame_base (get_next_frame (fi)))
-     : read_sp ());
+  fi->extra_info->bottom =
+    (fi->next ?
+     (fi->frame == fi->next->frame ? fi->next->extra_info->bottom : 
+      fi->next->frame) : read_sp ());
 
   /* If fi->next is NULL, then we already set ->frame by passing read_fp()
      to create_new_frame.  */
-  if (get_next_frame (fi))
+  if (fi->next)
     {
       char *buf;
 
@@ -312,33 +313,32 @@
 
       /* Compute ->frame as if not flat.  If it is flat, we'll change
          it later.  */
-      if (get_next_frame (get_next_frame (fi)) != NULL
-	  && ((get_frame_type (get_next_frame (get_next_frame (fi))) == SIGTRAMP_FRAME)
-	      || deprecated_frame_in_dummy (get_next_frame (get_next_frame (fi))))
-	  && frameless_look_for_prologue (get_next_frame (fi)))
+      if (fi->next->next != NULL
+	  && ((get_frame_type (fi->next->next) == SIGTRAMP_FRAME)
+	      || deprecated_frame_in_dummy (fi->next->next))
+	  && frameless_look_for_prologue (fi->next))
 	{
 	  /* A frameless function interrupted by a signal did not change
 	     the frame pointer, fix up frame pointer accordingly.  */
-	  deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
-	  get_frame_extra_info (fi)->bottom =
-	    get_frame_extra_info (get_next_frame (fi))->bottom;
+	  fi->frame = get_frame_base (fi->next);
+	  fi->extra_info->bottom = fi->next->extra_info->bottom;
 	}
       else
 	{
 	  /* Should we adjust for stack bias here? */
 	  get_saved_register (buf, 0, 0, fi, FP_REGNUM, 0);
-	  deprecated_update_frame_base_hack (fi, extract_address (buf, REGISTER_RAW_SIZE (FP_REGNUM)));
+	  fi->frame = extract_address (buf, REGISTER_RAW_SIZE (FP_REGNUM));
 
-	  if (GDB_TARGET_IS_SPARC64 && (get_frame_base (fi) & 1))
-	    deprecated_update_frame_base_hack (fi, get_frame_base (fi) + 2047);
+	  if (GDB_TARGET_IS_SPARC64 && (fi->frame & 1))
+	    fi->frame += 2047;
 	}
     }
 
   /* Decide whether this is a function with a ``flat register window''
      frame.  For such functions, the frame pointer is actually in %i7.  */
-  get_frame_extra_info (fi)->flat = 0;
-  get_frame_extra_info (fi)->in_prologue = 0;
-  if (find_pc_partial_function (get_frame_pc (fi), &name, &prologue_start, &prologue_end))
+  fi->extra_info->flat = 0;
+  fi->extra_info->in_prologue = 0;
+  if (find_pc_partial_function (fi->pc, &name, &prologue_start, &prologue_end))
     {
       /* See if the function starts with an add (which will be of a
          negative number if a flat frame) to the sp.  FIXME: Does not
@@ -362,30 +362,30 @@
 	      buf = alloca (MAX_REGISTER_RAW_SIZE);
 
 	      /* We definitely have a flat frame now.  */
-	      get_frame_extra_info (fi)->flat = 1;
+	      fi->extra_info->flat = 1;
 
-	      get_frame_extra_info (fi)->sp_offset = offset;
+	      fi->extra_info->sp_offset = offset;
 
 	      /* Overwrite the frame's address with the value in %i7.  */
 	      get_saved_register (buf, 0, 0, fi, I7_REGNUM, 0);
-	      deprecated_update_frame_base_hack (fi, extract_address (buf, REGISTER_RAW_SIZE (I7_REGNUM)));
+	      fi->frame = extract_address (buf, REGISTER_RAW_SIZE (I7_REGNUM));
 
-	      if (GDB_TARGET_IS_SPARC64 && (get_frame_base (fi) & 1))
-		deprecated_update_frame_base_hack (fi, get_frame_base (fi) + 2047);
+	      if (GDB_TARGET_IS_SPARC64 && (fi->frame & 1))
+		fi->frame += 2047;
 
 	      /* Record where the fp got saved.  */
-	      get_frame_extra_info (fi)->fp_addr = 
-		get_frame_base (fi) + get_frame_extra_info (fi)->sp_offset + X_SIMM13 (insn);
+	      fi->extra_info->fp_addr = 
+		fi->frame + fi->extra_info->sp_offset + X_SIMM13 (insn);
 
 	      /* Also try to collect where the pc got saved to.  */
-	      get_frame_extra_info (fi)->pc_addr = 0;
+	      fi->extra_info->pc_addr = 0;
 	      insn = fetch_instruction (prologue_start + 12);
 	      if (X_OP (insn) == 3
 		  && X_RD (insn) == 15
 		  && X_OP3 (insn) == 4
 		  && X_RS1 (insn) == 14)
-		get_frame_extra_info (fi)->pc_addr = 
-		  get_frame_base (fi) + get_frame_extra_info (fi)->sp_offset + X_SIMM13 (insn);
+		fi->extra_info->pc_addr = 
+		  fi->frame + fi->extra_info->sp_offset + X_SIMM13 (insn);
 	    }
 	}
       else
@@ -399,30 +399,30 @@
 
 	  sal = find_pc_line (prologue_start, 0);
 	  if (sal.line == 0)	/* no line info, use PC */
-	    prologue_end = get_frame_pc (fi);
+	    prologue_end = fi->pc;
 	  else if (sal.end < prologue_end)
 	    prologue_end = sal.end;
-	  if (get_frame_pc (fi) < prologue_end)
+	  if (fi->pc < prologue_end)
 	    {
-	      for (addr = prologue_start; addr < get_frame_pc (fi); addr += 4)
+	      for (addr = prologue_start; addr < fi->pc; addr += 4)
 		{
 		  insn = read_memory_integer (addr, 4);
 		  if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3c)
 		    break;	/* SAVE seen, stop searching */
 		}
-	      if (addr >= get_frame_pc (fi))
+	      if (addr >= fi->pc)
 		{
-		  get_frame_extra_info (fi)->in_prologue = 1;
-		  deprecated_update_frame_base_hack (fi, read_register (SP_REGNUM));
+		  fi->extra_info->in_prologue = 1;
+		  fi->frame = read_register (SP_REGNUM);
 		}
 	    }
 	}
     }
-  if (get_next_frame (fi) && get_frame_base (fi) == 0)
+  if (fi->next && fi->frame == 0)
     {
       /* Kludge to cause init_prev_frame_info to destroy the new frame.  */
-      deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
-      deprecated_update_frame_pc_hack (fi, get_frame_pc (get_next_frame (fi)));
+      fi->frame = fi->next->frame;
+      fi->pc = fi->next->pc;
     }
 }
 
@@ -469,7 +469,7 @@
 
       /* Solaris2 ucbsigvechandler passes a pointer to a sigcontext
          as the third parameter.  The offset to the saved pc is 12.  */
-      find_pc_partial_function (get_frame_pc (frame), &name,
+      find_pc_partial_function (frame->pc, &name,
 				(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
       if (name && STREQ (name, "ucbsigvechandler"))
 	saved_pc_offset = 12;
@@ -485,10 +485,10 @@
 			  scbuf, sizeof (scbuf));
       return extract_address (scbuf, sizeof (scbuf));
     }
-  else if (get_frame_extra_info (frame)->in_prologue ||
-	   (get_next_frame (frame) != NULL &&
-	    ((get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME) ||
-	     deprecated_frame_in_dummy (get_next_frame (frame))) &&
+  else if (frame->extra_info->in_prologue ||
+	   (frame->next != NULL &&
+	    ((get_frame_type (frame->next) == SIGTRAMP_FRAME) ||
+	     deprecated_frame_in_dummy (frame->next)) &&
 	    frameless_look_for_prologue (frame)))
     {
       /* A frameless function interrupted by a signal did not save
@@ -497,10 +497,10 @@
 			  frame, O7_REGNUM, (enum lval_type *) NULL);
       return PC_ADJUST (extract_address (buf, SPARC_INTREG_SIZE));
     }
-  if (get_frame_extra_info (frame)->flat)
-    addr = get_frame_extra_info (frame)->pc_addr;
+  if (frame->extra_info->flat)
+    addr = frame->extra_info->pc_addr;
   else
-    addr = get_frame_extra_info (frame)->bottom + FRAME_SAVED_I0 +
+    addr = frame->extra_info->bottom + FRAME_SAVED_I0 +
       SPARC_INTREG_SIZE * (I7_REGNUM - I0_REGNUM);
 
   if (addr == 0)
@@ -534,8 +534,8 @@
     internal_error (__FILE__, __LINE__,
 		    "create_new_frame returned invalid frame");
 
-  get_frame_extra_info (frame)->bottom = argv[1];
-  deprecated_update_frame_pc_hack (frame, FRAME_SAVED_PC (frame));
+  frame->extra_info->bottom = argv[1];
+  frame->pc = FRAME_SAVED_PC (frame);
   return frame;
 }
 
@@ -676,7 +676,7 @@
 	{
 	  if (saved_regs && X_I (insn))
 	    saved_regs[X_RD (insn)] =
-	      get_frame_base (fi) + get_frame_extra_info (fi)->sp_offset + X_SIMM13 (insn);
+	      fi->frame + fi->extra_info->sp_offset + X_SIMM13 (insn);
 	}
       else
 	break;
@@ -825,7 +825,7 @@
     }
 
 
-  frame1 = get_next_frame (frame);
+  frame1 = frame->next;
 
   /* Get saved PC from the frame info if not in innermost frame.  */
   if (regnum == PC_REGNUM && frame1 != NULL)
@@ -835,7 +835,7 @@
       if (raw_buffer != NULL)
 	{
 	  /* Put it back in target format.  */
-	  store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), get_frame_pc (frame));
+	  store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), frame->pc);
 	}
       if (addrp != NULL)
 	*addrp = 0;
@@ -846,16 +846,15 @@
     {
       /* FIXME MVS: wrong test for dummy frame at entry.  */
 
-      if (get_frame_pc (frame1) >= (get_frame_extra_info (frame1)->bottom
-				    ? get_frame_extra_info (frame1)->bottom
-				    : read_sp ())
-	  && get_frame_pc (frame1) <= get_frame_base (frame1))
+      if (frame1->pc >= (frame1->extra_info->bottom ? 
+			 frame1->extra_info->bottom : read_sp ())
+	  && frame1->pc <= get_frame_base (frame1))
 	{
 	  /* Dummy frame.  All but the window regs are in there somewhere.
 	     The window registers are saved on the stack, just like in a
 	     normal frame.  */
 	  if (regnum >= G1_REGNUM && regnum < G1_REGNUM + 7)
-	    addr = get_frame_base (frame1) + (regnum - G0_REGNUM) * SPARC_INTREG_SIZE
+	    addr = frame1->frame + (regnum - G0_REGNUM) * SPARC_INTREG_SIZE
 	      - (FP_REGISTER_BYTES + 8 * SPARC_INTREG_SIZE);
 	  else if (regnum >= I0_REGNUM && regnum < I0_REGNUM + 8)
 	    /* NOTE: cagney/2002-05-04: The call to get_prev_frame()
@@ -863,7 +862,7 @@
                This is because frame1 is initialized to frame->next
                (frame1->prev == frame) and is then advanced towards
                the innermost (next) frame.  */
-	    addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+	    addr = (get_prev_frame (frame1)->extra_info->bottom
 		    + (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
 		    + FRAME_SAVED_I0);
 	  else if (regnum >= L0_REGNUM && regnum < L0_REGNUM + 8)
@@ -872,31 +871,31 @@
                This is because frame1 is initialized to frame->next
                (frame1->prev == frame) and is then advanced towards
                the innermost (next) frame.  */
-	    addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+	    addr = (get_prev_frame (frame1)->extra_info->bottom
 		    + (regnum - L0_REGNUM) * SPARC_INTREG_SIZE
 		    + FRAME_SAVED_L0);
 	  else if (regnum >= O0_REGNUM && regnum < O0_REGNUM + 8)
-	    addr = get_frame_base (frame1) + (regnum - O0_REGNUM) * SPARC_INTREG_SIZE
+	    addr = frame1->frame + (regnum - O0_REGNUM) * SPARC_INTREG_SIZE
 	      - (FP_REGISTER_BYTES + 16 * SPARC_INTREG_SIZE);
 	  else if (SPARC_HAS_FPU &&
 		   regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32)
-	    addr = get_frame_base (frame1) + (regnum - FP0_REGNUM) * 4
+	    addr = frame1->frame + (regnum - FP0_REGNUM) * 4
 	      - (FP_REGISTER_BYTES);
 	  else if (GDB_TARGET_IS_SPARC64 && SPARC_HAS_FPU && 
 		   regnum >= FP0_REGNUM + 32 && regnum < FP_MAX_REGNUM)
-	    addr = get_frame_base (frame1) + 32 * 4 + (regnum - FP0_REGNUM - 32) * 8
+	    addr = frame1->frame + 32 * 4 + (regnum - FP0_REGNUM - 32) * 8
 	      - (FP_REGISTER_BYTES);
 	  else if (regnum >= Y_REGNUM && regnum < NUM_REGS)
-	    addr = get_frame_base (frame1) + (regnum - Y_REGNUM) * SPARC_INTREG_SIZE
+	    addr = frame1->frame + (regnum - Y_REGNUM) * SPARC_INTREG_SIZE
 	      - (FP_REGISTER_BYTES + 24 * SPARC_INTREG_SIZE);
 	}
-      else if (get_frame_extra_info (frame1)->flat)
+      else if (frame1->extra_info->flat)
 	{
 
 	  if (regnum == RP_REGNUM)
-	    addr = get_frame_extra_info (frame1)->pc_addr;
+	    addr = frame1->extra_info->pc_addr;
 	  else if (regnum == I7_REGNUM)
-	    addr = get_frame_extra_info (frame1)->fp_addr;
+	    addr = frame1->extra_info->fp_addr;
 	  else
 	    {
 	      CORE_ADDR func_start;
@@ -905,7 +904,7 @@
 	      regs = alloca (NUM_REGS * sizeof (CORE_ADDR)); 
 	      memset (regs, 0, NUM_REGS * sizeof (CORE_ADDR));
 
-	      find_pc_partial_function (get_frame_pc (frame1), NULL, &func_start, NULL);
+	      find_pc_partial_function (frame1->pc, NULL, &func_start, NULL);
 	      examine_prologue (func_start, 0, frame1, regs);
 	      addr = regs[regnum];
 	    }
@@ -914,11 +913,11 @@
 	{
 	  /* Normal frame.  Local and In registers are saved on stack.  */
 	  if (regnum >= I0_REGNUM && regnum < I0_REGNUM + 8)
-	    addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+	    addr = (get_prev_frame (frame1)->extra_info->bottom
 		    + (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
 		    + FRAME_SAVED_I0);
 	  else if (regnum >= L0_REGNUM && regnum < L0_REGNUM + 8)
-	    addr = (get_frame_extra_info (get_prev_frame (frame1))->bottom
+	    addr = (get_prev_frame (frame1)->extra_info->bottom
 		    + (regnum - L0_REGNUM) * SPARC_INTREG_SIZE
 		    + FRAME_SAVED_L0);
 	  else if (regnum >= O0_REGNUM && regnum < O0_REGNUM + 8)
@@ -931,7 +930,7 @@
 	}
       if (addr != 0)
 	break;
-      frame1 = get_next_frame (frame1);
+      frame1 = frame1->next;
     }
   if (addr != 0)
     {
@@ -1121,10 +1120,9 @@
 
   memset (saved_regs_addr, 0, NUM_REGS * sizeof (CORE_ADDR));
 
-  if (get_frame_pc (fi) >= (get_frame_extra_info (fi)->bottom
-			    ? get_frame_extra_info (fi)->bottom
-			    : read_sp ())
-      && get_frame_pc (fi) <= get_frame_base (fi))
+  if (fi->pc >= (fi->extra_info->bottom ? 
+		 fi->extra_info->bottom : read_sp ())
+      && fi->pc <= get_frame_base (fi))
     {
       /* Dummy frame.  All but the window regs are in there somewhere. */
       for (regnum = G1_REGNUM; regnum < G1_REGNUM + 7; regnum++)
@@ -1159,26 +1157,24 @@
 	    frame_addr + (regnum - Y_REGNUM) * SPARC_INTREG_SIZE
 	    - DUMMY_STACK_REG_BUF_SIZE;
 
-      frame_addr = (get_frame_extra_info (fi)->bottom
-		    ? get_frame_extra_info (fi)->bottom
-		    : read_sp ());
+      frame_addr = fi->extra_info->bottom ?
+	fi->extra_info->bottom : read_sp ();
     }
-  else if (get_frame_extra_info (fi)->flat)
+  else if (fi->extra_info->flat)
     {
       CORE_ADDR func_start;
-      find_pc_partial_function (get_frame_pc (fi), NULL, &func_start, NULL);
+      find_pc_partial_function (fi->pc, NULL, &func_start, NULL);
       examine_prologue (func_start, 0, fi, saved_regs_addr);
 
       /* Flat register window frame.  */
-      saved_regs_addr[RP_REGNUM] = get_frame_extra_info (fi)->pc_addr;
-      saved_regs_addr[I7_REGNUM] = get_frame_extra_info (fi)->fp_addr;
+      saved_regs_addr[RP_REGNUM] = fi->extra_info->pc_addr;
+      saved_regs_addr[I7_REGNUM] = fi->extra_info->fp_addr;
     }
   else
     {
       /* Normal frame.  Just Local and In registers */
-      frame_addr = (get_frame_extra_info (fi)->bottom
-		    ? get_frame_extra_info (fi)->bottom
-		    : read_sp ());
+      frame_addr = fi->extra_info->bottom ?
+	fi->extra_info->bottom : read_sp ();
       for (regnum = L0_REGNUM; regnum < L0_REGNUM + 8; regnum++)
 	saved_regs_addr[regnum] =
 	  (frame_addr + (regnum - L0_REGNUM) * SPARC_INTREG_SIZE
@@ -1188,19 +1184,18 @@
 	  (frame_addr + (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
 	   + FRAME_SAVED_I0);
     }
-  if (get_next_frame (fi))
+  if (fi->next)
     {
-      if (get_frame_extra_info (fi)->flat)
+      if (fi->extra_info->flat)
 	{
-	  saved_regs_addr[O7_REGNUM] = get_frame_extra_info (fi)->pc_addr;
+	  saved_regs_addr[O7_REGNUM] = fi->extra_info->pc_addr;
 	}
       else
 	{
 	  /* Pull off either the next frame pointer or the stack pointer */
 	  CORE_ADDR next_next_frame_addr =
-	  (get_frame_extra_info (get_next_frame (fi))->bottom
-	   ? get_frame_extra_info (get_next_frame (fi))->bottom
-	   : read_sp ());
+	  (fi->next->extra_info->bottom ?
+	   fi->next->extra_info->bottom : read_sp ());
 	  for (regnum = O0_REGNUM; regnum < O0_REGNUM + 8; regnum++)
 	    saved_regs_addr[regnum] =
 	      (next_next_frame_addr
@@ -1269,7 +1264,7 @@
 				       7 * SPARC_INTREG_SIZE);
     }
 
-  if (get_frame_extra_info (frame)->flat)
+  if (frame->extra_info->flat)
     {
       /* Each register might or might not have been saved, need to test
          individually.  */
@@ -1292,7 +1287,7 @@
 			read_memory_integer (fsr[O0_REGNUM + 7],
 					     SPARC_INTREG_SIZE));
 
-      write_sp (get_frame_base (frame));
+      write_sp (frame->frame);
     }
   else if (fsr[I0_REGNUM])
     {
@@ -1346,11 +1341,11 @@
 			read_memory_integer (fsr[NPC_REGNUM],
 					     REGISTER_RAW_SIZE (NPC_REGNUM)));
     }
-  else if (get_frame_extra_info (frame)->flat)
+  else if (frame->extra_info->flat)
     {
-      if (get_frame_extra_info (frame)->pc_addr)
+      if (frame->extra_info->pc_addr)
 	pc = PC_ADJUST ((CORE_ADDR)
-			read_memory_integer (get_frame_extra_info (frame)->pc_addr,
+			read_memory_integer (frame->extra_info->pc_addr,
 					     REGISTER_RAW_SIZE (PC_REGNUM)));
       else
 	{
@@ -2691,10 +2686,10 @@
 extern void
 sparc_print_extra_frame_info (struct frame_info *fi)
 {
-  if (fi && get_frame_extra_info (fi) && get_frame_extra_info (fi)->flat)
+  if (fi && fi->extra_info && fi->extra_info->flat)
     printf_filtered (" flat, pc saved at 0x%s, fp saved at 0x%s\n",
-		     paddr_nz (get_frame_extra_info (fi)->pc_addr), 
-		     paddr_nz (get_frame_extra_info (fi)->fp_addr));
+		     paddr_nz (fi->extra_info->pc_addr), 
+		     paddr_nz (fi->extra_info->fp_addr));
 }
 
 /* MULTI_ARCH support */
@@ -3012,6 +3007,14 @@
     sparc_fix_call_dummy (dummy, pc, fun, type, gcc_p);
 }
 
+/* Coerce float to double: a no-op.  */
+
+static int
+sparc_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+  return 1;
+}
+
 /* CALL_DUMMY_ADDRESS: fetch the breakpoint address for a call dummy.  */
 
 static CORE_ADDR
@@ -3074,6 +3077,7 @@
 {
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
   static LONGEST call_dummy_32[] = 
     { 0xbc100001, 0x9de38000, 0xbc100002, 0xbe100003,
@@ -3099,18 +3103,27 @@
 
   /* Try to determine the OS ABI of the object we are loading.  */
 
-  if (info.abfd != NULL
-      && info.osabi == GDB_OSABI_UNKNOWN)
+  if (info.abfd != NULL)
     {
-      /* If it's an ELF file, assume it's Solaris.  */
-      if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
-	info.osabi = GDB_OSABI_SOLARIS;
+      osabi = gdbarch_lookup_osabi (info.abfd);
+      if (osabi == GDB_OSABI_UNKNOWN)
+	{
+	  /* If it's an ELF file, assume it's Solaris.  */
+	  if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
+	    osabi = GDB_OSABI_SOLARIS;
+	}
     }
 
   /* First see if there is already a gdbarch that can satisfy the request.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
 
   /* None found: is the request for a sparc architecture? */
   if (info.bfd_arch_info->arch != bfd_arch_sparc)
@@ -3120,9 +3133,13 @@
   tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
 
+  tdep->osabi = osabi;
+
   /* First set settings that are common for all sparc architectures.  */
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
   set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
+  set_gdbarch_coerce_float_to_double (gdbarch, 
+				      sparc_coerce_float_to_double);
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 1);
@@ -3339,6 +3356,7 @@
     {
     case bfd_mach_sparc:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 72);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3349,6 +3367,7 @@
       break;
     case bfd_mach_sparc_sparclet:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparclet_register_name);
@@ -3359,6 +3378,7 @@
       break;
     case bfd_mach_sparc_sparclite:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 80);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparclite_register_name);
@@ -3369,6 +3389,7 @@
       break;
     case bfd_mach_sparc_v8plus:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 72);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3379,6 +3400,7 @@
       break;
     case bfd_mach_sparc_v8plusa:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 72);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparc32_register_name);
@@ -3389,6 +3411,7 @@
       break;
     case bfd_mach_sparc_sparclite_le:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 80);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparclite_register_name);
@@ -3399,6 +3422,7 @@
       break;
     case bfd_mach_sparc_v9:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 125);
       set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
       set_gdbarch_register_name (gdbarch, sparc64_register_name);
@@ -3409,6 +3433,7 @@
       break;
     case bfd_mach_sparc_v9a:
       set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
+      set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 125);
       set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
       set_gdbarch_register_name (gdbarch, sparc64_register_name);
@@ -3420,7 +3445,7 @@
     }
 
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return gdbarch;
 }
@@ -3433,20 +3458,6 @@
   if (tdep == NULL)
     return;
 
-  fprintf_unfiltered (file, "sparc_dump_tdep: has_fpu = %d\n",
-		      tdep->has_fpu);
-  fprintf_unfiltered (file, "sparc_dump_tdep: fp_register_bytes = %d\n",
-		      tdep->fp_register_bytes);
-  fprintf_unfiltered (file, "sparc_dump_tdep: y_regnum = %d\n",
-		      tdep->y_regnum);
-  fprintf_unfiltered (file, "sparc_dump_tdep: fp_max_regnum = %d\n",
-		      tdep->fp_max_regnum);
-  fprintf_unfiltered (file, "sparc_dump_tdep: intreg_size = %d\n",
-		      tdep->intreg_size);
-  fprintf_unfiltered (file, "sparc_dump_tdep: reg_save_offset = %d\n",
-		      tdep->reg_save_offset);
-  fprintf_unfiltered (file, "sparc_dump_tdep: call_dummy_call_offset = %d\n",
-		      tdep->call_dummy_call_offset);
-  fprintf_unfiltered (file, "sparc_dump_tdep: print_insn_match = %d\n",
-		      tdep->print_insn_mach);
+  fprintf_unfiltered (file, "sparc_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
 }
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 7d4459e..68a67d5 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1,6 +1,6 @@
 /* Support routines for decoding "stabs" debugging information format.
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -242,6 +242,36 @@
       *(pp) = next_symbol_text (objfile);	\
   } while (0)
 
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE /* FIXME: These probably should be our own types (like rs6000_builtin_type
+// OBSOLETE    has its own types) rather than builtin_type_*.  */
+// OBSOLETE static struct type **os9k_type_vector[] =
+// OBSOLETE {
+// OBSOLETE   0,
+// OBSOLETE   &builtin_type_int,
+// OBSOLETE   &builtin_type_char,
+// OBSOLETE   &builtin_type_long,
+// OBSOLETE   &builtin_type_short,
+// OBSOLETE   &builtin_type_unsigned_char,
+// OBSOLETE   &builtin_type_unsigned_short,
+// OBSOLETE   &builtin_type_unsigned_long,
+// OBSOLETE   &builtin_type_unsigned_int,
+// OBSOLETE   &builtin_type_float,
+// OBSOLETE   &builtin_type_double,
+// OBSOLETE   &builtin_type_void,
+// OBSOLETE   &builtin_type_long_double
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static void os9k_init_type_vector (struct type **);
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_init_type_vector (struct type **tv)
+// OBSOLETE {
+// OBSOLETE   unsigned int i;
+// OBSOLETE   for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
+// OBSOLETE     tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
+// OBSOLETE }
+#endif /* OBSOLETE OS9K */
 
 /* Look up a dbx type-number pair.  Return the address of the slot
    where the type for that number-pair is stored.
@@ -306,6 +336,12 @@
 		      (type_vector_length * sizeof (struct type *)));
 	  memset (&type_vector[old_len], 0,
 		  (type_vector_length - old_len) * sizeof (struct type *));
+
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE 	  if (os9k_stabs)
+// OBSOLETE 	    /* Deal with OS9000 fundamental types.  */
+// OBSOLETE 	    os9k_init_type_vector (type_vector);
+#endif /* OBSOLETE OS9K */
 	}
       return (&type_vector[index]);
     }
@@ -1533,13 +1569,9 @@
       if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_FUNC)
 	SYMBOL_TYPE (sym) = lookup_function_type (SYMBOL_TYPE (sym));
 
-      /* All functions in C++ have prototypes.  Stabs does not offer an
-         explicit way to identify prototyped or unprototyped functions,
-         but both GCC and Sun CC emit stabs for the "call-as" type rather
-         than the "declared-as" type for unprototyped functions, so
-         we treat all functions as if they were prototyped.  This is used
-         primarily for promotion when calling the function from GDB.  */
-      TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;
+      /* All functions in C++ have prototypes.  */
+      if (SYMBOL_LANGUAGE (sym) == language_cplus)
+	TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;
 
       /* fall into process_prototype_types */
 
@@ -2005,6 +2037,11 @@
 	}
 #endif
       SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs)
+// OBSOLETE 	add_symbol_to_list (sym, &global_symbols);
+// OBSOLETE       else
+#endif /* OBSOLETE OS9K */
 	add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -2538,6 +2575,24 @@
       break;
 
     case 'f':			/* Function returning another type */
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs && **pp == '(')
+// OBSOLETE 	{
+// OBSOLETE 	  /* Function prototype; parse it.
+// OBSOLETE 	     We must conditionalize this on os9k_stabs because otherwise
+// OBSOLETE 	     it could be confused with a Sun-style (1,3) typenumber
+// OBSOLETE 	     (I think).  */
+// OBSOLETE 	  struct type *t;
+// OBSOLETE 	  ++*pp;
+// OBSOLETE 	  while (**pp != ')')
+// OBSOLETE 	    {
+// OBSOLETE 	      t = read_type (pp, objfile);
+// OBSOLETE 	      if (**pp == ',')
+// OBSOLETE 		++ * pp;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+#endif /* OBSOLETE OS9K */
+
       type1 = read_type (pp, objfile);
       type = make_function_type (type1, dbx_lookup_type (typenums));
       break;
@@ -2616,12 +2671,36 @@
       }
 
     case 'k':			/* Const qualifier on some type (Sun) */
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       /* ezannoni 2002-07-16: This can be safely deleted, because 'c'
+// OBSOLETE 	 means complex type in AIX stabs, while it means const qualifier
+// OBSOLETE 	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
+// OBSOLETE 	 We were erroring out if we were reading AIX stabs.  Right now the
+// OBSOLETE 	 erroring out will happen in the default clause of the switch.  */
+// OBSOLETE     case 'c':			/* Const qualifier on some type (OS9000) */
+// OBSOLETE       /* Because 'c' means other things to AIX and 'k' is perfectly good,
+// OBSOLETE          only accept 'c' in the os9k_stabs case.  */
+// OBSOLETE       if (type_descriptor == 'c' && !os9k_stabs)
+// OBSOLETE 	return error_type (pp, objfile);
+#endif /* OBSOLETE OS9K */
       type = read_type (pp, objfile);
       type = make_cv_type (1, TYPE_VOLATILE (type), type,
 			   dbx_lookup_type (typenums));
       break;
 
     case 'B':			/* Volatile qual on some type (Sun) */
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       /* ezannoni 2002-07-16: This can be safely deleted, because 'i'
+// OBSOLETE 	 means imported type in AIX stabs, while it means volatile qualifier
+// OBSOLETE 	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
+// OBSOLETE 	 We were erroring out if we were reading AIX stabs.  Right now the
+// OBSOLETE 	 erroring out will happen in the default clause of the switch.  */
+// OBSOLETE     case 'i':			/* Volatile qual on some type (OS9000) */
+// OBSOLETE       /* Because 'i' means other things to AIX and 'B' is perfectly good,
+// OBSOLETE          only accept 'i' in the os9k_stabs case.  */
+// OBSOLETE       if (type_descriptor == 'i' && !os9k_stabs)
+// OBSOLETE 	return error_type (pp, objfile);
+#endif /* OBSOLETE OS9K */
       type = read_type (pp, objfile);
       type = make_cv_type (TYPE_CONST (type), 1, type,
 			   dbx_lookup_type (typenums));
@@ -2728,6 +2807,12 @@
       break;
 
     case 'b':
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs)
+// OBSOLETE 	/* Const and volatile qualified type.  */
+// OBSOLETE 	type = read_type (pp, objfile);
+// OBSOLETE       else
+#endif /* OBSOLETE OS9K */
 	{
 	  /* Sun ACC builtin int type */
 	  type = read_sun_builtin_type (pp, typenums, objfile);
@@ -2985,11 +3070,7 @@
   method_name = method_name_from_physname (physname);
 
   if (method_name == NULL)
-    {
-      complaint (&symfile_complaints,
-		 "Method has bad physname %s\n", physname);
-      return;
-    }
+    error ("bad physname %s\n", physname);
 
   if (strcmp (*old_name, method_name) != 0)
     {
@@ -3772,6 +3853,10 @@
 
   while (**pp != ';' && **pp != '\0')
     {
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs && **pp == ',')
+// OBSOLETE 	break;
+#endif /* OBSOLETE OS9K */
       STABS_CONTINUE (pp, objfile);
       /* Get space to record the next field's data.  */
       new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
@@ -3816,9 +3901,9 @@
     }
   if (p[0] == ':' && p[1] == ':')
     {
-      /* (the deleted) chill the list of fields: the last entry (at
-         the head) is a partially constructed entry which we now
-         scrub. */
+      /* (OBSOLETE) chill (OBSOLETE) the list of fields: the last
+         entry (at the head) is a partially constructed entry which we
+         now scrub. */
       fip->list = fip->list->next;
     }
   return 1;
@@ -4425,6 +4510,11 @@
      Fortran adjustable arrays use Adigits or Tdigits for lower or upper;
      for these, produce a type like float[][].  */
 
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   if (os9k_stabs)
+// OBSOLETE     index_type = builtin_type_int;
+// OBSOLETE   else
+#endif /* OBSOLETE OS9K */
     {
       index_type = read_type (pp, objfile);
       if (**pp != ';')
@@ -4438,7 +4528,11 @@
       (*pp)++;
       adjustable = 1;
     }
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
+#else /* OBSOLETE OS9K */
   lower = read_huge_number (pp, ';', &nbits);
+#endif /* OBSOLETE OS9K */
 
   if (nbits != 0)
     return error_type (pp, objfile);
@@ -4499,6 +4593,18 @@
   osyms = *symlist;
   o_nsyms = osyms ? osyms->nsyms : 0;
 
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   if (os9k_stabs)
+// OBSOLETE     {
+// OBSOLETE       /* Size.  Perhaps this does not have to be conditionalized on
+// OBSOLETE          os9k_stabs (assuming the name of an enum constant can't start
+// OBSOLETE          with a digit).  */
+// OBSOLETE       read_huge_number (pp, 0, &nbits);
+// OBSOLETE       if (nbits != 0)
+// OBSOLETE 	return error_type (pp, objfile);
+// OBSOLETE     }
+#endif /* OBSOLETE OS9K */
+
   /* The aix4 compiler emits an extra field before the enum members;
      my guess is it's a type of some sort.  Just ignore it.  */
   if (**pp == '-')
@@ -4736,7 +4842,12 @@
       p++;
     }
 
-  upper_limit = LONG_MAX / radix;
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   if (os9k_stabs)
+// OBSOLETE     upper_limit = ULONG_MAX / radix;
+// OBSOLETE   else
+#endif /* OBSOLETE OS9K */
+    upper_limit = LONG_MAX / radix;
 
   while ((c = *p++) >= '0' && c < ('0' + radix))
     {
@@ -4932,6 +5043,12 @@
   else if (self_subrange && n2 == 0 && n3 == 127)
     return init_type (TYPE_CODE_INT, 1, 0, NULL, objfile);
 
+#if 0
+  /* OBSOLETE else if (current_symbol && SYMBOL_LANGUAGE (current_symbol) == language_chill */
+  /* OBSOLETE          && !self_subrange) */
+  /* OBSOLETE   goto handle_true_range; */
+#endif
+
   /* We used to do this only for subrange of self or subrange of int.  */
   else if (n2 == 0)
     {
@@ -5436,6 +5553,10 @@
 
   /* FIXME: If common_block_name is not already NULL, we should complain().  */
   common_block_name = NULL;
+
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   os9k_stabs = 0;
+#endif /* OBSOLETE OS9K */
 }
 
 /* Call after end_symtab() */
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index e959e7a..017074b 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -151,6 +151,10 @@
 
 extern void finish_global_stabs (struct objfile *objfile);
 
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE EXTERN int os9k_stabs;
+#endif /* OBSOLETE OS9K */
+
 /* COFF files can have multiple .stab sections, if they are linked
    using --split-by-reloc.  This linked list is used to pass the
    information into the functions in dbxread.c.  */
diff --git a/gdb/symfile.c b/gdb/symfile.c
index d2e8dd3..f27391a 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1966,6 +1966,9 @@
       add_filename_language (".c++", language_cplus);
       add_filename_language (".java", language_java);
       add_filename_language (".class", language_java);
+      /* OBSOLETE add_filename_language (".ch", language_chill); */
+      /* OBSOLETE add_filename_language (".c186", language_chill); */
+      /* OBSOLETE add_filename_language (".c286", language_chill); */
       add_filename_language (".m", language_objc);
       add_filename_language (".f", language_fortran);
       add_filename_language (".F", language_fortran);
@@ -2444,6 +2447,10 @@
       SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) =
 	bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
       break;
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) = */
+      /* OBSOLETE     bcache (buf, dem_namelength + 1, objfile->psymbol_cache); */
+
       /* FIXME What should be done for the default case? Ignoring for now. */
     }
 
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 7eab19f..ee10461 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -418,6 +418,10 @@
     {
       gsymbol->language_specific.objc_specific.demangled_name = NULL;
     }
+  /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */
+  /* OBSOLETE   { */
+  /* OBSOLETE     SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */
+  /* OBSOLETE   } */
   else
     {
       memset (&gsymbol->language_specific, 0,
@@ -479,6 +483,26 @@
           gsymbol->language_specific.cplus_specific.demangled_name = NULL;
         }
     }
+#if 0
+  /* OBSOLETE if (demangled == NULL */
+  /* OBSOLETE     && (gsymbol->language == language_chill */
+  /* OBSOLETE         || gsymbol->language == language_auto)) */
+  /* OBSOLETE   { */
+  /* OBSOLETE     demangled = */
+  /* OBSOLETE       chill_demangle (gsymbol->name); */
+  /* OBSOLETE     if (demangled != NULL) */
+  /* OBSOLETE       { */
+  /* OBSOLETE         gsymbol->language = language_chill; */
+  /* OBSOLETE         gsymbol->language_specific.chill_specific.demangled_name = */
+  /* OBSOLETE           obsavestring (demangled, strlen (demangled), obstack); */
+  /* OBSOLETE         xfree (demangled); */
+  /* OBSOLETE       } */
+  /* OBSOLETE     else */
+  /* OBSOLETE       { */
+  /* OBSOLETE         gsymbol->language_specific.chill_specific.demangled_name = NULL; */
+  /* OBSOLETE       } */
+  /* OBSOLETE   } */
+#endif
 }
 
 /* Return the demangled name for a symbol based on the language for
@@ -495,6 +519,9 @@
 
   else 
     return NULL;
+
+  /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */
+  /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */
 }
 
 /* Initialize the structure fields to zero values.  */
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 1d44ace..a9411e8 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -94,6 +94,13 @@
       char *demangled_name;
     }
     objc_specific;
+#if 0
+/* OBSOLETE struct chill_specific        *//* For Chill */
+    /* OBSOLETE   { */
+    /* OBSOLETE     char *demangled_name; */
+    /* OBSOLETE   } */
+    /* OBSOLETE chill_specific; */
+#endif
   }
   language_specific;
 
@@ -158,6 +165,9 @@
   (symbol_demangled_name (&(symbol)->ginfo))
 extern char *symbol_demangled_name (struct general_symbol_info *symbol);
 
+/* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
+/* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
+
 #define SYMBOL_OBJC_DEMANGLED_NAME(symbol)				\
    (symbol)->ginfo.language_specific.objc_specific.demangled_name
 
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 992e8e8..1a0ca46 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,111 +1,3 @@
-2003-01-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.base/detach.exp: New test.
-
-2003-01-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* Makefile.in (ALL_SUBDIRS): New variable.
-	(subdirs, clean, distclean): Use it.
-	* gdb.arch/Makefile.in: Clean up Makefile.  Remove rules for
-	regenerating Makefile, since it is generated from the top level.
-	* gdb.asm/Makefile.in: Likewise.
-	* gdb.base/Makefile.in: Likewise.
-	* gdb.c++/Makefile.in: Likewise.
-	* gdb.disasm/Makefile.in: Likewise.
-	* gdb.java/Makefile.in: Likewise.
-	* gdb.mi/Makefile.in: Likewise.
-	* gdb.threads/Makefile.in: Likewise.
-	* gdb.trace/Makefile.in: Likewise.
-
-2003-01-09  David Carlton  <carlton@math.stanford.edu>
-
-	* gdb.c++/annota2.exp: KFAIL "watch triggered on a.x".
-	Add copyright year 2003.
-
-2003-01-06  Michael Chastain  <mec@shout.net>
-
-	* gdb.mi/mi-pthreads.exp (check_mi_thread_command_set):
-	When selecting a thread, 'line' and 'file' are optional.
-	* gdb.mi/mi1-pthreads.exp: Likewise.
-
-2003-01-06  Andreas Schwab  <schwab@suse.de>
-
-	* lib/gdb.exp: Set LC_ALL to "C" to avoid spurious testsuite
-	failures.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	Fix PR gdb/844
-	* lib/gdb.exp (gdb_compile): Handle "quiet" option.
-	(gdb_compile_pthreads): Pass "quiet" to gdb_compile.
-
-	* gdb.threads/gcore-thread.exp: Use gdb_compile_pthreads.  Return
-	instead of calling gdb_suppress_entire_file.
-	* gdb.threads/print-threads.exp: Likewise.
-	* gdb.threads/schedlock.exp: Likewise.
-
-	* gdb.threads/killed.exp: Return instead of calling
-	gdb_suppress_entire_file.
-	* gdb.threads/linux-dp.exp: Likewise.
-	* gdb.threads/pthreads.exp: Likewise.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.base/callfuncs.exp: Don't XFAIL unprototyped functions for
-	stabs.
-	* gdb.base/completion.exp: Allow marker1(void) as well as marker1().
-	* gdb.base/whatis.exp: Always allow (void) after function names.
-
-2003-01-04  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.c++/casts.exp: Correct regexp.
-
-2003-01-04  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Call AC_CONFIG_HEADER.  Don't call
-	AC_CONFIG_SUBDIRS on gdb.arch, gdb.asm, gdb.base gdb.c++ gdb.java,
-	gdb.disasm, gdb.mi, gdb.threads and gdb.trace.  Call
-	AC_CHECK_HEADERS on pthread.h.  Put Makefiles in the
-	aforementioned directories in the AC_OUPUT call.
-	* config.hin: New file.
-	* gdb.mi/gdb669.exp, gdb.mi/mi-pthreads.exp,
-	gdb.mi/mi1-pthreads.exp, gdb.threads/gcore-thread.exp,
-	gdb.threads/killed.exp, gdb.threads/print-threads.exp,
-	gdb.threads/pthreads.exp, gdb.threads/schedlock.exp: Make sure we
-	pass -I$objdir instead of -I$objdir/$subdir in compilation.
-	* gdb.arch/configure.in, gdb.arch/configure, gdb.asm/configure.in,
-	gdb.asm/configure, gdb.base/configure.in, gdb.base/configure,
-	gdb.c++/configure.in, gdb.c++/configure, gdb.disasm/configure.in,
-	gdb.disasm/configure, gdb.java/configure.in, gdb.java/configure,
-	gdb.mi/configure.in, gdb.mi/configure, gdb.mi/config.in,
-	gdb.threads/configure.in, gdb.threads/configure,
-	gdb.threads/config.in, gdb.trace/configure.in,
-	gdb.trace/configure: Removed.
-
-2003-01-03  Michael Chastain  <mec@shout.net>
-
-	* gdb.base/miscexprs.c: Fix PR gdb/697, "buglet in
-	testsuite/gdb.base/miscexprs.c, off-by-1 array reference".
-
-2003-01-03  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdb.base/store.exp: Fix regular expressions.
-
-2002-12-28  Mark Kettenis  <kettenis@gnu.org>
-
-	* configure.in: Rewrite.
-	* configure: Regenerated.
-
-2003-01-03  David Carlton  <carlton@math.stanford.edu>
-
-	* gdb.base/psymtab.exp: New file.
-	* gdb.base/psymtab1.c: Ditto.
-	* gdb.base/psymtab2.c: Ditto.
-
-2002-12-23  Adam Fedor  <fedor@gnu.org>
-
-	* gdb.base/maint.exp: Update expect output to include 'ObjC'.
-
 2002-12-23  David Carlton  <carlton@math.stanford.edu>
 
 	* gdb.base/selftest.exp (do_steps_and_nexts): Allow initial brace
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 29079d4..f7f610a 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -35,8 +35,6 @@
 EXEEXT = @EXEEXT@
 SUBDIRS = @subdirs@
 RPATH_ENVVAR = @RPATH_ENVVAR@
-ALL_SUBDIRS = gdb.arch gdb.asm gdb.base gdb.c++ gdb.disasm gdb.java gdb.mi \
-	gdb.threads gdb.trace $(SUBDIRS)
 
 EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
           echo $${rootme}/../../expect/expect ; \
@@ -147,7 +145,7 @@
 force:;
 
 subdirs:
-	for dir in ${ALL_SUBDIRS} ; \
+	for dir in ${SUBDIRS} ; \
 	do \
 		echo "$$dir:" ; \
 		if [ -d $$dir ] ; then \
@@ -159,8 +157,8 @@
 
 clean mostlyclean:
 	-rm -f *~ core *.o a.out xgdb *.x *.grt
-	if [ x"${ALL_SUBDIRS}" != x ] ; then \
-	    for dir in ${ALL_SUBDIRS}; \
+	if [ x"${SUBDIRS}" != x ] ; then \
+	    for dir in ${SUBDIRS}; \
 	    do \
 		    echo "$$dir:"; \
 		    if [ -d $$dir ]; then \
@@ -173,8 +171,8 @@
 	-rm -f *~ core
 	-rm -f Makefile config.status *-init.exp
 	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-	if [ x"${ALL_SUBDIRS}" != x ] ; then \
-	    for dir in ${ALL_SUBDIRS}; \
+	if [ x"${SUBDIRS}" != x ] ; then \
+	    for dir in ${SUBDIRS}; \
 	    do \
 		    echo "$$dir:"; \
 		    if [ -d $$dir ]; then \
diff --git a/gdb/testsuite/config.hin b/gdb/testsuite/config.hin
deleted file mode 100644
index 1333b97..0000000
--- a/gdb/testsuite/config.hin
+++ /dev/null
@@ -1,4 +0,0 @@
-/* config.hin.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if you have the <pthread.h> header file.  */
-#undef HAVE_PTHREAD_H
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index 2a2494e..26d555e 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -12,11 +12,9 @@
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_help="$ac_help
-  --with-stabs            arrange to use stabs instead of host debug format"
+  --enable-shared         use shared libraries"
 ac_help="$ac_help
-  --enable-gtk            enable gdbtk graphical user interface (GUI)"
-ac_help="$ac_help
-  --enable-shared         build shared libraries [deault=yes]"
+  --enable-gdbtk "
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -34,7 +32,6 @@
 program_transform_name=s,x,x,
 silent=
 site=
-sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -149,7 +146,6 @@
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
-  --site-file=FILE        use FILE as the site file
   --version               print the version of autoconf that created configure
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -320,11 +316,6 @@
   -site=* | --site=* | --sit=*)
     site="$ac_optarg" ;;
 
-  -site-file | --site-file | --site-fil | --site-fi | --site-f)
-    ac_prev=sitefile ;;
-  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
-    sitefile="$ac_optarg" ;;
-
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -490,16 +481,12 @@
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   fi
-else
-  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -539,9 +526,10 @@
 
 
 
+CC=${CC-cc}
 
 ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
   if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -553,30 +541,33 @@
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
 fi
 ac_config_guess=$ac_aux_dir/config.guess
 ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:564: checking build system type" >&5
 
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
 esac
 
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
 
 # Make sure we can run config.sub.
 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
@@ -584,7 +575,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:588: checking host system type" >&5
+echo "configure:579: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -605,7 +596,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:609: checking target system type" >&5
+echo "configure:600: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -622,231 +613,137 @@
 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:618: checking build system type" >&5
 
-# Directories that need to be configured in all configurations.
-configdirs=
-
-# Add HP-specific tests when appropriate.
-case $target in
-  hppa*-*-hpux*)
-    configdirs="$configdirs gdb.hp" ;;
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
 esac
 
-# With stabs.
-# Check whether --with-stabs or --without-stabs was given.
-if test "${with_stabs+set}" = set; then
-  withval="$with_stabs"
-  :
-else
-  # We enable stabs tests by default on selected targets.
-case $target in
-   powerpc-*-aix* \
- | rs6000-*-aix*  \
- | *-*-bsd*       \
- | *-*-go32*      \
- | *-*-linux*     \
- | *-*-lynxos*    \
- | *-sun-*        \
- | hppa*-*-*      \
- | *-*-elf*       \
- )
-    with_stabs=yes ;;
- *)
-    with_stabs=no ;;
-esac
-fi
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
 
 
-# Add stabs tests when appropriate.
-if test $with_stabs = yes; then
-  configdirs="$configdirs gdb.stabs"
-fi
+# Directories to use in all configurations.
+configdirs="gdb.arch \
+            gdb.asm \
+            gdb.base \
+            gdb.c++ \
+            gdb.java \
+            gdb.disasm \
+            gdb.mi \
+            gdb.threads \
+            gdb.trace"
 
-# Enable gdbtk.
-# Check whether --enable-gdbtk or --disable-gdbtk was given.
-if test "${enable_gdbtk+set}" = set; then
-  enableval="$enable_gdbtk"
-  :
-else
-  if test -d $srcdir/gdb.gdbtk; then
-    enable_gdbtk=yes
-  else
-    enable_gdbtk=no
-  fi
-fi
 
-# We unconditionally disable gdbtk tests on selected platforms.
-case $host_os in
-  go32* | windows*)
-    enable_gdbtk=no ;;
+# Directories to use for a configuration which uses stabs.
+stabsdirs="gdb.stabs"
+
+	# this section is for targets that use stabs
+# add stabs tests for appropriate targets
+case "${target}" in
+	powerpc-*-aix*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	rs6000-*-aix*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-bsd*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-go32*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-linux*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-lynxos*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-sun-*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	hppa*-*-*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-elf*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*)		if test "x${with_stabs}" = x"yes" ; then
+			  configdirs="${configdirs} ${stabsdirs}"
+			fi ;;
 esac
 
-# Add gdbtk tests when appropriate.
-if test $enable_gdbtk = yes; then
-  configdirs="$configdirs gdb.gdbtk"
-fi
+# Directory with HP specific tests. They will run only with HP's compilers. 
+# These tests will not work on other platforms and compilers.
 
-# Enable shared libraries.
+hpdir="gdb.hp"
+
+case "${target}" in
+ hppa*-*-hpux*) configdirs="${configdirs} ${hpdir}" ;;
+esac
+
+
+# Begin stuff to support --enable-shared
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
-  :
-else
-  enable_shared=yes
+  case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *) shared=true ;;
+esac
 fi
-
-
-# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
-# such that we can find the shared libraries in the build tree.
-if test $enable_shared = no; then
-  # The variable `RPATH_ENVVAR' itself is not likely to be used on any
-  # platform.
-  RPATH_ENVVAR=RPATH_ENVVAR
-else
-  # The variable `LD_LIBRARY_PATH' is used on most platforms.
-  RPATH_ENVVAR=LD_LIBRARY_PATH
-  # The following exceptions are taken from Libtool 1.4.3.
-  case $host_os in
-    aix*)
-      if test $host_cpu != ia64; then
-        RPATH_ENVVAR=LIBPATH
-      fi ;;
-    darwin* | rhapsody*)
-      RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
-    hpux*)
-      RPATH_ENVVAR=SHLIB_PATH ;;
+RPATH_ENVVAR=LD_LIBRARY_PATH
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
+if test "${shared}" = "true"; then
+  case "${host}" in
+  *-*-hpux*)
+    RPATH_ENVVAR=SHLIB_PATH
+    ;;
   esac
 fi
 
+# End stuff to support --enable-shared
+# Start stuff to support --enable-gdbtk
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+  enableval="$enable_gdbtk"
+  case "${enableval}" in
+    yes)
+        case "$host" in
+        *go32*)
+            enable_gdbtk=no ;;
+        *windows*)
+            enable_gdbtk=no ;;
+        *)
+            enable_gdbtk=yes ;;
+        esac ;;
+    no)
+        enable_gdbtk=no  ;;
+    *)
+        { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
+esac
+else
+  
+# Default is on for everything but go32 and windows
+case "$host" in
+    *go32* | *windows*)
+        ;;
+    *)
+        enable_gdbtk=yes ;;
+    esac
 
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:724: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
 fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 739 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 756 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 773 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
 
-for ac_hdr in pthread.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:807: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 812 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
+if test "${enable_gdbtk}" = "yes"; then
+    configdirs="${configdirs} gdb.gdbtk"
+fi
+# End stuff to support --enable-shared
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:845: checking for Cygwin environment" >&5
+echo "configure:742: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 850 "configure"
+#line 747 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -857,7 +754,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -874,19 +771,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:878: checking for mingw32 environment" >&5
+echo "configure:775: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 883 "configure"
+#line 780 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -905,7 +802,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:909: checking for executable suffix" >&5
+echo "configure:806: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -915,10 +812,10 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
+      *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
     done
@@ -936,8 +833,10 @@
 ac_exeext=$EXEEXT
 
 
+# configure the subdirectories too
 subdirs="$configdirs"
 
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -1001,7 +900,19 @@
 
 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
-DEFS=-DHAVE_CONFIG_H
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
 
 # Without the "./", some shells look in PATH for config.status.
 : ${CONFIG_STATUS=./config.status}
@@ -1038,9 +949,7 @@
 
 ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
-  gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
-  gdb.threads/Makefile gdb.trace/Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1072,11 +981,7 @@
 s%@oldincludedir@%$oldincludedir%g
 s%@infodir@%$infodir%g
 s%@mandir@%$mandir%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
+s%@CC@%$CC%g
 s%@host@%$host%g
 s%@host_alias@%$host_alias%g
 s%@host_cpu@%$host_cpu%g
@@ -1087,8 +992,12 @@
 s%@target_cpu@%$target_cpu%g
 s%@target_vendor@%$target_vendor%g
 s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
-s%@CPP@%$CPP%g
 s%@EXEEXT@%$EXEEXT%g
 s%@subdirs@%$subdirs%g
 
@@ -1132,9 +1041,7 @@
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
-  gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
-  gdb.threads/Makefile gdb.trace/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1188,113 +1095,6 @@
 fi; done
 rm -f conftest.s*
 
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h:config.hin"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #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.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index 70bbee2..ab37e6d 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -1,118 +1,116 @@
-#                                                       -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
 
-# Copyright (C) 2002
-# 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., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_PREREQ(2.13)
+AC_PREREQ(2.12.1)
 AC_INIT(gdb.base)
-AC_CONFIG_HEADER(config.h:config.hin)
 
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
+AC_CANONICAL_SYSTEM
 
-# Directories that need to be configured in all configurations.
-configdirs=
+# Directories to use in all configurations.
+configdirs="gdb.arch \
+            gdb.asm \
+            gdb.base \
+            gdb.c++ \
+            gdb.java \
+            gdb.disasm \
+            gdb.mi \
+            gdb.threads \
+            gdb.trace"
 
-# Add HP-specific tests when appropriate.
-case $target in
-  hppa*-*-hpux*)
-    configdirs="$configdirs gdb.hp" ;;
+
+# Directories to use for a configuration which uses stabs.
+stabsdirs="gdb.stabs"
+
+	# this section is for targets that use stabs
+# add stabs tests for appropriate targets
+case "${target}" in
+	powerpc-*-aix*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	rs6000-*-aix*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-bsd*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-go32*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-linux*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-lynxos*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-sun-*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	hppa*-*-*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*-*-elf*)	configdirs="${configdirs} ${stabsdirs}" ;;
+	*)		if test "x${with_stabs}" = x"yes" ; then
+			  configdirs="${configdirs} ${stabsdirs}"
+			fi ;;
 esac
 
-# With stabs.
-AC_ARG_WITH(stabs,
-[  --with-stabs            arrange to use stabs instead of host debug format],,
-[# We enable stabs tests by default on selected targets.
-case $target in
-   powerpc-*-aix* \
- | rs6000-*-aix*  \
- | *-*-bsd*       \
- | *-*-go32*      \
- | *-*-linux*     \
- | *-*-lynxos*    \
- | *-sun-*        \
- | hppa*-*-*      \
- | *-*-elf*       \
- )
-    with_stabs=yes ;;
- *)
-    with_stabs=no ;;
-esac])
+# Directory with HP specific tests. They will run only with HP's compilers. 
+# These tests will not work on other platforms and compilers.
 
-# Add stabs tests when appropriate.
-if test $with_stabs = yes; then
-  configdirs="$configdirs gdb.stabs"
-fi
+hpdir="gdb.hp"
 
-# Enable gdbtk.
-AC_ARG_ENABLE(gdbtk,
-[  --enable-gtk            enable gdbtk graphical user interface (GUI)],,
-  [if test -d $srcdir/gdb.gdbtk; then
-    enable_gdbtk=yes
-  else
-    enable_gdbtk=no
-  fi])
-# We unconditionally disable gdbtk tests on selected platforms.
-case $host_os in
-  go32* | windows*)
-    enable_gdbtk=no ;;
+case "${target}" in
+ hppa*-*-hpux*) configdirs="${configdirs} ${hpdir}" ;;
 esac
 
-# Add gdbtk tests when appropriate.
-if test $enable_gdbtk = yes; then
-  configdirs="$configdirs gdb.gdbtk"
-fi
 
-# Enable shared libraries.
+# Begin stuff to support --enable-shared
 AC_ARG_ENABLE(shared,
-[  --enable-shared         build shared libraries [deault=yes]],,
-  enable_shared=yes)
-
-# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
-# such that we can find the shared libraries in the build tree.
-if test $enable_shared = no; then
-  # The variable `RPATH_ENVVAR' itself is not likely to be used on any
-  # platform.
-  RPATH_ENVVAR=RPATH_ENVVAR
-else
-  # The variable `LD_LIBRARY_PATH' is used on most platforms.
-  RPATH_ENVVAR=LD_LIBRARY_PATH
-  # The following exceptions are taken from Libtool 1.4.3.
-  case $host_os in
-    aix*)
-      if test $host_cpu != ia64; then
-        RPATH_ENVVAR=LIBPATH
-      fi ;;
-    darwin* | rhapsody*)
-      RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
-    hpux*)
-      RPATH_ENVVAR=SHLIB_PATH ;;
+[  --enable-shared         use shared libraries],
+[case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *) shared=true ;;
+esac])dnl
+RPATH_ENVVAR=LD_LIBRARY_PATH
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
+if test "${shared}" = "true"; then
+  case "${host}" in
+  *-*-hpux*)
+    RPATH_ENVVAR=SHLIB_PATH
+    ;;
   esac
 fi
 AC_SUBST(RPATH_ENVVAR)
+# End stuff to support --enable-shared
+# Start stuff to support --enable-gdbtk
+AC_ARG_ENABLE(gdbtk,
+[  --enable-gdbtk ],
+[case "${enableval}" in
+    yes)
+        case "$host" in
+        *go32*)
+            enable_gdbtk=no ;;
+        *windows*)
+            enable_gdbtk=no ;;
+        *)
+            enable_gdbtk=yes ;;
+        esac ;;
+    no)
+        enable_gdbtk=no  ;;
+    *)
+        AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
+esac],
+[
+# Default is on for everything but go32 and windows
+case "$host" in
+    *go32* | *windows*)
+        ;;
+    *)
+        enable_gdbtk=yes ;;
+    esac
+])
 
-AC_CHECK_HEADERS(pthread.h)
+if test "${enable_gdbtk}" = "yes"; then
+    configdirs="${configdirs} gdb.gdbtk"
+fi
+# End stuff to support --enable-shared
 
+dnl Check for exe extension set on certain hosts (e.g. Win32)
 AC_EXEEXT
 
+# configure the subdirectories too
 AC_CONFIG_SUBDIRS($configdirs)
-AC_OUTPUT([Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
-  gdb.c++/Makefile gdb.disasm/Makefile gdb.java/Makefile gdb.mi/Makefile \
-  gdb.threads/Makefile gdb.trace/Makefile])
+
+dnl AC_SUBST(gdb_target_cpu)
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.arch/Makefile.in b/gdb/testsuite/gdb.arch/Makefile.in
index 2b6f494..f2dc1a9 100644
--- a/gdb/testsuite/gdb.arch/Makefile.in
+++ b/gdb/testsuite/gdb.arch/Makefile.in
@@ -5,8 +5,16 @@
 
 MISCELLANEOUS =
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all:
+	@echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
 
 clean mostlyclean:
 	-rm -f *~ *.o a.out *.x *.ci *.tmp
@@ -18,3 +26,6 @@
 	-rm -f Makefile config.status config.log
 	-rm -f *-init.exp
 	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.arch/configure b/gdb/testsuite/gdb.arch/configure
new file mode 100755
index 0000000..205116b
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/configure
@@ -0,0 +1,913 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+sitefile=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --site-file=FILE        use FILE as the site file
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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" ;;
+
+  -site-file | --site-file | --site-fil | --site-fi | --site-f)
+    ac_prev=sitefile ;;
+  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+    sitefile="$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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=Makefile.in
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$sitefile"; then
+  if test -z "$CONFIG_SITE"; then
+    if test "x$prefix" != xNONE; then
+      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    else
+      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+    fi
+  fi
+else
+  CONFIG_SITE="$sitefile"
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:586: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:607: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:625: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.arch/configure.in b/gdb/testsuite/gdb.arch/configure.in
new file mode 100644
index 0000000..d72edff
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(Makefile.in)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.asm/Makefile.in b/gdb/testsuite/gdb.asm/Makefile.in
index d1c71b4..05ed656 100644
--- a/gdb/testsuite/gdb.asm/Makefile.in
+++ b/gdb/testsuite/gdb.asm/Makefile.in
@@ -2,18 +2,35 @@
 srcdir = @srcdir@
 
 EXECUTABLES =
-MISCELLANEOUS = arch.inc
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+# uuencoded format to avoid SCCS/RCS problems with binary files.
+CROSS_EXECUTABLES =
+
+all:
+	@echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
 
 clean mostlyclean:
-	-rm -f *~ *.o a.out *.x *.ci *.tmp
+	-rm -f *~ *.o a.out xgdb *.x $(CROSS_EXECUTABLES) *.ci *.tmp
 	-rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
-	-rm -f $(MISCELLANEOUS)
+	-rm -f twice-tmp.c
 
 distclean maintainer-clean realclean: clean
 	-rm -f *~ core
 	-rm -f Makefile config.status config.log
+	-rm -f arch.inc
 	-rm -f *-init.exp
 	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in config.status
+	$(SHELL) ./config.status
+
+config.status: $(srcdir)/configure
+	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.asm/configure b/gdb/testsuite/gdb.asm/configure
new file mode 100755
index 0000000..1dd8138
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/configure
@@ -0,0 +1,913 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+sitefile=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --site-file=FILE        use FILE as the site file
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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" ;;
+
+  -site-file | --site-file | --site-fil | --site-fi | --site-f)
+    ac_prev=sitefile ;;
+  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+    sitefile="$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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=asm-source.exp
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$sitefile"; then
+  if test -z "$CONFIG_SITE"; then
+    if test "x$prefix" != xNONE; then
+      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    else
+      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+    fi
+  fi
+else
+  CONFIG_SITE="$sitefile"
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:586: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:607: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:625: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.asm/configure.in b/gdb/testsuite/gdb.asm/configure.in
new file mode 100644
index 0000000..bded89e
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(asm-source.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.base/Makefile.in b/gdb/testsuite/gdb.base/Makefile.in
index e59f57b..c878f15 100644
--- a/gdb/testsuite/gdb.base/Makefile.in
+++ b/gdb/testsuite/gdb.base/Makefile.in
@@ -17,8 +17,16 @@
 MISCELLANEOUS = coremmap.data ../foobar.baz \
 	shr1.sl shr2.sl solib_sl.sl solib1.sl solib2.sl
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all:
+	@echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
 
 clean mostlyclean:
 	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
@@ -30,3 +38,6 @@
 	-rm -f Makefile config.status config.log
 	-rm -f *-init.exp
 	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 9183fe4..90f8343 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -1,4 +1,4 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -143,6 +143,9 @@
 	gdb_test "p t_float_values(float_val1,-2.3765)" " = 1"
 
 	# Test passing of arguments which might not be widened.
+        # Under stabs, GCC doesn't tell us whether the function was
+        # prototyped or not.
+        if {$gcc_compiled} { setup_xfail_format "stabs" }
 	gdb_test "p t_float_values2(0.0,0.0)" " = 0"
 
 	# Although PR 5318 mentions SunOS specifically, this seems
@@ -154,6 +157,9 @@
 	    }
 	}
         
+        # Under stabs, GCC doesn't tell us whether the function was
+        # prototyped or not.
+        if {$gcc_compiled} { setup_xfail_format "stabs" }
 	gdb_test "p t_float_values2(3.14159,float_val2)" " = 1"
 
 	gdb_test "p t_small_values(1,2,3,4,5,6,7,8,9,10)" " = 55"
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 512bbdb..332e1697 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2002 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
@@ -705,7 +705,7 @@
                       -re "marker1.*$gdb_prompt info func marker$"\
                       { send_gdb "\n"
                         gdb_expect {
-                                -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
+                                -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\(\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\
                                                   { pass "complete 'info func mar'"}
                                 -re ".*$gdb_prompt $" { fail "complete 'info func mar'"}
                                 timeout           {fail "(timeout) complete 'info func mar'"}
diff --git a/gdb/testsuite/gdb.base/configure b/gdb/testsuite/gdb.base/configure
new file mode 100644
index 0000000..77d2d14
--- /dev/null
+++ b/gdb/testsuite/gdb.base/configure
@@ -0,0 +1,902 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=gdbvars.exp
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:575: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:596: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:614: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.base/configure.in b/gdb/testsuite/gdb.base/configure.in
new file mode 100644
index 0000000..7c4e397
--- /dev/null
+++ b/gdb/testsuite/gdb.base/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(gdbvars.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.base/detach.exp b/gdb/testsuite/gdb.base/detach.exp
deleted file mode 100644
index 1556cf9..0000000
--- a/gdb/testsuite/gdb.base/detach.exp
+++ /dev/null
@@ -1,75 +0,0 @@
-#   Copyright 2003 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 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.  */
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# Test running a program from the GDB prompt and then detaching it.
-# NOTE: This test could be much more thorough.
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
-
-# Only GNU/Linux is known to support this.
-if { ! [istarget "*-*-linux*"] } {
-  return 0
-}
-
-# Are we on a target board?
-if [is_remote target] then {
-    return 0
-}
-
-set testfile "attach"
-set srcfile  ${testfile}.c
-set binfile  ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-proc do_detach_tests {} {
-  global srcdir
-  global binfile
-  global subdir
-  global pass
-
-  runto_main
-  gdb_test "set should_exit = 1" "" "set should_exit, $pass"
-  gdb_test "detach" "Detaching from program: .*$binfile, .*" "detach, $pass"
-}
-
-# Start with a fresh gdb
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-global pass
-set pass "one"
-do_detach_tests
-
-# Wait a moment and do it again.
-exec sleep 1
-
-set pass "two"
-do_detach_tests
-
-return 0
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 69fecad..9dbc509 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -449,7 +449,7 @@
 
 send_gdb "help maint\n"
 gdb_expect  {
-        -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C../ObjC demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*(maintenance dump-me.*)?maintenance info.*maintenance internal-error.*maintenance print.*maintenance set.*maintenance show.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+        -re "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core,.*to test internal functions such as the C.. demangler, etc\\..*List of maintenance subcommands:.*maintenance check-symtabs.*maintenance demangle.*(maintenance dump-me.*)?maintenance info.*maintenance internal-error.*maintenance print.*maintenance set.*maintenance show.*maintenance space.*maintenance time.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
  { pass "help maint" }
         -re ".*$gdb_prompt $"       { fail "help maint" }
         timeout         { fail "(timeout) help maint" }
@@ -482,7 +482,7 @@
 
 send_gdb "help maint demangle\n"
 gdb_expect  {
-        -re "Demangle a C\\+\\+/ObjC mangled name\\.\r\nCall internal GDB demangler routine to demangle a C\\+\\+ link name\r\nand prints the result\\..*$gdb_prompt $"\
+        -re "Demangle a C\\+\\+ mangled name\\.\r\nCall internal GDB demangler routine to demangle a C\\+\\+ link name\r\nand prints the result\\..*$gdb_prompt $"\
                         { pass "help maint demangle" }
         -re ".*$gdb_prompt $"       { fail "help maint demangle" }
         timeout         { fail "(timeout) help maint demangle" }
@@ -617,7 +617,7 @@
 
 send_gdb "help maint\n"
 gdb_expect  {
-        -re "Commands for use by GDB maintainers\\.\[\r\n\]+Includes commands to dump specific internal GDB structures in\[\r\n\]+a human readable form, to cause GDB to deliberately dump core,\[\r\n\]+to test internal functions such as the C\\+\\+/ObjC demangler, etc\\..*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
+        -re "Commands for use by GDB maintainers\\.\[\r\n\]+Includes commands to dump specific internal GDB structures in\[\r\n\]+a human readable form, to cause GDB to deliberately dump core,\[\r\n\]+to test internal functions such as the C\\+\\+ demangler, etc\\..*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\.\[\r\n\]+Command name abbreviations are allowed if unambiguous\\..*$gdb_prompt $"\
                         { pass "help maint" }
         -re ".*$gdb_prompt $"       { fail "help maint" }
         timeout         { fail "(timeout) help maint" }
diff --git a/gdb/testsuite/gdb.base/miscexprs.c b/gdb/testsuite/gdb.base/miscexprs.c
index fe88fb2..580255d 100644
--- a/gdb/testsuite/gdb.base/miscexprs.c
+++ b/gdb/testsuite/gdb.base/miscexprs.c
@@ -33,7 +33,7 @@
 
   ibig.i[100] = 5;
   cbig.c[0] = '\0';
-  cbig.c[99] = 'A';
+  cbig.c[100] = 'A';
   fbig.f[100] = 11.99999;
   dbig.d[202] = 9.99999999;
   sbig.s[90] = 255;
diff --git a/gdb/testsuite/gdb.base/psymtab.exp b/gdb/testsuite/gdb.base/psymtab.exp
deleted file mode 100644
index 8c2abff..0000000
--- a/gdb/testsuite/gdb.base/psymtab.exp
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2003 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 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file is part of the gdb testsuite
-
-# This is intended to be a repository for tests that partial symbols
-# are working properly.  If multiple tests are added, make sure that
-# you exit and restart GDB between tests.
-
-if $tracelevel then {
-    strace $tracelevel
-}
-
-#
-# test running programs
-#
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "psymtab"
-set binfile ${objdir}/${subdir}/${testfile}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile}1.o" object {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if  { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile}2.o" object {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if  { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug}] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info ${binfile}] {
-    return -1;
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# This test is looking for a bug that manifested itself when GDB was
-# looking for a partial symbol such that there wasn't such a partial
-# symbol in the psymtab, but such that the last psym in the psymtab
-# had the right name but the wrong namespace.  Here, searching for
-# zzz::dummy currently causes a search for 'zzz' in STRUCT_NAMESPACE
-# without a preceding search for 'zzz' in VAR_NAMESPACE.
-
-gdb_test "break zzz::dummy" "Can't find member of namespace, class, struct, or union named \"zzz::dummy\"\r\n.*" "Don't search past end of psymtab."
diff --git a/gdb/testsuite/gdb.base/psymtab1.c b/gdb/testsuite/gdb.base/psymtab1.c
deleted file mode 100644
index 1482f27..0000000
--- a/gdb/testsuite/gdb.base/psymtab1.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main ()
-{
-  return 0;
-}
diff --git a/gdb/testsuite/gdb.base/psymtab2.c b/gdb/testsuite/gdb.base/psymtab2.c
deleted file mode 100644
index eeaa5ed..0000000
--- a/gdb/testsuite/gdb.base/psymtab2.c
+++ /dev/null
@@ -1,3 +0,0 @@
-extern int zzz;
-
-int zzz = 123;
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index d6e941a..64a8749 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -105,10 +105,10 @@
     gdb_test "print u" " = ${new}" "new check struct ${t}"
 }
 
-check_struct "1" "{s = \\{0}}" "{s = \\{1}}"
-check_struct "2" "{s = \\{0, 0}}" "{s = \\{1, 2}}"
-check_struct "3" "{s = \\{0, 0, 0}}" "{s = \\{1, 2, 3}}"
-check_struct "4" "{s = \\{0, 0, 0, 0}}" "{s = \\{1, 2, 3, 4}}"
+check_struct "1" "{s = {0}}" "{s = {1}}"
+check_struct "2" "{s = {0, 0}}" "{s = {1, 2}}"
+check_struct "3" "{s = {0, 0, 0}}" "{s = {1, 2, 3}}"
+check_struct "4" "{s = {0, 0, 0, 0}}" "{s = {1, 2, 3, 4}}"
 
 proc up_struct { t old new } {
     global gdb_prompt
@@ -121,10 +121,10 @@
     gdb_test "print u" " = ${new}" "new up struct ${t}"
 }
 
-up_struct "1" "{s = \\{0}}" "{s = \\{1}}"
-up_struct "2" "{s = \\{0, 0}}" "{s = \\{1, 2}}"
-up_struct "3" "{s = \\{0, 0, 0}}" "{s = \\{1, 2, 3}}"
-up_struct "4" "{s = \\{0, 0, 0, 0}}" "{s = \\{1, 2, 3, 4}}"
+up_struct "1" "{s = {0}}" "{s = {1}}"
+up_struct "2" "{s = {0, 0}}" "{s = {1, 2}}"
+up_struct "3" "{s = {0, 0, 0}}" "{s = {1, 2, 3}}"
+up_struct "4" "{s = {0, 0, 0, 0}}" "{s = {1, 2, 3, 4}}"
 
 #
 
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp
index 98af77a..79c48e4 100644
--- a/gdb/testsuite/gdb.base/whatis.exp
+++ b/gdb/testsuite/gdb.base/whatis.exp
@@ -1,4 +1,4 @@
-# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999, 2002, 2003
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1999, 2002
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -301,13 +301,15 @@
     "whatis unnamed union"
 
 
-# HP-UX: HP aCC compiler w/ +objdebug option detects language as
-# c++, so we need the 'void' pattern here.
-# Without +objdebug compilation option we still need to match ''.
-# - guo
-# Also, using stabs we will mark these functions as prototyped.  This
-# is harmless but causes an extra VOID to be printed.
-set void "(void|)"
+if { [istarget "hppa*-hp-hpux*"] && $hp_aCC_compiler } {
+    # HP-UX: HP aCC compiler w/ +objdebug option detects language as
+    # c++, so we need the 'void' pattern here.
+    # Without +objdebug compilation option we still need to match ''.
+    # - guo
+    set void "(void|)"
+} else {
+    set void ""
+}
 
 # test whatis command with functions return type
 gdb_test "whatis v_char_func" \
diff --git a/gdb/testsuite/gdb.c++/Makefile.in b/gdb/testsuite/gdb.c++/Makefile.in
index 8f4a90e..8267259 100644
--- a/gdb/testsuite/gdb.c++/Makefile.in
+++ b/gdb/testsuite/gdb.c++/Makefile.in
@@ -5,8 +5,16 @@
 	derivation inherit local member-ptr method misc \
         overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace ref-types
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all: 
+	@echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
 
 clean mostlyclean:
 	-rm -f *~ *.o *.ci
@@ -14,3 +22,6 @@
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log
+
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.c++/annota2.exp b/gdb/testsuite/gdb.c++/annota2.exp
index 0446eb3..0e585ec 100644
--- a/gdb/testsuite/gdb.c++/annota2.exp
+++ b/gdb/testsuite/gdb.c++/annota2.exp
@@ -1,4 +1,4 @@
-#   Copyright 1999, 2000, 2001, 2002, 2003
+#   Copyright 1999, 2000, 2001, 2002
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -197,8 +197,6 @@
 	   { pass "watch triggered on a.x" }
    -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n\.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" \
 	   { pass "watch triggered on a.x" }
-   -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
-	   { kfail "gdb/38" "watch triggered on a.x" }
    -re ".*$gdb_prompt$"  { fail "watch triggered on a.x" }
    timeout    { fail "watch triggered on a.x (timeout)" }
 }
diff --git a/gdb/testsuite/gdb.c++/casts.exp b/gdb/testsuite/gdb.c++/casts.exp
index 859755f..68ce704 100644
--- a/gdb/testsuite/gdb.c++/casts.exp
+++ b/gdb/testsuite/gdb.c++/casts.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -59,7 +59,7 @@
     "Breakpoint.*at.* file .*" \
     ""
 
-gdb_test "run" "Breakpoint .* at .*casts.cc.*" ""
+gdb_test "run" "Breakpoint .* at casts.cc" ""
 
 # Casting a pointer to a base class to a pointer to a derived class
 # should yield the entire derived class.  Until August 2002, GDB got
diff --git a/gdb/testsuite/gdb.c++/configure b/gdb/testsuite/gdb.c++/configure
new file mode 100644
index 0000000..6d0b517
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.12.1"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=cplusfuncs.cc
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.c++/configure.in b/gdb/testsuite/gdb.c++/configure.in
new file mode 100644
index 0000000..f989cb8
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(cplusfuncs.cc)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.disasm/Makefile.in b/gdb/testsuite/gdb.disasm/Makefile.in
index 7cb1b1e..7bb5eef 100644
--- a/gdb/testsuite/gdb.disasm/Makefile.in
+++ b/gdb/testsuite/gdb.disasm/Makefile.in
@@ -1,13 +1,18 @@
+#### host, target, and site specific Makefile frags come in here.
+
 VPATH = @srcdir@
 srcdir = @srcdir@
 
 .PHONY: all clean mostlyclean distclean realclean
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all: 
+	@echo "Nothing to be done for all..."	
 
 clean mostlyclean:
 	-rm -f *.o *.diff *~ *.bad core h8300s hppa mn10200 mn10300 sh3
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log
+
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.disasm/configure b/gdb/testsuite/gdb.disasm/configure
new file mode 100644
index 0000000..0e6cbf2
--- /dev/null
+++ b/gdb/testsuite/gdb.disasm/configure
@@ -0,0 +1,899 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.12.1"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=sh3.s
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:573: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:594: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:612: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.disasm/configure.in b/gdb/testsuite/gdb.disasm/configure.in
new file mode 100644
index 0000000..508636f
--- /dev/null
+++ b/gdb/testsuite/gdb.disasm/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(sh3.s)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.java/Makefile.in b/gdb/testsuite/gdb.java/Makefile.in
index 5072ee1..0954369 100644
--- a/gdb/testsuite/gdb.java/Makefile.in
+++ b/gdb/testsuite/gdb.java/Makefile.in
@@ -1,8 +1,10 @@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all: 
+	@echo "Nothing to be done for all..."
+
+#### host, target, and site specific Makefile frags come in here.
 
 .SUFFIXES: .java .class .o .exe .exp .check
 
@@ -19,3 +21,6 @@
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log
+
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.java/configure b/gdb/testsuite/gdb.java/configure
new file mode 100755
index 0000000..6a41791
--- /dev/null
+++ b/gdb/testsuite/gdb.java/configure
@@ -0,0 +1,913 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+sitefile=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --site-file=FILE        use FILE as the site file
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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" ;;
+
+  -site-file | --site-file | --site-fil | --site-fi | --site-f)
+    ac_prev=sitefile ;;
+  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+    sitefile="$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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=jmisc.exp
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$sitefile"; then
+  if test -z "$CONFIG_SITE"; then
+    if test "x$prefix" != xNONE; then
+      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    else
+      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+    fi
+  fi
+else
+  CONFIG_SITE="$sitefile"
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:586: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:607: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:625: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.java/configure.in b/gdb/testsuite/gdb.java/configure.in
new file mode 100644
index 0000000..12fd4c7
--- /dev/null
+++ b/gdb/testsuite/gdb.java/configure.in
@@ -0,0 +1,11 @@
+dnl Process this file file with autoconf to produce a configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(jmisc.exp)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.mi/Makefile.in b/gdb/testsuite/gdb.mi/Makefile.in
index 7bd9d5a..67a0f5d 100644
--- a/gdb/testsuite/gdb.mi/Makefile.in
+++ b/gdb/testsuite/gdb.mi/Makefile.in
@@ -5,11 +5,20 @@
 
 MISCELLANEOUS = testcmds
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all: 
+	@echo "Nothing to be done for all..."
+
+#### host, target, and site specific Makefile frags come in here.
 
 clean mostlyclean:
 	-rm -f *.ci *.o $(OBJS) $(PROGS) *~ core
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log
+
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
+
+# Local variables: 
+# change-log-default-name: "ChangeLog-mi"
+# End: 
diff --git a/gdb/testsuite/gdb.mi/config.in b/gdb/testsuite/gdb.mi/config.in
new file mode 100644
index 0000000..d8418ba
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/config.in
@@ -0,0 +1,4 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have the <pthread.h> header file.  */
+#undef HAVE_PTHREAD_H
diff --git a/gdb/testsuite/gdb.mi/configure b/gdb/testsuite/gdb.mi/configure
new file mode 100755
index 0000000..48628f5
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/configure
@@ -0,0 +1,1121 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=mi-basics.exp
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:576: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:597: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:615: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+# Check for pthread.h
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:640: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 655 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 672 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 689 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in pthread.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:723: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 728 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@CPP@%$CPP%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="config.h:config.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #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.
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.mi/configure.in b/gdb/testsuite/gdb.mi/configure.in
new file mode 100644
index 0000000..3204867
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/configure.in
@@ -0,0 +1,19 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(mi-basics.exp)
+AC_CONFIG_HEADER(config.h:config.in)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+# Check for pthread.h
+AC_CHECK_HEADERS(pthread.h)
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.mi/gdb669.exp b/gdb/testsuite/gdb.mi/gdb669.exp
index 1a78d07..4f294b9 100644
--- a/gdb/testsuite/gdb.mi/gdb669.exp
+++ b/gdb/testsuite/gdb.mi/gdb669.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -178,7 +178,7 @@
 set srcfile "$testfile.c"
 set binfile "$objdir/$subdir/$testfile"
 
-set options [list debug incdir=$objdir]
+set options [list debug incdir=$subdir]
 if  {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
      != "" } {
   gdb_suppress_entire_file \
diff --git a/gdb/testsuite/gdb.mi/mi-pthreads.exp b/gdb/testsuite/gdb.mi/mi-pthreads.exp
index f2839c2..a26d434 100644
--- a/gdb/testsuite/gdb.mi/mi-pthreads.exp
+++ b/gdb/testsuite/gdb.mi/mi-pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -191,11 +191,8 @@
     "check_mi_thread_command_set: -thread-select 123456789"
 
   foreach thread $thread_list {
-    # line and file are optional.
-    # many of the threads are blocked in libc calls,
-    # and many people have libc's with no symbols.
     mi_gdb_test "-thread-select $thread" \
-      "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
+      "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
       "check_mi_thread_command_set: -thread-select $thread"
   }
 }
@@ -207,7 +204,7 @@
 set srcfile "$testfile.c"
 set binfile "$objdir/$subdir/$testfile"
 
-set options [list debug incdir=$objdir]
+set options [list debug incdir=$subdir]
 if  {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
      != "" } {
   gdb_suppress_entire_file \
diff --git a/gdb/testsuite/gdb.mi/mi1-pthreads.exp b/gdb/testsuite/gdb.mi/mi1-pthreads.exp
index 480f057..aea4f58 100644
--- a/gdb/testsuite/gdb.mi/mi1-pthreads.exp
+++ b/gdb/testsuite/gdb.mi/mi1-pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -191,11 +191,8 @@
     "check_mi_thread_command_set: -thread-select 123456789"
 
   foreach thread $thread_list {
-    # line and file are optional.
-    # many of the threads are blocked in libc calls,
-    # and many people have libc's with no symbols.
     mi_gdb_test "-thread-select $thread" \
-      "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \
+      "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \
       "check_mi_thread_command_set: -thread-select $thread"
   }
 }
@@ -207,7 +204,7 @@
 set srcfile "$testfile.c"
 set binfile "$objdir/$subdir/$testfile"
 
-set options [list debug incdir=$objdir]
+set options [list debug incdir=$subdir]
 if  {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options]
      != "" } {
   gdb_suppress_entire_file \
diff --git a/gdb/testsuite/gdb.threads/Makefile.in b/gdb/testsuite/gdb.threads/Makefile.in
index 6bd7279..34f22b5 100644
--- a/gdb/testsuite/gdb.threads/Makefile.in
+++ b/gdb/testsuite/gdb.threads/Makefile.in
@@ -3,11 +3,29 @@
 
 EXECUTABLES = pthreads
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all:
+	@echo "Nothing to be done for all..."
+
+info:
+install-info:
+dvi:
+install:
+uninstall: force
+installcheck:
+check:
 
 clean mostlyclean:
 	-rm -f *~ *.o a.out xgdb *.x *.ci *.tmp core* $(EXECUTABLES)
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log config.h
+
+Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
+
+config.h: stamp-h ; @true
+stamp-h: config.in config.status
+	CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
+
+config.status: configure
+	$(SHELL) config.status --recheck
diff --git a/gdb/testsuite/gdb.threads/config.in b/gdb/testsuite/gdb.threads/config.in
new file mode 100644
index 0000000..37bfc2b
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/config.in
@@ -0,0 +1,4 @@
+/* config.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have the <pthread.h> header file.  */
+#undef HAVE_PTHREAD_H
diff --git a/gdb/testsuite/gdb.threads/configure b/gdb/testsuite/gdb.threads/configure
new file mode 100755
index 0000000..6649098
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/configure
@@ -0,0 +1,1098 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12.1 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.12.1"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=pthreads.exp
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+CC=${CC-cc}
+
+ac_aux_dir=
+for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:574: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:595: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:613: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:637: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 652 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 669 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in pthread.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:701: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 706 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@CPP@%$CPP%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="config.h:config.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #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.
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/gdb/testsuite/gdb.threads/configure.in b/gdb/testsuite/gdb.threads/configure.in
new file mode 100644
index 0000000..1afe91a
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/configure.in
@@ -0,0 +1,18 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(pthreads.exp)
+AC_CONFIG_HEADER(config.h:config.in)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_CHECK_HEADERS(pthread.h)
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index 8184fa5..b56697b 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -32,13 +32,38 @@
 set srcfile  ${testfile}.c
 set binfile  ${objdir}/${subdir}/${testfile}
 
+set built_binfile 0
 if [istarget "*-*-linux"] then {
     set target_cflags "-D_MIT_POSIX_THREADS"
 } else {
     set target_cflags ""
 }
-
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+set why_msg "unrecognized error"
+foreach lib {-lpthreads -lpthread -lthread} {
+    set options "debug"
+    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "libs=$lib"
+    set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
+    switch -regexp -- $ccout {
+	".*no posix threads support.*" {
+	    set why_msg "missing threads include file"
+	    break
+	}
+	".*cannot open -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	".*Can't find library for -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	{^$} {
+	    pass "successfully compiled posix threads test case"
+	    set built_binfile 1
+	    break
+	}
+    }
+}
+if {$built_binfile == "0"} {
+    unsupported "Couldn't compile ${srcfile}, ${why_msg}"
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index 5557d45..21e03aa 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -66,8 +66,8 @@
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
-    return -1
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
 
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index 6d48b0d..67ed122 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1999, 2001, 2002 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
@@ -50,7 +50,7 @@
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug libs=-lpthread}] != ""} {
-    return -1
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
 gdb_start
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
index 60a106a..09c3f8a 100644
--- a/gdb/testsuite/gdb.threads/print-threads.exp
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2002 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
@@ -38,7 +38,41 @@
 # carriage return)
 set horiz "\[^\n\r\]*"
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+set built_binfile 0
+
+# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
+if [istarget "*-*-linux*"] then {
+    set possible_libs "-lpthread -lpthreads -lthread"
+} else {
+    set possible_libs "-lpthreads -lpthread -lthread"
+}
+
+set why_msg "unrecognized error"
+foreach lib $possible_libs {
+    set options "debug"
+    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "libs=$lib"
+    set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
+    switch -regexp -- $ccout {
+	".*no posix threads support.*" {
+	    set why_msg "missing threads include file"
+	    break
+	}
+	".*cannot open -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	".*Can't find library for -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	{^$} {
+	    pass "successfully compiled posix threads test case"
+	    set built_binfile 1
+	    break
+	}
+    }
+}
+if {$built_binfile == "0"} {
+    unsupported "Couldn't compile ${srcfile}, ${why_msg}"
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index 1ab019b..dc9b7a8 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997 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
@@ -45,8 +45,8 @@
     set target_cflags ""
 }
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
-    return -1
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}/${subdir}"]] != "" } {
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
 }
 
 
diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp
index 28298c6..ea2d8d3 100644
--- a/gdb/testsuite/gdb.threads/schedlock.exp
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2002 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
@@ -33,7 +33,41 @@
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+set built_binfile 0
+
+# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
+if [istarget "*-*-linux*"] then {
+    set possible_libs "-lpthread -lpthreads -lthread"
+} else {
+    set possible_libs "-lpthreads -lpthread -lthread"
+}
+
+set why_msg "unrecognized error"
+foreach lib $possible_libs {
+    set options "debug"
+    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "libs=$lib"
+    set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
+    switch -regexp -- $ccout {
+	".*no posix threads support.*" {
+	    set why_msg "missing threads include file"
+	    break
+	}
+	".*cannot open -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	".*Can't find library for -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	{^$} {
+	    pass "successfully compiled posix threads test case"
+	    set built_binfile 1
+	    break
+	}
+    }
+}
+if {$built_binfile == "0"} {
+    unsupported "Couldn't compile ${srcfile}, ${why_msg}"
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.trace/Makefile.in b/gdb/testsuite/gdb.trace/Makefile.in
index b416c3b..601c9e1 100644
--- a/gdb/testsuite/gdb.trace/Makefile.in
+++ b/gdb/testsuite/gdb.trace/Makefile.in
@@ -1,10 +1,12 @@
+#### host, target, and site specific Makefile frags come in here.
+
 VPATH = @srcdir@
 srcdir = @srcdir@
 
 .PHONY: all clean mostlyclean distclean realclean
 
-all info install-info dvi install uninstall installcheck check:
-	@echo "Nothing to be done for $@..."
+all: 
+	@echo "Nothing to be done for all..."	
 
 clean mostlyclean:
 	-rm -f actions circ collection limits
@@ -12,3 +14,8 @@
 
 distclean maintainer-clean realclean: clean
 	-rm -f Makefile config.status config.log
+
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
+	$(SHELL) ./config.status --recheck
+
+
diff --git a/gdb/testsuite/gdb.trace/configure.in b/gdb/testsuite/gdb.trace/configure.in
new file mode 100644
index 0000000..6d0eae2
--- /dev/null
+++ b/gdb/testsuite/gdb.trace/configure.in
@@ -0,0 +1,15 @@
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory.  For more information, check
+dnl any existing configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(collection.c)
+
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
+
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index f1cd16b..a339221 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1,5 +1,4 @@
-# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-# 2002, 2003
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -64,9 +63,6 @@
     set EXEEXT $env(EXEEXT)
 }
 
-# Make sure we are using the C locale.
-set env(LC_ALL) "C"
-
 ### Only procedures should come after this point.
 
 #
@@ -1138,7 +1134,7 @@
     set result [target_compile $source $dest $type $options];
     regsub "\[\r\n\]*$" "$result" "" result;
     regsub "^\[\r\n\]*" "$result" "" result;
-    if { $result != "" && [lsearch $options quiet] == -1} {
+    if { $result != "" } {
 	clone_output "gdb compile failed, $result"
     }
     return $result;
@@ -1154,7 +1150,7 @@
     foreach lib {-lpthreads -lpthread -lthread} {
         # This kind of wipes out whatever libs the caller may have
         # set.  Or maybe theirs will override ours.  How infelicitous.
-        set options_with_lib [concat $options [list libs=$lib quiet]]
+        set options_with_lib [concat $options [list libs=$lib]]
         set ccout [gdb_compile $source $dest $type $options_with_lib]
         switch -regexp -- $ccout {
             ".*no posix threads support.*" {
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index cd1c752..e8cf569 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -74,6 +74,12 @@
 
 extern void output_command (char *, int);
 
+/* If this definition isn't overridden by the header files, assume
+   that isatty and fileno exist on this system.  */
+#ifndef ISATTY
+#define ISATTY(FP)	(isatty (fileno (FP)))
+#endif
+
 /* 
    Tracepoint.c:
 
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 43f20ea..c4262d9 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -88,6 +88,17 @@
       type_print (type, "", stream, 0);
       break;
 #endif
+#ifdef _LANG_chill /* OBSOLETE */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   fprintf_filtered (stream, "SYNMODE "); */
+      /* OBSOLETE   if (!TYPE_NAME (SYMBOL_TYPE (new)) || */
+      /* OBSOLETE       !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new))) */
+      /* OBSOLETE     fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new)); */
+      /* OBSOLETE   else */
+      /* OBSOLETE     fprintf_filtered (stream, "<builtin> = "); */
+      /* OBSOLETE   type_print (type, "", stream, 0); */
+      /* OBSOLETE   break; */
+#endif
     default:
       error ("Language not supported.");
     }
diff --git a/gdb/utils.c b/gdb/utils.c
index bb695d5..58af78a 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2313,6 +2313,11 @@
 	      /* Commented out until ObjC handling is enabled.  */
 	      /*demangled = objc_demangle (name);*/
 	      /*break;*/
+#if 0
+	      /* OBSOLETE case language_chill: */
+	      /* OBSOLETE   demangled = chill_demangle (name); */
+	      /* OBSOLETE   break; */
+#endif
 	    default:
 	      demangled = NULL;
 	      break;
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 3970145..6872de8 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1,6 +1,5 @@
 /* Target-dependent code for the NEC V850 for GDB, the GNU debugger.
-   Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003
-   Free Software Foundation, Inc.
+   Copyright 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -800,13 +799,11 @@
 CORE_ADDR
 v850_find_callers_reg (struct frame_info *fi, int regnum)
 {
-  for (; fi; fi = get_next_frame (fi))
-    if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				     get_frame_base (fi)))
-      return deprecated_read_register_dummy (get_frame_pc (fi),
-					     get_frame_base (fi), regnum);
-    else if (get_frame_saved_regs (fi)[regnum] != 0)
-      return read_memory_unsigned_integer (get_frame_saved_regs (fi)[regnum],
+  for (; fi; fi = fi->next)
+    if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+      return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
+    else if (fi->saved_regs[regnum] != 0)
+      return read_memory_unsigned_integer (fi->saved_regs[regnum],
 					   v850_register_raw_size (regnum));
 
   return read_register (regnum);
@@ -844,7 +841,7 @@
   if (pi.framereg == E_FP_RAW_REGNUM)
     return v850_find_callers_reg (fi, pi.framereg);
 
-  return get_frame_base (fi) - pi.frameoffset;
+  return fi->frame - pi.frameoffset;
 }
 
 /* Function: skip_prologue
@@ -886,18 +883,16 @@
   struct frame_info *frame = get_current_frame ();
   int regnum;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
     generic_pop_dummy_frame ();
   else
     {
       write_register (E_PC_REGNUM, FRAME_SAVED_PC (frame));
 
       for (regnum = 0; regnum < E_NUM_REGS; regnum++)
-	if (get_frame_saved_regs (frame)[regnum] != 0)
+	if (frame->saved_regs[regnum] != 0)
 	  write_register (regnum,
-		      read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
+		      read_memory_unsigned_integer (frame->saved_regs[regnum],
 					     v850_register_raw_size (regnum)));
 
       write_register (E_SP_REGNUM, get_frame_base (frame));
@@ -1014,10 +1009,8 @@
 CORE_ADDR
 v850_frame_saved_pc (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
-    return deprecated_read_register_dummy (get_frame_pc (fi),
-					   get_frame_base (fi), E_PC_REGNUM);
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+    return deprecated_read_register_dummy (fi->pc, fi->frame, E_PC_REGNUM);
   else
     return v850_find_callers_reg (fi, E_RP_REGNUM);
 }
@@ -1112,33 +1105,32 @@
   struct pifsr pifsrs[E_NUM_REGS + 1], *pifsr;
   CORE_ADDR func_addr, func_end;
 
-  if (!get_frame_saved_regs (fi))
+  if (!fi->saved_regs)
     {
       frame_saved_regs_zalloc (fi);
 
       /* The call dummy doesn't save any registers on the stack, so we
          can return now.  */
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				       get_frame_base (fi)))
+      if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
 	return;
 
       /* Find the beginning of this function, so we can analyze its
          prologue. */
-      if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
+      if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end))
 	{
 	  pi.pifsrs = pifsrs;
 
-	  v850_scan_prologue (get_frame_pc (fi), &pi);
+	  v850_scan_prologue (fi->pc, &pi);
 
-	  if (!get_next_frame (fi) && pi.framereg == E_SP_REGNUM)
-	    deprecated_update_frame_base_hack (fi, read_register (pi.framereg) - pi.frameoffset);
+	  if (!fi->next && pi.framereg == E_SP_REGNUM)
+	    fi->frame = read_register (pi.framereg) - pi.frameoffset;
 
 	  for (pifsr = pifsrs; pifsr->framereg; pifsr++)
 	    {
-	      get_frame_saved_regs (fi)[pifsr->reg] = pifsr->offset + get_frame_base (fi);
+	      fi->saved_regs[pifsr->reg] = pifsr->offset + fi->frame;
 
 	      if (pifsr->framereg == E_SP_REGNUM)
-		get_frame_saved_regs (fi)[pifsr->reg] += pi.frameoffset;
+		fi->saved_regs[pifsr->reg] += pi.frameoffset;
 	    }
 	}
       /* Else we're out of luck (can't debug completely stripped code). 
@@ -1151,7 +1143,7 @@
    registers.  Most of the work is done in scan_prologue().
 
    Note that when we are called for the last frame (currently active frame),
-   that get_frame_pc (fi) and fi->frame will already be setup.  However, fi->frame will
+   that fi->pc and fi->frame will already be setup.  However, fi->frame will
    be valid only if this routine uses FP.  For previous frames, fi-frame will
    always be correct (since that is derived from v850_frame_chain ()).
 
@@ -1164,8 +1156,8 @@
 {
   struct prologue_info pi;
 
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
+  if (fi->next)
+    fi->pc = FRAME_SAVED_PC (fi->next);
 
   v850_frame_init_saved_regs (fi);
 }
@@ -1248,6 +1240,7 @@
   set_gdbarch_saved_pc_after_call (gdbarch, v850_saved_pc_after_call);
   set_gdbarch_frame_saved_pc (gdbarch, v850_frame_saved_pc);
   set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
 
   /* 
    * Miscelany
@@ -1263,6 +1256,8 @@
   set_gdbarch_frame_args_skip (gdbarch, 0);
   /* OK to default this value to 'unknown'. */
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+  /* W/o prototype, coerce float args to double. */
+  set_gdbarch_coerce_float_to_double (gdbarch, standard_coerce_float_to_double);
 
   /*
    * Call Dummies
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 62ebc68..279528a 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -859,7 +859,7 @@
     /* Integral operations here.  */
     /* FIXME:  Also mixed integral/booleans, with result an integer. */
     /* FIXME: This implements ANSI C rules (also correct for C++).
-       What about FORTRAN and (the deleted) chill ?  */
+       What about FORTRAN and (OBSOLETE) chill ?  */
     {
       unsigned int promoted_len1 = TYPE_LENGTH (type1);
       unsigned int promoted_len2 = TYPE_LENGTH (type2);
@@ -946,6 +946,12 @@
 	    case BINOP_MOD:
 	      /* Knuth 1.2.4, integer only.  Note that unlike the C '%' op,
 	         v1 mod 0 has a defined value, v1. */
+	      /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
+	      /* OBSOLETE if (current_language->la_language == language_chill */
+	      /* OBSOLETE     && value_as_long (arg2) <= 0) */
+	      /* OBSOLETE { */
+	      /* OBSOLETE   error ("Second operand of MOD must be greater than zero."); */
+	      /* OBSOLETE } */
 	      if (v2 == 0)
 		{
 		  v = v1;
@@ -1064,6 +1070,12 @@
 	    case BINOP_MOD:
 	      /* Knuth 1.2.4, integer only.  Note that unlike the C '%' op,
 	         X mod 0 has a defined value, X. */
+	      /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
+	      /* OBSOLETE if (current_language->la_language == language_chill */
+	      /* OBSOLETE     && v2 <= 0) */
+	      /* OBSOLETE { */
+	      /* OBSOLETE   error ("Second operand of MOD must be greater than zero."); */
+	      /* OBSOLETE } */
 	      if (v2 == 0)
 		{
 		  v = v1;
@@ -1327,7 +1339,7 @@
   else if (TYPE_CODE (type) == TYPE_CODE_INT || TYPE_CODE (type) == TYPE_CODE_BOOL)
     {
       /* Perform integral promotion for ANSI C/C++.  FIXME: What about
-         FORTRAN and (the deleted) chill ?  */
+         FORTRAN and (OBSOLETE) chill ?  */
       if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin_type_int))
 	result_type = builtin_type_int;
 
diff --git a/gdb/valops.c b/gdb/valops.c
index d3906f9f..b7d50e5 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1,6 +1,6 @@
 /* Perform non-arithmetic operations on values, for GDB.
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -89,31 +89,9 @@
    The default is to stop in the frame where the signal was received. */
 
 int unwind_on_signal_p = 0;
-
-/* How you should pass arguments to a function depends on whether it
-   was defined in K&R style or prototype style.  If you define a
-   function using the K&R syntax that takes a `float' argument, then
-   callers must pass that argument as a `double'.  If you define the
-   function using the prototype syntax, then you must pass the
-   argument as a `float', with no promotion.
-
-   Unfortunately, on certain older platforms, the debug info doesn't
-   indicate reliably how each function was defined.  A function type's
-   TYPE_FLAG_PROTOTYPED flag may be clear, even if the function was
-   defined in prototype style.  When calling a function whose
-   TYPE_FLAG_PROTOTYPED flag is clear, GDB consults this flag to decide
-   what to do.
-
-   For modern targets, it is proper to assume that, if the prototype
-   flag is clear, that can be trusted: `float' arguments should be
-   promoted to `double'.  For some older targets, if the prototype
-   flag is clear, that doesn't tell us anything.  The default is to
-   trust the debug information; the user can override this behavior
-   with "set coerce-float-to-double 0".  */
-
-static int coerce_float_to_double;
 
 
+
 /* Find the address of function name NAME in the inferior.  */
 
 struct value *
@@ -398,6 +376,49 @@
       VALUE_POINTED_TO_OFFSET (arg2) = 0;	/* pai: chk_val */
       return arg2;
     }
+  /* OBSOLETE else if (chill_varying_type (type)) */
+  /* OBSOLETE   { */
+  /* OBSOLETE     struct type *range1, *range2, *eltype1, *eltype2; */
+  /* OBSOLETE     struct value *val; */
+  /* OBSOLETE     int count1, count2; */
+  /* OBSOLETE     LONGEST low_bound, high_bound; */
+  /* OBSOLETE     char *valaddr, *valaddr_data; */
+  /* OBSOLETE     *//* For lint warning about eltype2 possibly uninitialized: */
+  /* OBSOLETE     eltype2 = NULL; */
+  /* OBSOLETE     if (code2 == TYPE_CODE_BITSTRING) */
+  /* OBSOLETE       error ("not implemented: converting bitstring to varying type"); */
+  /* OBSOLETE     if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING) */
+  /* OBSOLETE         || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))), */
+  /* OBSOLETE       eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)), */
+  /* OBSOLETE                                (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2) */
+  /* OBSOLETE     *//*|| TYPE_CODE (eltype1) != TYPE_CODE (eltype2) *//* ))) */
+  /* OBSOLETE      error ("Invalid conversion to varying type"); */
+  /* OBSOLETE     range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0); */
+  /* OBSOLETE     range2 = TYPE_FIELD_TYPE (type2, 0); */
+  /* OBSOLETE     if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0) */
+  /* OBSOLETE       count1 = -1; */
+  /* OBSOLETE     else */
+  /* OBSOLETE       count1 = high_bound - low_bound + 1; */
+  /* OBSOLETE     if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0) */
+  /* OBSOLETE       count1 = -1, count2 = 0;	*//* To force error before */
+  /* OBSOLETE     else */
+  /* OBSOLETE       count2 = high_bound - low_bound + 1; */
+  /* OBSOLETE     if (count2 > count1) */
+  /* OBSOLETE       error ("target varying type is too small"); */
+  /* OBSOLETE     val = allocate_value (type); */
+  /* OBSOLETE     valaddr = VALUE_CONTENTS_RAW (val); */
+  /* OBSOLETE     valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8; */
+  /* OBSOLETE     *//* Set val's __var_length field to count2. */
+  /* OBSOLETE     store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)), */
+  /* OBSOLETE 	    count2); */
+  /* OBSOLETE     *//* Set the __var_data field to count2 elements copied from arg2. */
+  /* OBSOLETE     memcpy (valaddr_data, VALUE_CONTENTS (arg2), */
+  /* OBSOLETE      count2 * TYPE_LENGTH (eltype2)); */
+  /* OBSOLETE     *//* Zero the rest of the __var_data field of val. */
+  /* OBSOLETE     memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0', */
+  /* OBSOLETE      (count1 - count2) * TYPE_LENGTH (eltype2)); */
+  /* OBSOLETE     return val; */
+  /* OBSOLETE   } */
   else if (VALUE_LVAL (arg2) == lval_memory)
     {
       return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2),
@@ -1076,6 +1097,49 @@
   return sp;
 }
 
+
+/* Functions to use for the COERCE_FLOAT_TO_DOUBLE gdbarch method.
+
+   How you should pass arguments to a function depends on whether it
+   was defined in K&R style or prototype style.  If you define a
+   function using the K&R syntax that takes a `float' argument, then
+   callers must pass that argument as a `double'.  If you define the
+   function using the prototype syntax, then you must pass the
+   argument as a `float', with no promotion.
+
+   Unfortunately, on certain older platforms, the debug info doesn't
+   indicate reliably how each function was defined.  A function type's
+   TYPE_FLAG_PROTOTYPED flag may be clear, even if the function was
+   defined in prototype style.  When calling a function whose
+   TYPE_FLAG_PROTOTYPED flag is clear, GDB consults the
+   COERCE_FLOAT_TO_DOUBLE gdbarch method to decide what to do.
+
+   For modern targets, it is proper to assume that, if the prototype
+   flag is clear, that can be trusted: `float' arguments should be
+   promoted to `double'.  You should register the function
+   `standard_coerce_float_to_double' to get this behavior.
+
+   For some older targets, if the prototype flag is clear, that
+   doesn't tell us anything.  So we guess that, if we don't have a
+   type for the formal parameter (i.e., the first argument to
+   COERCE_FLOAT_TO_DOUBLE is null), then we should promote it;
+   otherwise, we should leave it alone.  The function
+   `default_coerce_float_to_double' provides this behavior; it is the
+   default value, for compatibility with older configurations.  */
+int
+default_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+  return formal == NULL;
+}
+
+
+int
+standard_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+  return 1;
+}
+
+
 /* Perform the standard coercions that are specified
    for arguments to be passed to C functions.
 
@@ -1118,7 +1182,11 @@
 	type = builtin_type_int;
       break;
     case TYPE_CODE_FLT:
-      if (!is_prototyped && coerce_float_to_double)
+      /* FIXME: We should always convert floats to doubles in the
+         non-prototyped case.  As many debugging formats include
+         no information about prototyping, we have to live with
+         COERCE_FLOAT_TO_DOUBLE for now.  */
+      if (!is_prototyped && COERCE_FLOAT_TO_DOUBLE (param_type, arg_type))
 	{
 	  if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin_type_double))
 	    type = builtin_type_double;
@@ -2095,23 +2163,22 @@
 		/* Look for a match through the fields of an anonymous union,
 		   or anonymous struct.  C++ provides anonymous unions.
 
-		   In the GNU Chill (now deleted from GDB)
-		   implementation of variant record types, each
-		   <alternative field> has an (anonymous) union type,
-		   each member of the union represents a <variant
-		   alternative>.  Each <variant alternative> is
-		   represented as a struct, with a member for each
-		   <variant field>.  */
+		   In the GNU Chill (OBSOLETE) implementation of
+		   variant record types, each <alternative field> has
+		   an (anonymous) union type, each member of the union
+		   represents a <variant alternative>.  Each <variant
+		   alternative> is represented as a struct, with a
+		   member for each <variant field>.  */
 
 		struct value *v;
 		int new_offset = offset;
 
 		/* This is pretty gross.  In G++, the offset in an
 		   anonymous union is relative to the beginning of the
-		   enclosing struct.  In the GNU Chill (now deleted
-		   from GDB) implementation of variant records, the
-		   bitpos is zero in an anonymous union field, so we
-		   have to add the offset of the union here. */
+		   enclosing struct.  In the GNU Chill (OBSOLETE)
+		   implementation of variant records, the bitpos is
+		   zero in an anonymous union field, so we have to add
+		   the offset of the union here. */
 		if (TYPE_CODE (field_type) == TYPE_CODE_STRUCT
 		    || (TYPE_NFIELDS (field_type) > 0
 			&& TYPE_FIELD_BITPOS (field_type, 0) == 0))
@@ -3339,6 +3406,9 @@
     error ("slice from bad array or bitstring");
   if (lowbound < lowerbound || length < 0
       || lowbound + length - 1 > upperbound)
+    /* OBSOLETE Chill allows zero-length strings but not arrays. */
+    /* OBSOLETE || (current_language->la_language == language_chill */
+    /* OBSOLETE && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY)) */
     error ("slice out of range");
   /* FIXME-type-allocation: need a way to free this type when we are
      done with it.  */
@@ -3394,6 +3464,19 @@
   return slice;
 }
 
+/* Assuming OBSOLETE chill_varying_type (VARRAY) is true, return an
+   equivalent value as a fixed-length array. */
+
+struct value *
+varying_to_slice (struct value *varray)
+{
+  struct type *vtype = check_typedef (VALUE_TYPE (varray));
+  LONGEST length = unpack_long (TYPE_FIELD_TYPE (vtype, 0),
+				VALUE_CONTENTS (varray)
+				+ TYPE_FIELD_BITPOS (vtype, 0) / 8);
+  return value_slice (value_primitive_field (varray, 0, 1, vtype), 0, length);
+}
+
 /* Create a value for a FORTRAN complex number.  Currently most of
    the time values are coerced to COMPLEX*16 (i.e. a complex number
    composed of 2 doubles.  This really should be a smarter routine
@@ -3471,19 +3554,4 @@
 unwinds the stack and restore the context to what as it was before the call.\n\
 The default is to stop in the frame where the signal was received.", &setlist),
 		     &showlist);
-
-  add_show_from_set
-    (add_set_cmd ("coerce-float-to-double", class_obscure, var_boolean,
-		  (char *) &coerce_float_to_double,
-		  "Set coercion of floats to doubles when calling functions\n"
- "Variables of type float should generally be converted to doubles before\n"
- "calling an unprototyped function, and left alone when calling a prototyped\n"
- "function.  However, some older debug info formats do not provide enough\n"
- "information to determine that a function is prototyped.  If this flag is\n"
- "set, GDB will perform the conversion for a function it considers\n"
- "unprototyped.\n"
- "The default is to perform the conversion.\n",
-		  &setlist),
-     &showlist);
-  coerce_float_to_double = 1;
 }
diff --git a/gdb/value.h b/gdb/value.h
index 1ba2864..a38b576 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -1,6 +1,6 @@
 /* Definitions for values of C expressions, for GDB.
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -241,9 +241,9 @@
 #define COERCE_NUMBER(arg)  \
   do { COERCE_ARRAY(arg);  COERCE_ENUM(arg); } while (0)
 
-/* NOTE: cagney/2002-12-17: This macro was handling a chill language
-   problem but that language has gone away.  */
-#define COERCE_VARYING_ARRAY(arg, real_arg_type)
+#define COERCE_VARYING_ARRAY(arg, real_arg_type)	\
+/* OBSOLETE { if (chill_varying_type (real_arg_type)) */  \
+/* OBSOLETE     arg = varying_to_slice (arg), real_arg_type = VALUE_TYPE (arg); } */ 
 
 /* If ARG is an enum, convert it to an integer.  */
 
@@ -284,14 +284,13 @@
 
 extern CORE_ADDR value_as_address (struct value *val);
 
-extern LONGEST unpack_long (struct type *type, const char *valaddr);
+extern LONGEST unpack_long (struct type *type, char *valaddr);
 
-extern DOUBLEST unpack_double (struct type *type, const char *valaddr,
-			       int *invp);
+extern DOUBLEST unpack_double (struct type *type, char *valaddr, int *invp);
 
-extern CORE_ADDR unpack_pointer (struct type *type, const char *valaddr);
+extern CORE_ADDR unpack_pointer (struct type *type, char *valaddr);
 
-extern LONGEST unpack_field_as_long (struct type *type, const char *valaddr,
+extern LONGEST unpack_field_as_long (struct type *type, char *valaddr,
 				     int fieldno);
 
 extern struct value *value_from_longest (struct type *type, LONGEST num);
@@ -549,6 +548,10 @@
 extern struct value *call_function_by_hand (struct value *, int,
 					    struct value **);
 
+extern int default_coerce_float_to_double (struct type *, struct type *);
+
+extern int standard_coerce_float_to_double (struct type *, struct type *);
+
 extern struct value *value_literal_complex (struct value *, struct value *,
 					    struct type *);
 
diff --git a/gdb/values.c b/gdb/values.c
index 5b76d6c..950dee6 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -679,7 +679,7 @@
    to an INT (or some size).  After all, it is only an offset.  */
 
 LONGEST
-unpack_long (struct type *type, const char *valaddr)
+unpack_long (struct type *type, char *valaddr)
 {
   register enum type_code code = TYPE_CODE (type);
   register int len = TYPE_LENGTH (type);
@@ -728,7 +728,7 @@
    format, result is in host format.  */
 
 DOUBLEST
-unpack_double (struct type *type, const char *valaddr, int *invp)
+unpack_double (struct type *type, char *valaddr, int *invp)
 {
   enum type_code code;
   int len;
@@ -785,7 +785,7 @@
    to an INT (or some size).  After all, it is only an offset.  */
 
 CORE_ADDR
-unpack_pointer (struct type *type, const char *valaddr)
+unpack_pointer (struct type *type, char *valaddr)
 {
   /* Assume a CORE_ADDR can fit in a LONGEST (for now).  Not sure
      whether we want this to be true eventually.  */
@@ -1038,7 +1038,7 @@
    If the field is signed, we also do sign extension. */
 
 LONGEST
-unpack_field_as_long (struct type *type, const char *valaddr, int fieldno)
+unpack_field_as_long (struct type *type, char *valaddr, int fieldno)
 {
   ULONGEST val;
   ULONGEST valmask;
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 52438d5..359029d 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -1,5 +1,5 @@
 /* Print VAX instructions for GDB, the GNU debugger.
-   Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000, 2002, 2003
+   Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -29,7 +29,6 @@
 #include "value.h"
 #include "arch-utils.h"
 #include "gdb_string.h"
-#include "osabi.h"
 
 #include "vax-tdep.h"
 
@@ -130,32 +129,32 @@
   int regnum, regmask;
   CORE_ADDR next_addr;
 
-  if (get_frame_saved_regs (frame))
+  if (frame->saved_regs)
     return;
 
   frame_saved_regs_zalloc (frame);
 
-  regmask = read_memory_integer (get_frame_base (frame) + 4, 4) >> 16;
+  regmask = read_memory_integer (frame->frame + 4, 4) >> 16;
 
-  next_addr = get_frame_base (frame) + 16;
+  next_addr = frame->frame + 16;
 
   /* regmask's low bit is for register 0, which is the first one
      what would be pushed.  */
   for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
     {
       if (regmask & (1 << regnum))
-        get_frame_saved_regs (frame)[regnum] = next_addr += 4;
+        frame->saved_regs[regnum] = next_addr += 4;
     }
 
-  get_frame_saved_regs (frame)[SP_REGNUM] = next_addr + 4;
+  frame->saved_regs[SP_REGNUM] = next_addr + 4;
   if (regmask & (1 << FP_REGNUM))
-    get_frame_saved_regs (frame)[SP_REGNUM] +=
+    frame->saved_regs[SP_REGNUM] +=
       4 + (4 * read_memory_integer (next_addr + 4, 4));
 
-  get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 16;
-  get_frame_saved_regs (frame)[FP_REGNUM] = get_frame_base (frame) + 12;
-  get_frame_saved_regs (frame)[VAX_AP_REGNUM] = get_frame_base (frame) + 8;
-  get_frame_saved_regs (frame)[PS_REGNUM] = get_frame_base (frame) + 4;
+  frame->saved_regs[PC_REGNUM] = frame->frame + 16;
+  frame->saved_regs[FP_REGNUM] = frame->frame + 12;
+  frame->saved_regs[VAX_AP_REGNUM] = frame->frame + 8;
+  frame->saved_regs[PS_REGNUM] = frame->frame + 4;
 }
 
 /* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp.  */
@@ -170,10 +169,9 @@
 
   buf = alloca (ptrbytes);
   /* Get sigcontext address, it is the third parameter on the stack.  */
-  if (get_next_frame (frame))
+  if (frame->next)
     sigcontext_addr = read_memory_typed_address
-      (FRAME_ARGS_ADDRESS (get_next_frame (frame))
-       + FRAME_ARGS_SKIP + sigcontext_offs,
+      (FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
        builtin_type_void_data_ptr);
   else
     sigcontext_addr = read_memory_typed_address
@@ -191,7 +189,7 @@
   if ((get_frame_type (frame) == SIGTRAMP_FRAME))
     return (vax_sigtramp_saved_pc (frame)); /* XXXJRT */
 
-  return (read_memory_integer (get_frame_base (frame) + 16, 4));
+  return (read_memory_integer (frame->frame + 16, 4));
 }
 
 CORE_ADDR
@@ -206,8 +204,8 @@
      (which is one reason that "info frame" exists).  So, return 0 (indicating
      we don't know the address of the arglist) if we don't know what frame
      this frame calls.  */
-  if (get_next_frame (frame))
-    return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
+  if (frame->next)
+    return (read_memory_integer (frame->next->frame + 8, 4));
 
   return (0);
 }
@@ -218,8 +216,8 @@
   /* In most of GDB, getting the args address is too important to
      just say "I don't know".  This is sometimes wrong for functions
      that aren't on top of the stack, but c'est la vie.  */
-  if (get_next_frame (frame))
-    return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
+  if (frame->next)
+    return (read_memory_integer (frame->next->frame + 8, 4));
 
   return (read_register (VAX_AP_REGNUM));
 }
@@ -227,7 +225,7 @@
 static CORE_ADDR
 vax_frame_locals_address (struct frame_info *frame)
 {
-  return (get_frame_base (frame));
+  return (frame->frame);
 }
 
 static int
@@ -241,10 +239,10 @@
 {
   /* In the case of the VAX, the frame's nominal address is the FP value,
      and 12 bytes later comes the saved previous FP value as a 4-byte word.  */
-  if (inside_entry_file (get_frame_pc (frame)))
+  if (inside_entry_file (frame->pc))
     return (0);
 
-  return (read_memory_integer (get_frame_base (frame) + 12, 4));
+  return (read_memory_integer (frame->frame + 12, 4));
 }
 
 static void
@@ -611,19 +609,35 @@
 static struct gdbarch *
 vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
+  struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
-  /* If there is already a candidate, use it.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  /* Try to determine the ABI of the object we are loading.  */
 
-  gdbarch = gdbarch_alloc (&info, NULL);
+  if (info.abfd != NULL)
+    osabi = gdbarch_lookup_osabi (info.abfd);
+
+  /* Find a candidate among extant architectures.  */
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
+
+  tdep = xmalloc (sizeof (struct gdbarch_tdep));
+  gdbarch = gdbarch_alloc (&info, tdep);
 
   /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
      ready to unwind the PC first (see frame.c:get_prev_frame()).  */
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
 
+  tdep->osabi = osabi;
+
   /* Register info */
   set_gdbarch_num_regs (gdbarch, VAX_NUM_REGS);
   set_gdbarch_sp_regnum (gdbarch, VAX_SP_REGNUM);
@@ -651,6 +665,7 @@
 				   generic_frameless_function_invocation_not);
 
   set_gdbarch_frame_chain (gdbarch, vax_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_frame_saved_pc (gdbarch, vax_frame_saved_pc);
 
   set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
@@ -692,15 +707,27 @@
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return (gdbarch);
 }
 
+static void
+vax_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (tdep == NULL)
+    return;
+
+  fprintf_unfiltered (file, "vax_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+}
+
 void
 _initialize_vax_tdep (void)
 {
-  gdbarch_register (bfd_arch_vax, vax_gdbarch_init, NULL);
+  gdbarch_register (bfd_arch_vax, vax_gdbarch_init, vax_dump_tdep);
 
   tm_print_insn = vax_print_insn;
 }
diff --git a/gdb/vax-tdep.h b/gdb/vax-tdep.h
index 7529e57..ccabdd5 100644
--- a/gdb/vax-tdep.h
+++ b/gdb/vax-tdep.h
@@ -1,5 +1,5 @@
 /* Common target dependent code for GDB on VAX systems.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,8 @@
 #ifndef VAX_TDEP_H
 #define VAX_TDEP_H
 
+#include "osabi.h"
+
 /* Say how long (ordinary) registers are.  This is a piece of bogosity
    used in push_word and a few other places;  REGISTER_RAW_SIZE is the
    real way to know how big a register is.  */
@@ -52,4 +54,10 @@
 #define VAX_PC_REGNUM     15  /* Contains program counter */
 #define VAX_PS_REGNUM     16  /* Contains processor status */
 
+/* Target-dependent structure in gdbarch.  */ 
+struct gdbarch_tdep
+{  
+  enum gdb_osabi osabi;		/* OS/ABI of inferior.  */
+};
+
 #endif /* VAX_TDEP_H */
diff --git a/gdb/version.in b/gdb/version.in
index 50944f9..654208a 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-01-09-cvs
+2002-12-23-cvs
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 78e9c49..69495b8 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -456,6 +456,17 @@
 #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
 #endif
 
+/* SSE register?  */
+/* FIXME: cagney/2002-11-15: Once the i386 and x86-64 are integrated,
+   this will go.  */
+
+int
+i386_sse_regnum_p (int regnum)
+{
+  return (regnum < NUM_REGS
+	  && (XMM0_REGNUM <= (regnum) && (regnum) < MXCSR_REGNUM));
+}
+
 /* Return the address of register REGNUM.  BLOCKEND is the value of
    u.u_ar0, which should point to the registers.  */
 CORE_ADDR
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index c593abe..e43bdbe 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -28,7 +28,6 @@
 #include "regcache.h"
 #include "x86-64-tdep.h"
 #include "dwarf2cfi.h"
-#include "osabi.h"
 
 #define LINUX_SIGTRAMP_INSN0 (0x48)	/* mov $NNNNNNNN,%rax */
 #define LINUX_SIGTRAMP_OFFSET0 (0)
@@ -88,14 +87,14 @@
   CORE_ADDR pc;
   ULONGEST rsp;
 
-  pc = x86_64_linux_sigtramp_start (get_frame_pc (frame));
+  pc = x86_64_linux_sigtramp_start (frame->pc);
   if (pc)
     {
-      if (get_next_frame (frame))
+      if (frame->next)
 	/* If this isn't the top frame, the next frame must be for the
 	   signal handler itself.  The sigcontext structure is part of
 	   the user context. */
-	return get_frame_base (get_next_frame (frame)) + LINUX_SIGINFO_SIZE +
+	return frame->next->frame + LINUX_SIGINFO_SIZE +
 	  LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
 
 
@@ -147,7 +146,7 @@
 x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
 {
   if (name)
-    return strcmp ("__restore_rt", name) == 0;
+    return STREQ ("__restore_rt", name);
 
   return (x86_64_linux_sigtramp_start (pc) != 0);
 }
@@ -164,10 +163,10 @@
       if (fp)
 	return fp;
       else
-	addr = get_frame_base (fi);
+	addr = fi->frame;
     }
   else
-    addr = get_frame_base (get_next_frame (fi));
+    addr = fi->next->frame;
 
   addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
 
@@ -181,8 +180,7 @@
 {
   CORE_ADDR addr;
 
-  if (get_next_frame (fi)
-      && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
+  if (get_next_frame (fi) && (get_frame_type (fi->next) == SIGTRAMP_FRAME))
     {
       addr = get_frame_base (get_next_frame (get_next_frame (fi)))
 	+ LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index a47ef17..97c3bd9 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for the x86-64 for GDB, the GNU debugger.
 
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
@@ -967,6 +967,10 @@
   set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
   set_gdbarch_register_virtual_type (gdbarch, x86_64_register_virtual_type);
 
+  /* FIXME: kettenis/20021026: As long as we don't support longjmp,
+     that is, as long as we have `tdep->jb_pc_offset == -1', using
+     i386_get_longjmp_target is fine.  */
+
   set_gdbarch_register_convertible (gdbarch, x86_64_register_convertible);
   set_gdbarch_register_convert_to_virtual (gdbarch,
 					   x86_64_register_convert_to_virtual);
@@ -1001,6 +1005,9 @@
   set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
   set_gdbarch_frameless_function_invocation (gdbarch,
 					 x86_64_frameless_function_invocation);
+  /* FIXME: kettenis/20021025: Shouldn't this be set to
+     generic_file_frame_chain_valid?  */
+  set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
   /* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
      should be moved elsewhere.  */
   set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 3ecfd3c..fb7ff3c 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
 
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -333,8 +333,7 @@
   if (fi == NULL)
     return;			/* paranoia */
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       generic_pop_dummy_frame ();
     }
@@ -342,15 +341,15 @@
     {
       /* Restore the saved regs. */
       for (i = 0; i < NUM_REGS; i++)
-	if (get_frame_saved_regs (fi)[i])
+	if (fi->saved_regs[i])
 	  {
 	    if (i == SP_REGNUM)
-	      write_register (i, get_frame_saved_regs (fi)[i]);
+	      write_register (i, fi->saved_regs[i]);
 	    else if (i == E_PC_REGNUM)
-	      write_register (i, read_memory_integer (get_frame_saved_regs (fi)[i],
+	      write_register (i, read_memory_integer (fi->saved_regs[i],
 						      xstormy16_pc_size));
 	    else
-	      write_register (i, read_memory_integer (get_frame_saved_regs (fi)[i],
+	      write_register (i, read_memory_integer (fi->saved_regs[i],
 						      xstormy16_reg_size));
 	  }
       /* Restore the PC */
@@ -467,8 +466,7 @@
   if (fi)
     {
       /* In a call dummy, don't touch the frame. */
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				       get_frame_base (fi)))
+      if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
 	return start_addr;
 
       /* Grab the frame-relative values of SP and FP, needed below. 
@@ -478,7 +476,7 @@
       fp = xstormy16_frame_saved_register (fi, E_FP_REGNUM);
 
       /* Initialize framesize with size of PC put on stack by CALLF inst. */
-      get_frame_extra_info (fi)->framesize = xstormy16_pc_size;
+      fi->extra_info->framesize = xstormy16_pc_size;
     }
   for (next_addr = start_addr;
        next_addr < end_addr; next_addr += xstormy16_inst_size)
@@ -492,8 +490,8 @@
 	  if (fi)
 	    {
 	      regnum = inst & 0x000f;
-	      get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize;
-	      get_frame_extra_info (fi)->framesize += xstormy16_reg_size;
+	      fi->saved_regs[regnum] = fi->extra_info->framesize;
+	      fi->extra_info->framesize += xstormy16_reg_size;
 	    }
 	}
 
@@ -501,28 +499,28 @@
       else if (inst == 0x301f || inst == 0x303f)	/* inc r15, #0x1/#0x3 */
 	{
 	  if (fi)		/* Record the frame size. */
-	    get_frame_extra_info (fi)->framesize += ((inst & 0x0030) >> 4) + 1;
+	    fi->extra_info->framesize += ((inst & 0x0030) >> 4) + 1;
 	}
 
       /* optional stack allocation for args and local vars > 4 && < 16 byte */
       else if ((inst & 0xff0f) == 0x510f)	/* 51Hf   add r15, #0xH */
 	{
 	  if (fi)		/* Record the frame size. */
-	    get_frame_extra_info (fi)->framesize += (inst & 0x00f0) >> 4;
+	    fi->extra_info->framesize += (inst & 0x00f0) >> 4;
 	}
 
       /* optional stack allocation for args and local vars >= 16 byte */
       else if (inst == 0x314f && inst2 >= 0x0010)	/* 314f HHHH  add r15, #0xH */
 	{
 	  if (fi)		/* Record the frame size. */
-	    get_frame_extra_info (fi)->framesize += inst2;
+	    fi->extra_info->framesize += inst2;
 	  next_addr += xstormy16_inst_size;
 	}
 
       else if (inst == 0x46fd)	/* mov r13, r15 */
 	{
 	  if (fi)		/* Record that the frame pointer is in use. */
-	    get_frame_extra_info (fi)->frameless_p = 0;
+	    fi->extra_info->frameless_p = 0;
 	  if (frameless)
 	    *frameless = 0;
 	}
@@ -548,7 +546,7 @@
 	      if (offset & 0x0800)
 		offset -= 0x1000;
 
-	      get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize + offset;
+	      fi->saved_regs[regnum] = fi->extra_info->framesize + offset;
 	    }
 	  next_addr += xstormy16_inst_size;
 	}
@@ -593,15 +591,15 @@
          by convention what we put here is simply the previous 
          _value_ of the SP (as opposed to an address where the
          previous value would have been pushed).  */
-      if (get_frame_extra_info (fi)->frameless_p)
+      if (fi->extra_info->frameless_p)
 	{
-	  get_frame_saved_regs (fi)[E_SP_REGNUM] = sp - get_frame_extra_info (fi)->framesize;
-	  deprecated_update_frame_base_hack (fi, sp);
+	  fi->saved_regs[E_SP_REGNUM] = sp - fi->extra_info->framesize;
+	  fi->frame = sp;
 	}
       else
 	{
-	  get_frame_saved_regs (fi)[E_SP_REGNUM] = fp - get_frame_extra_info (fi)->framesize;
-	  deprecated_update_frame_base_hack (fi, fp);
+	  fi->saved_regs[E_SP_REGNUM] = fp - fi->extra_info->framesize;
+	  fi->frame = fp;
 	}
 
       /* So far only offsets to the beginning of the frame are
@@ -609,11 +607,11 @@
          sp, fp and framesize. We know the beginning of the frame
          so we can translate the register offsets to real addresses. */
       for (regnum = 0; regnum < E_SP_REGNUM; ++regnum)
-	if (get_frame_saved_regs (fi)[regnum])
-	  get_frame_saved_regs (fi)[regnum] += get_frame_saved_regs (fi)[E_SP_REGNUM];
+	if (fi->saved_regs[regnum])
+	  fi->saved_regs[regnum] += fi->saved_regs[E_SP_REGNUM];
 
       /* Save address of PC on stack. */
-      get_frame_saved_regs (fi)[E_PC_REGNUM] = get_frame_saved_regs (fi)[E_SP_REGNUM];
+      fi->saved_regs[E_PC_REGNUM] = fi->saved_regs[E_SP_REGNUM];
     }
 
   return next_addr;
@@ -734,14 +732,14 @@
 {
   CORE_ADDR func_addr, func_end;
 
-  if (!get_frame_saved_regs (fi))
+  if (!fi->saved_regs)
     {
       frame_saved_regs_zalloc (fi);
 
       /* Find the beginning of this function, so we can analyze its
          prologue. */
-      if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
-	xstormy16_scan_prologue (func_addr, get_frame_pc (fi), fi, NULL);
+      if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end))
+	xstormy16_scan_prologue (func_addr, fi->pc, fi, NULL);
       /* Else we're out of luck (can't debug completely stripped code). 
          FIXME. */
     }
@@ -758,16 +756,14 @@
 {
   CORE_ADDR saved_pc;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
-      saved_pc = deprecated_read_register_dummy (get_frame_pc (fi),
-						 get_frame_base (fi),
+      saved_pc = deprecated_read_register_dummy (fi->pc, fi->frame,
 						 E_PC_REGNUM);
     }
   else
     {
-      saved_pc = read_memory_unsigned_integer (get_frame_saved_regs (fi)[E_PC_REGNUM],
+      saved_pc = read_memory_unsigned_integer (fi->saved_regs[E_PC_REGNUM],
 					       xstormy16_pc_size);
     }
 
@@ -783,28 +779,29 @@
 static void
 xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  if (!get_frame_extra_info (fi))
+  if (!fi->extra_info)
     {
-      frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
-      get_frame_extra_info (fi)->framesize = 0;
-      get_frame_extra_info (fi)->frameless_p = 1;	/* Default frameless, detect framed */
+      fi->extra_info = (struct frame_extra_info *)
+	frame_obstack_alloc (sizeof (struct frame_extra_info));
+      fi->extra_info->framesize = 0;
+      fi->extra_info->frameless_p = 1;	/* Default frameless, detect framed */
 
       /* By default, the fi->frame is set to the value of the FP reg by gdb.
          This may not always be right; we may be in a frameless function,
          or we may be in the prologue, before the FP has been set up.
          Unfortunately, we can't make this determination without first
          calling scan_prologue, and we can't do that unles we know the
-         get_frame_pc (fi).  */
+         fi->pc.  */
 
-      if (!get_frame_pc (fi))
+      if (!fi->pc)
 	{
 	  /* Sometimes we are called from get_prev_frame without
 	     the PC being set up first.  Long history, don't ask.
 	     Fortunately this will never happen from the outermost
 	     frame, so we should be able to get the saved pc from
 	     the next frame. */
-	  if (get_next_frame (fi))
-	    deprecated_update_frame_pc_hack (fi, xstormy16_frame_saved_pc (get_next_frame (fi)));
+	  if (fi->next)
+	    fi->pc = xstormy16_frame_saved_pc (fi->next);
 	}
 
       /* Take care of the saved_regs right here (non-lazy). */
@@ -820,16 +817,15 @@
 static CORE_ADDR
 xstormy16_frame_chain (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     {
       /* Call dummy's frame is the same as caller's.  */
-      return get_frame_base (fi);
+      return fi->frame;
     }
   else
     {
       /* Return computed offset from this frame's fp. */
-      return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
+      return fi->frame - fi->extra_info->framesize;
     }
 }
 
@@ -837,8 +833,8 @@
 xstormy16_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
 {
   return chain < 0x8000 && FRAME_SAVED_PC (thisframe) >= 0x8000 &&
-    (get_frame_extra_info (thisframe)->frameless_p ||
-     get_frame_base (thisframe) - get_frame_extra_info (thisframe)->framesize == chain);
+    (thisframe->extra_info->frameless_p ||
+     thisframe->frame - thisframe->extra_info->framesize == chain);
 }
 
 /* Function: xstormy16_saved_pc_after_call
@@ -962,7 +958,7 @@
 }
 
 static CORE_ADDR
-xstormy16_pointer_to_address (struct type *type, const void *buf)
+xstormy16_pointer_to_address (struct type *type, void *buf)
 {
   enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
   CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
@@ -1082,6 +1078,10 @@
   /* OK to default this value to 'unknown'. */
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
 
+  /* W/o prototype, coerce float args to double. */
+  set_gdbarch_coerce_float_to_double (gdbarch,
+				      standard_coerce_float_to_double);
+
   /*
    * Call Dummies
    * 
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index be7561b..e1aa8fa 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -159,7 +159,7 @@
 CORE_ADDR
 z8k_frame_chain (struct frame_info *thisframe)
 {
-  if (!inside_entry_file (get_frame_pc (thisframe)))
+  if (!inside_entry_file (thisframe->pc))
     {
       return read_memory_pointer (thisframe->frame);
     }
@@ -179,7 +179,7 @@
   int w;
 
   frame_saved_regs_zalloc (frame_info);
-  pc = get_pc_function_start (get_frame_pc (frame_info));
+  pc = get_pc_function_start (frame_info->pc);
 
   /* wander down the instruction stream */
   examine_frame (pc, frame_info->saved_regs, frame_info->frame);
@@ -240,7 +240,7 @@
 
   memset (fsrp, 0, sizeof *fsrp);
 
-  pc = skip_adjust (get_pc_function_start (get_frame_pc (fip)), &locals);
+  pc = skip_adjust (get_pc_function_start (fip->pc), &locals);
 
   {
     adr = get_frame_base (fip) - locals;
diff --git a/include/ChangeLog b/include/ChangeLog
index 66790de..5b46e44 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,15 +1,3 @@
-2002-01-02  Ben Elliston  <bje@redhat.com>
-
-	* dis-asm.h (print_insn_iq2000): Declare.
-
-2002-12-24    Dmitry Diky <diwil@mail.ru>
-
-	* dis-asm.h: Add msp430 disassembler prototype.
-
-2002-12-27  Chris Demetriou  <cgd@broadcom.com>
-
-	* dis-asm.h (print_mips_disassembler_options): Prototype.
-
 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
 
 	* bfdlink.h (struct bfd_link_info): Add "strip_discarded".
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 5e6bdc3..993b3ad 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -217,7 +217,6 @@
 extern int print_insn_mmix		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_mn10200		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_mn10300		PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_msp430		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_ns32k		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_openrisc		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_big_or32          PARAMS ((bfd_vma, disassemble_info*));
@@ -240,12 +239,10 @@
 extern int print_insn_sh64		PARAMS ((bfd_vma, disassemble_info *));
 extern int print_insn_sh64x_media	PARAMS ((bfd_vma, disassemble_info *));
 extern int print_insn_frv		PARAMS ((bfd_vma, disassemble_info *));
-extern int print_insn_iq2000            PARAMS ((bfd_vma, disassemble_info *));
 
 extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
 extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
 
-extern void print_mips_disassembler_options PARAMS ((FILE *));
 extern void print_ppc_disassembler_options PARAMS ((FILE *));
 extern void print_arm_disassembler_options PARAMS ((FILE *));
 extern void parse_arm_disassembler_option  PARAMS ((char *));
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 4303088..de95f20 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,17 +1,3 @@
-2002-01-02  Ben Elliston  <bje@redhat.com>
-
-	* common.h (EM_IQ2000): Define.
-	* iq2000.h: New file.
-
-2002-12-30  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h (E_MIPS_ARCH_32R2): New define.
-
-2002-12-24    Dmitry Diky <diwil@mail.ru>
-
-	* common.h: Define msp430 machine numbers.
-	* msp430.h: New file.  Define msp430 relocs.
-
 2002-12-20  DJ Delorie  <dj@redhat.com>
 
 	* xstormy16.h: Add XSTORMY16_12.
diff --git a/include/elf/common.h b/include/elf/common.h
index c8729f1..0cef267 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -251,15 +251,6 @@
 /* Ubicom IP2xxx; no ABI */
 #define EM_IP2K_OLD 	        0x8217	
 
-/* MSP430 magic number
-      Written in the absense everything.  */
-#define EM_MSP430_OLD		0x1059
-
-/* TI msp430 micro controller.  */
-#define EM_MSP430      		0x430
-
-/* Vitesse IQ2000 */
-#define EM_IQ2000		0xFEBA
 /* See the above comment before you add a new EM_* value here.  */
 
 /* Values for e_version.  */
diff --git a/include/elf/iq2000.h b/include/elf/iq2000.h
deleted file mode 100644
index 83c690c..0000000
--- a/include/elf/iq2000.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* IQ2000 ELF support for BFD.
-   Copyright (C) 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-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.  */
-
-#ifndef _ELF_IQ2000_H
-#define _ELF_IQ2000_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations.  */
-START_RELOC_NUMBERS (elf_iq2000_reloc_type)
-  RELOC_NUMBER (R_IQ2000_NONE, 0)
-  RELOC_NUMBER (R_IQ2000_16, 1)
-  RELOC_NUMBER (R_IQ2000_32, 2)
-  RELOC_NUMBER (R_IQ2000_26, 3)
-  RELOC_NUMBER (R_IQ2000_PC16, 4)
-  RELOC_NUMBER (R_IQ2000_HI16, 5)
-  RELOC_NUMBER (R_IQ2000_LO16, 6)
-  RELOC_NUMBER (R_IQ2000_OFFSET_16, 7)
-  RELOC_NUMBER (R_IQ2000_OFFSET_21, 8)
-  RELOC_NUMBER (R_IQ2000_UHI16, 9)
-  RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
-  RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
-  RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_IQ2000_max)
-
-#define EF_IQ2000_CPU_IQ2000	0x00000001      /* default */
-#define EF_IQ2000_CPU_IQ10      0x00000002      /* IQ10 */
-#define EF_IQ2000_CPU_MASK	0x00000003	/* specific cpu bits */
-#define EF_IQ2000_ALL_FLAGS	(EF_IQ2000_CPU_MASK)
-
-/* Define the data & instruction memory discriminator.  In a linked
-   executable, an symbol should be deemed to point to an instruction
-   if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly
-   for the data space.  */
-
-#define IQ2000_DATA_MASK   0x80000000
-#define IQ2000_DATA_VALUE  0x00000000
-#define IQ2000_INSN_MASK   0x80000000
-#define IQ2000_INSN_VALUE  0x80000000
-
-
-#endif /* _ELF_IQ2000_H */
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 964c59a..81451ab 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -145,9 +145,6 @@
 /* -mips64 code.  */
 #define E_MIPS_ARCH_64          0x60000000
 
-/* -mips32r2 code.  */
-#define E_MIPS_ARCH_32R2        0x70000000
-
 /* The ABI of the file.  Also see EF_MIPS_ABI2 above. */
 #define EF_MIPS_ABI		0x0000F000
 
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
deleted file mode 100644
index cb3f241..0000000
--- a/include/elf/msp430.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* MSP430 ELF support for BFD.
-   Copyright (C) 2002 Free Software Foundation, Inc.
-   Contributed by Dmitry Diky <diwil@mail.ru>
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   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.  */
-
-#ifndef _ELF_MSP430_H
-#define _ELF_MSP430_H
-
-#include "elf/reloc-macros.h"
-
-/* Processor specific flags for the ELF header e_flags field.  */
-#define EF_MSP430_MACH 		0xff
-
-#define E_MSP430_MACH_MSP430x11x1  110
-#define E_MSP430_MACH_MSP430x11  11
-#define E_MSP430_MACH_MSP430x12  12
-#define E_MSP430_MACH_MSP430x13  13
-#define E_MSP430_MACH_MSP430x14  14
-#define E_MSP430_MACH_MSP430x31  31
-#define E_MSP430_MACH_MSP430x32  32
-#define E_MSP430_MACH_MSP430x33  33
-#define E_MSP430_MACH_MSP430x41  41
-#define E_MSP430_MACH_MSP430x43  43
-#define E_MSP430_MACH_MSP430x44  44
-#define E_MSP430_MACH_MSP430x15  15
-#define E_MSP430_MACH_MSP430x16  16
-
-/* Relocations.  */
-START_RELOC_NUMBERS (elf_msp430_reloc_type)
-     RELOC_NUMBER (R_MSP430_NONE,		0)
-     RELOC_NUMBER (R_MSP430_32,			1)
-     RELOC_NUMBER (R_MSP430_10_PCREL,		2)
-     RELOC_NUMBER (R_MSP430_16, 		3)
-     RELOC_NUMBER (R_MSP430_16_PCREL, 		4)
-     RELOC_NUMBER (R_MSP430_16_BYTE, 		5)
-     RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 	6)
-
-END_RELOC_NUMBERS (R_MSP430_max)
-
-#endif /* _ELF_MSP430_H */
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index b36341d..c39a7a0 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,7 +1,3 @@
-2002-12-26  Kazu Hirata  <kazu@cs.umass.edu>
-
-	* sim-h8300.h: Remove ^M.
-
 2002-07-29  Andrey Volkov  <avolkov@transas.com>
 
 	* sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
diff --git a/include/gdb/sim-h8300.h b/include/gdb/sim-h8300.h
index 246370a..ecc6883 100644
--- a/include/gdb/sim-h8300.h
+++ b/include/gdb/sim-h8300.h
@@ -1,36 +1,36 @@
-/* This file defines the interface between the h8300 simulator and gdb.
-   Copyright (C) 2002 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-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
+/* This file defines the interface between the h8300 simulator and gdb.

+   Copyright (C) 2002 Free Software Foundation, Inc.

+

+This file is part of GDB.

+

+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.  */
 
-#if !defined (SIM_H8300_H)
-#define SIM_H8300_H
-
-#ifdef __cplusplus
+#if !defined (SIM_H8300_H)

+#define SIM_H8300_H

+

+#ifdef __cplusplus

 extern "C" { //}
 #endif
-
-/* The simulator makes use of the following register information. */
-
+  

+/* The simulator makes use of the following register information. */ 

+  

   enum sim_h8300_regs
   {
     /* Registers common to all the H8 variants. */
     /* Start here: */
-    SIM_H8300_R0_REGNUM,
+    SIM_H8300_R0_REGNUM,    
     SIM_H8300_R1_REGNUM,
     SIM_H8300_R2_REGNUM,
     SIM_H8300_R3_REGNUM,
@@ -42,8 +42,8 @@
     SIM_H8300_CCR_REGNUM,  /* Contains processor status */
     SIM_H8300_PC_REGNUM,   /* Contains program counter */
     /* End here */
-
-    SIM_H8300_EXR_REGNUM,  /* Contains extended processor status
+    
+    SIM_H8300_EXR_REGNUM,  /* Contains extended processor status 
                               H8S and higher */
     SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/
     SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */
@@ -55,11 +55,11 @@
 
   enum
   {
-    SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
+    SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg 
+                                                         may be passed */    
+    SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM,  /* last  reg in which an arg 
                                                          may be passed */
-    SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM,  /* last  reg in which an arg
-                                                         may be passed */
-    SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
+    SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing 
                                                   stack frame */
     SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM  /* Contains address of top of stack */
   };
@@ -71,8 +71,8 @@
     SIM_H8300_NUM_REGS = 16
   };
 
-#ifdef __cplusplus
+#ifdef __cplusplus

 }
 #endif
-
+ 

 #endif				/* SIM_H8300_H */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index e40f056..5aa92e9 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,44 +1,3 @@
-2003-01-07  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h: Fix missing space in comment.
-	(INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4, INSN_ISA5)
-	(INSN_ISA32, INSN_ISA32R2, INSN_ISA64): Shift values right
-	by four bits.
-
-2003-01-02  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h: Update copyright years to include 2002 (which had
-	been missed previously) and 2003.  Make comments about "+A",
-	"+B", and "+C" operand types more descriptive.
-
-2002-12-31  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h: Note that the "+D" operand type name is now used.
-
-2002-12-30  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h: Document "+" as the start of two-character operand
-	type names, and add new "K", "+A", "+B", and "+C" operand types.
-	(OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
-	(OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
-	defines.
-
-2002-12-24    Dmitry Diky <diwil@mail.ru>
-
-	* msp430.h: New file.  Defines msp430 opcodes.
-
-2002-12-30 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
-	* h8300.h: Added some more pseudo opcodes for system call
-	processing.
-
-2002-12-19  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips.h (OP_OP_COP0, OP_OP_COP1, OP_OP_COP2, OP_OP_COP3)
-	(OP_OP_LWC1, OP_OP_LWC2, OP_OP_LWC3, OP_OP_LDC1, OP_OP_LDC2)
-	(OP_OP_LDC3, OP_OP_SWC1, OP_OP_SWC2, OP_OP_SWC3, OP_OP_SDC1)
-	(OP_OP_SDC2, OP_OP_SDC3): Define.
-
 2002-12-16  Alan Modra  <amodra@bigpond.net.au>
 
 	* hppa.h (completer_chars): #if 0 out.
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 4141c57..d5404c2 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -301,16 +301,6 @@
 #define O_STM 86
 #define O_STMAC 87
 #define O_LAST 88
-/* Change made for System Call processing.  */
-#define O_SYS_CREAT 100
-#define O_SYS_OPEN 101
-#define O_SYS_READ 102
-#define O_SYS_WRITE 103
-#define O_SYS_LSEEK 104
-#define O_SYS_CLOSE 105
-#define O_SYS_STAT 106
-#define O_SYS_FSTAT 107
-/* End of System Call specific Changes.  */
 #define SB 0
 #define SW 1
 #define SL 2
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 1f90cfd..3849fdc 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1,5 +1,5 @@
 /* mips.h.  Mips opcode list for GDB, the GNU debugger.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Contributed by Ralph Campbell and OSF
    Commented and modified by Ian Lance Taylor, Cygnus Support
@@ -142,27 +142,6 @@
 #define OP_SH_VECBYTE		22
 #define OP_MASK_VECALIGN	0x7	/* Vector byte-align (alni.ob) op.  */
 #define OP_SH_VECALIGN		21
-#define OP_MASK_INSMSB		0x1f	/* "ins" MSB.  */
-#define OP_SH_INSMSB		11
-#define OP_MASK_EXTMSBD		0x1f	/* "ext" MSBD.  */
-#define OP_SH_EXTMSBD		11
-
-#define	OP_OP_COP0		0x10
-#define	OP_OP_COP1		0x11
-#define	OP_OP_COP2		0x12
-#define	OP_OP_COP3		0x13
-#define	OP_OP_LWC1		0x31
-#define	OP_OP_LWC2		0x32
-#define	OP_OP_LWC3		0x33	/* a.k.a. pref */
-#define	OP_OP_LDC1		0x35
-#define	OP_OP_LDC2		0x36
-#define	OP_OP_LDC3		0x37	/* a.k.a. ld */
-#define	OP_OP_SWC1		0x39
-#define	OP_OP_SWC2		0x3a
-#define	OP_OP_SWC3		0x3b
-#define	OP_OP_SDC1		0x3d
-#define	OP_OP_SDC2		0x3e
-#define	OP_OP_SDC3		0x3f	/* a.k.a. sd */
 
 /* Values in the 'VSEL' field.  */
 #define MDMX_FMTSEL_IMM_QH	0x1d
@@ -232,15 +211,6 @@
    "J" 19 bit wait function code (OP_*_CODE19)
    "x" accept and ignore register name
    "z" must be zero register
-   "K" 5 bit Hardware Register (rdhwr instruction) (OP_*_RD)
-   "+A" 5 bit ins/ext position, which becomes LSB (OP_*_SHAMT).
-	Enforces: 0 <= pos < 32.
-   "+B" 5 bit ins size, which becomes MSB (OP_*_INSMSB).
-	Requires that "+A" occur first to set position.
-	Enforces: 0 < (pos+size) <= 32.
-   "+C" 5 bit ext size, which becomes MSBD (OP_*_EXTMSBD).
-	Requires that "+A" occur first to set position.
-	Enforces: 0 < (pos+size) <= 32.
 
    Floating point instructions:
    "D" 5 bit destination register (OP_*_FD)
@@ -260,8 +230,6 @@
    "e" 5 bit vector register byte specifier (OP_*_VECBYTE)
    "%" 3 bit immediate vr5400 vector alignment operand (OP_*_VECALIGN)
    see also "k" above
-   "+D" Combined destination register ("G") and sel ("H") for CP0 ops,
-	for pretty-printing in disassembly only.
 
    Macro instructions:
    "A" General 32 bit expression
@@ -283,16 +251,11 @@
    "()" parens surrounding optional value
    ","  separates operands
    "[]" brackets around index for vector-op scalar operand specifier (vr5400)
-   "+"  Start of extension sequence.
 
    Characters used so far, for quick reference when adding more:
-   "%[]<>(),+"
-   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+   "%[]<>(),"
+   "ABCDEFGHIJLMNOPQRSTUVWXYZ"
    "abcdefhijklopqrstuvwxz"
-
-   Extension character sequences used so far ("+" followed by the
-   following), for quick reference when adding more:
-   "ABCD"
 */
 
 /* These are the bits which may be set in the pinfo field of an
@@ -373,18 +336,17 @@
 
 /* Masks used to mark instructions to indicate which MIPS ISA level
    they were introduced in.  ISAs, as defined below, are logical
-   ORs of these bits, indicating that they support the instructions
+   ORs of these bits, indicatingthat they support the instructions
    defined at the given level.  */
 
 #define INSN_ISA_MASK		  0x00000fff
-#define INSN_ISA1                 0x00000001
-#define INSN_ISA2                 0x00000002
-#define INSN_ISA3                 0x00000004
-#define INSN_ISA4                 0x00000008
-#define INSN_ISA5                 0x00000010
-#define INSN_ISA32                0x00000020
-#define INSN_ISA64                0x00000040
-#define INSN_ISA32R2              0x00000080
+#define INSN_ISA1                 0x00000010
+#define INSN_ISA2                 0x00000020
+#define INSN_ISA3                 0x00000040
+#define INSN_ISA4                 0x00000080
+#define INSN_ISA5                 0x00000100
+#define INSN_ISA32                0x00000200
+#define INSN_ISA64                0x00000400
 
 /* Masks used for MIPS-defined ASEs.  */
 #define INSN_ASE_MASK		  0x0000f000
@@ -427,12 +389,9 @@
 #define       ISA_MIPS3       (ISA_MIPS2 | INSN_ISA3)
 #define       ISA_MIPS4       (ISA_MIPS3 | INSN_ISA4)
 #define       ISA_MIPS5       (ISA_MIPS4 | INSN_ISA5)
-
 #define       ISA_MIPS32      (ISA_MIPS2 | INSN_ISA32)
 #define       ISA_MIPS64      (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
 
-#define       ISA_MIPS32R2    (ISA_MIPS32 | INSN_ISA32R2)
-
 /* CPU defines, use instead of hardcoding processor number. Keep this
    in sync with bfd/archures.c in order for machine selection to work.  */
 #define CPU_UNKNOWN	0               /* Gas internal use.  */
@@ -456,7 +415,6 @@
 #define CPU_R12000	12000
 #define CPU_MIPS16	16
 #define CPU_MIPS32	32
-#define CPU_MIPS32R2	33
 #define CPU_MIPS5       5
 #define CPU_MIPS64      64
 #define CPU_SB1         12310201        /* octal 'SB', 01.  */
diff --git a/include/opcode/msp430.h b/include/opcode/msp430.h
deleted file mode 100644
index 1970225..0000000
--- a/include/opcode/msp430.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Opcode table for the TI MSP430 microcontrollers
-
-   Copyright 2002 Free Software Foundation, Inc.
-   Contributed by Dmitry Diky <diwil@mail.ru>
-   
-   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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifndef __MSP430_H_
-#define __MSP430_H_
-
-struct msp430_operand_s
-{
-  int ol;	/* Operand length words.  */
-  int am;	/* Addr mode.  */
-  int reg;	/* Register.  */
-  int mode;	/* Pperand mode.  */
-#define OP_REG		0
-#define OP_EXP		1
-#ifndef DASM_SECTION
-  expressionS	exp;
-#endif
-};
-
-#define BYTE_OPERATION  (1 << 6)  /* Byte operation flag for all instructions.  */
-
-struct  msp430_opcode_s
-{
-  char *name;
-  int fmt;
-  int insn_opnumb;
-  int bin_opcode;
-  int bin_mask;
-};
-
-#define MSP_INSN(name, size, numb, bin, mask) { #name, size, numb, bin, mask }
-
-static struct msp430_opcode_s msp430_opcodes[] = 
-{
-  MSP_INSN (and,   1, 2, 0xf000, 0xf000),
-  MSP_INSN (inv,   0, 1, 0xe330, 0xfff0),
-  MSP_INSN (xor,   1, 2, 0xe000, 0xf000),
-  MSP_INSN (setz,  0, 0, 0xd322, 0xffff),
-  MSP_INSN (setc,  0, 0, 0xd312, 0xffff),
-  MSP_INSN (eint,  0, 0, 0xd232, 0xffff),
-  MSP_INSN (setn,  0, 0, 0xd222, 0xffff),
-  MSP_INSN (bis,   1, 2, 0xd000, 0xf000),
-  MSP_INSN (clrz,  0, 0, 0xc322, 0xffff),
-  MSP_INSN (clrc,  0, 0, 0xc312, 0xffff),
-  MSP_INSN (dint,  0, 0, 0xc232, 0xffff),
-  MSP_INSN (clrn,  0, 0, 0xc222, 0xffff),
-  MSP_INSN (bic,   1, 2, 0xc000, 0xf000),
-  MSP_INSN (bit,   1, 2, 0xb000, 0xf000),
-  MSP_INSN (dadc,  0, 1, 0xa300, 0xff30),
-  MSP_INSN (dadd,  1, 2, 0xa000, 0xf000),
-  MSP_INSN (tst,   0, 1, 0x9300, 0xff30),
-  MSP_INSN (cmp,   1, 2, 0x9000, 0xf000),
-  MSP_INSN (decd,  0, 1, 0x8320, 0xff30),
-  MSP_INSN (dec,   0, 1, 0x8310, 0xff30),
-  MSP_INSN (sub,   1, 2, 0x8000, 0xf000),
-  MSP_INSN (sbc,   0, 1, 0x7300, 0xff30),
-  MSP_INSN (subc,  1, 2, 0x7000, 0xf000),
-  MSP_INSN (adc,   0, 1, 0x6300, 0xff30),
-  MSP_INSN (rlc,   0, 2, 0x6000, 0xf000),
-  MSP_INSN (addc,  1, 2, 0x6000, 0xf000),
-  MSP_INSN (incd,  0, 1, 0x5320, 0xff30),
-  MSP_INSN (inc,   0, 1, 0x5310, 0xff30),
-  MSP_INSN (rla,   0, 2, 0x5000, 0xf000),
-  MSP_INSN (add,   1, 2, 0x5000, 0xf000),
-  MSP_INSN (nop,   0, 0, 0x4303, 0xffff),
-  MSP_INSN (clr,   0, 1, 0x4300, 0xff30),
-  MSP_INSN (ret,   0, 0, 0x4130, 0xff30),
-  MSP_INSN (pop,   0, 1, 0x4130, 0xff30),
-  MSP_INSN (br,    0, 3, 0x4000, 0xf000),
-  MSP_INSN (mov,   1, 2, 0x4000, 0xf000),
-  MSP_INSN (jmp,   3, 1, 0x3c00, 0xfc00),
-  MSP_INSN (jl,    3, 1, 0x3800, 0xfc00),
-  MSP_INSN (jge,   3, 1, 0x3400, 0xfc00),
-  MSP_INSN (jn,    3, 1, 0x3000, 0xfc00),
-  MSP_INSN (jc,    3, 1, 0x2c00, 0xfc00),
-  MSP_INSN (jhs,   3, 1, 0x2c00, 0xfc00),
-  MSP_INSN (jnc,   3, 1, 0x2800, 0xfc00),
-  MSP_INSN (jlo,   3, 1, 0x2800, 0xfc00),
-  MSP_INSN (jz,    3, 1, 0x2400, 0xfc00),
-  MSP_INSN (jeq,   3, 1, 0x2400, 0xfc00),
-  MSP_INSN (jnz,   3, 1, 0x2000, 0xfc00),
-  MSP_INSN (jne,   3, 1, 0x2000, 0xfc00),
-  MSP_INSN (reti,  2, 0, 0x1300, 0xffc0),
-  MSP_INSN (call,  2, 1, 0x1280, 0xffc0),
-  MSP_INSN (push,  2, 1, 0x1200, 0xff80),
-  MSP_INSN (sxt,   2, 1, 0x1180, 0xffc0),
-  MSP_INSN (rra,   2, 1, 0x1100, 0xff80),
-  MSP_INSN (swpb,  2, 1, 0x1080, 0xffc0),
-  MSP_INSN (rrc,   2, 1, 0x1000, 0xff80),
-
-  /* End of instruction set.  */
-  { NULL, 0, 0, 0, 0 }
-};
-
-#endif
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 3b236b0..7280aa0 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,10 +1,3 @@
-2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
-
-	* Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
-
-	* Makefile.in (install_to_libdir, install_to_tooldir): Add a
-	mkinstalldirs command.
-
 2002-12-04  Danny Smith  <dannysmith@users.sourceforge.net>
 
 	* make-relative-prefix.c (HAVE_HOST_EXECUTABLE_SUFFIX):
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 1af4c32..cdf14a4 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -84,7 +84,6 @@
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"CC=$(CC)" \
 	"CFLAGS=$(CFLAGS)" \
-	"DESTDIR=$(DESTDIR)" \
 	"LIBCFLAGS=$(LIBCFLAGS)" \
 	"EXTRA_OFILES=$(EXTRA_OFILES)" \
 	"HDEFINES=$(HDEFINES)" \
@@ -262,7 +261,6 @@
 install: install_to_$(INSTALL_DEST) install-subdir
 
 install_to_libdir: all
-	${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
 	$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
 	( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
 	mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
@@ -279,7 +277,6 @@
 	@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 install_to_tooldir: all
-	${mkinstalldirs} $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)
 	$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
 	( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
 	mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index aaa97d3..430b4dd 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,137 +1,3 @@
-2003-01-08  Klee Dienes  <kdienes@apple.com>
-
-	* Makefile.am (ALL_MACHINES): Add msp430-dis.lo.
-	* Makefile.in: Regenerate.
-
-2003-01-08  Alan Modra  <amodra@bigpond.net.au>
-
-	* ppc-opc.c (powerpc_macros <extrwi>): Accept a shift of 32.
-
-2002-01-02  Ben Elliston  <bje@redhat.com>
-	    Jeff Johnston  <jjohnstn@redhat.com>
-
-        * iq2000-asm.c: New file.
-        * iq2000-desc.c: Likewise.
-        * iq2000-desc.h: Likewise.
-        * iq2000-dis.c: Likewise.
-        * iq2000-ibld.c: Likewise.
-        * iq2000-opc.c: Likewise.
-        * iq2000-opc.h: Likewise.
-        * Makefile.am (HFILES): Add iq2000-desc.h, iq2000-opc.h.
-        (CFILES): Add iq2000-asm.c, iq2000-desc.c, iq2000-dis.c,
-        iq2000-ibld.c, iq2000-opc.c.
-        (ALL_MACHINES): Add iq2000-asm.lo, iq2000-desc.lo, iq2000-dis.lo,
-        iq2000-ibld.lo, iq2000-opc.lo.
-        (CLEANFILES): Add stamp-iq2000.
-        (IQ2000_DEPS): New macro.
-        (stamp-iq2000): New target.
-        * Makefile.in: Regenerate.
-        * configure.in: Handle bfd_iq2000_arch.
-        * configure: Regenerate.
-
-2003-01-02  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips-dis.c (print_insn_args): Use position extracted by "+A"
-	to calculate size for "+B".  Redo code for "+C" so it shares
-	the same style as "+A" and "+B" now do.
-
-2003-01-02  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips-dis.c: Update copyright years.
-	(print_insn_arg): Rename to...
-	(print_insn_args): This, returning void.  Process the whole
-	string of args rather than a single one.  Reindent.
-	(print_insn_mips): Update to match the above.
-
-2002-12-31  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips-opc.c (mips_builtin_opcodes): Move "di" into the
-	right order alphabetically, and make all hex constants use
-	lower-case letters.
-
-2002-12-31  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips-dis.c (mips_cp0sel_name): New structure.
-	(mips_cp0sel_names_mips3264, mips_cp0sel_names_mips3264r2)
-	(mips_cp0sel_names_sb1): New arrays.
-	(mips_arch_choice): New structure members "cp0sel_names" and
-	"cp0sel_names_len".
-	(mips_arch_choices): Add references to new cp0sel_names arrays
-	as appropriate, and make all existing entries reference
-	appropriate mips_XXX_names_numeric arrays rather than simply
-	using NULL.
-	(mips_cp0sel_names, mips_cp0sel_names_len): New variables.
-	(lookup_mips_cp0sel_name): New function.
-	(set_default_mips_dis_options): Set mips_cp0sel_names and
-	mips_cp0sel_names_len as appropriate.  Remove now-unnecessary
-	checks for NULL register name arrays.
-	(parse_mips_dis_option): Likewise.
-	(print_insn_arg): Handle "+D" operand type.
-	* mips-opc.c (mips_builtin_opcodes): Add new "+D" variants
-	of mfc0, mtc0, dmfc0, and dmtc0 to print CP0+sel register
-	names symbolically.
-
-2002-12-30  Chris Demetriou  <cgd@broadcom.com>
-
-	* mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric)
-	(mips_hwr_names_mips3264r2): New arrays.
-	(mips_arch_choice): New "hwr_names" member.
-	(mips_arch_choices): Adjust for structure change, and add a new
-	entry for "mips32r2" ISA.
-	(mips_hwr_names): New variable.
-	(set_default_mips_dis_options): Set mips_hwr_names.
-	(parse_mips_dis_option): New "hwr-names" option which sets
-	mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names.
-	(print_insn_arg): Change return type to "int"
-	and use that to indicate number of characters consumed.
-	Add support for "+" operand extension character, "+A", "+B",
-	"+C", and "K" operands.
-	(print_insn_mips): Adjust for changes to print_insn_arg.
-	(print_mips_disassembler_options): Adjust for "hwr-names"
-	addition and "reg-names" change.
-	* mips-opc (I33): New define (shorthand for INSN_ISA32R2).
-	(mips_builtin_opcodes): Note that "nop" and "ssnop" are special
-	forms of "sll".  Add new MIPS32 Release 2 instructions: ehb,
-	di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2,
-	rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh.
-	Note that hardware rotate instructions (ror, rorv) can be
-	used on MIPS32 Release 2, and add the official mnemonics
-	for them (rotr, rotrv) and the similar "rotl" mnemonic for
-	left-rotate.
-
-2002-12-30    Dmitry Diky <diwil@mail.ru>
-
-	* configure.in: Add msp430 target.
-	* configure: Regenerate.
-	* disassemble.c: Add entry for msp430 disassembly.
-	* msp430-dis.c: New file: msp430 disassembler.
-
-2002-12-27  Chris Demetriou  <cgd@broadcom.com>
-
-	* disassemble.c (disassembler_usage): Add invocation of
-	print_mips_disassembler_options.
-	* mips-dis.c: Include libiberty.h.
-	(print_mips_disassembler_options, set_default_mips_dis_options)
-	(parse_mips_dis_option, parse_mips_dis_options, choose_abi_by_name)
-	(choose_arch_by_name, choose_arch_by_number): New functions.
-	(mips_abi_choice, mips_arch_choice): New structures.
-	(mips32_reg_names, mips64_reg_names, reg_names): Remove.
-	(mips_gpr_names_numeric, mips_gpr_names_oldabi)
-	(mips_gpr_names_newabi, mips_fpr_names_numeric)
-	(mips_fpr_names_32, mips_fpr_names_n32, mips_fpr_names_64)
-	(mips_cp0_names_numeric, mips_cp0_names_mips3264)
-	(mips_cp0_names_sb1, mips_abi_choices, mips_arch_choices)
-	(mips_processor, mips_isa, mips_gpr_names, mips_fpr_names)
-	(mips_cp0_names): New variables.
-	(print_insn_args): Use new variables to print GPR, FPR, and CP0
-	register names.
-	(mips_isa_type): Remove.
-	(print_insn_mips): Remove ISA and CPU setup since it is now done...
-	(_print_insn_mips): Here.  Remove register setup code, and
-	call set_default_mips_dis_options and parse_mips_dis_options
-	instead.
-	(print_mips16_insn_arg): Use mips_gpr_names instead of mips32_names.
-
 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
 
 	* Makefile.in: Regenerate.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 00afec3..ba00726 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -31,7 +31,6 @@
 	ia64-asmtab.h \
 	ia64-opc.h \
 	ip2k-desc.h ip2k-opc.h \
-	iq2000-desc.h iq2000-opc.h \
 	m32r-desc.h m32r-opc.h \
 	mcore-opc.h \
 	openrisc-desc.h openrisc-opc.h \
@@ -97,11 +96,6 @@
 	ip2k-dis.c \
 	ip2k-ibld.c \
 	ip2k-opc.c \
-	iq2000-asm.c \
-	iq2000-desc.c \
-	iq2000-dis.c \
-	iq2000-ibld.c \
-	iq2000-opc.c \
 	m32r-asm.c \
 	m32r-desc.c \
 	m32r-dis.c \
@@ -207,11 +201,6 @@
 	ip2k-dis.lo \
 	ip2k-ibld.lo \
 	ip2k-opc.lo \
-	iq2000-asm.lo \
-	iq2000-desc.lo \
-	iq2000-dis.lo \
-	iq2000-ibld.lo \
-	iq2000-opc.lo \
 	m32r-asm.lo \
 	m32r-desc.lo \
 	m32r-dis.lo \
@@ -233,7 +222,6 @@
 	mips16-opc.lo \
 	mmix-dis.lo \
 	mmix-opc.lo \
-	msp430-dis.lo \
 	ns32k-dis.lo \
 	openrisc-asm.lo \
 	openrisc-desc.lo \
@@ -338,7 +326,7 @@
 
 CLEANFILES = \
 	stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
-	stamp-iq2000 stamp-xstormy16 \
+	stamp-xstormy16 \
 	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
 
 
@@ -362,7 +350,6 @@
 FR30_DEPS = stamp-fr30
 FRV_DEPS = stamp-frv
 OPENRISC_DEPS = stamp-openrisc
-IQ2000_DEPS = stamp-iq2000
 XSTORMY16_DEPS = stamp-xstormy16
 else
 IP2K_DEPS =
@@ -370,7 +357,6 @@
 FR30_DEPS =
 FRV_DEPS =
 OPENRISC_DEPS = 
-IQ2000_DEPS = 
 XSTORMY16_DEPS = 
 endif
 
@@ -415,12 +401,6 @@
 stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
 	$(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
 
-$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
-	@true
-stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
-	$(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
-	$(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= extrafiles=
-
 $(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
 	@true
 stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index e935fd4..da66cf5 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 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.
@@ -141,7 +141,6 @@
 	ia64-asmtab.h \
 	ia64-opc.h \
 	ip2k-desc.h ip2k-opc.h \
-	iq2000-desc.h iq2000-opc.h \
 	m32r-desc.h m32r-opc.h \
 	mcore-opc.h \
 	openrisc-desc.h openrisc-opc.h \
@@ -208,11 +207,6 @@
 	ip2k-dis.c \
 	ip2k-ibld.c \
 	ip2k-opc.c \
-	iq2000-asm.c \
-	iq2000-desc.c \
-	iq2000-dis.c \
-	iq2000-ibld.c \
-	iq2000-opc.c \
 	m32r-asm.c \
 	m32r-desc.c \
 	m32r-dis.c \
@@ -319,11 +313,6 @@
 	ip2k-dis.lo \
 	ip2k-ibld.lo \
 	ip2k-opc.lo \
-	iq2000-asm.lo \
-	iq2000-desc.lo \
-	iq2000-dis.lo \
-	iq2000-ibld.lo \
-	iq2000-opc.lo \
 	m32r-asm.lo \
 	m32r-desc.lo \
 	m32r-dis.lo \
@@ -345,7 +334,6 @@
 	mips16-opc.lo \
 	mmix-dis.lo \
 	mmix-opc.lo \
-	msp430-dis.lo \
 	ns32k-dis.lo \
 	openrisc-asm.lo \
 	openrisc-desc.lo \
@@ -404,7 +392,7 @@
 POTFILES = $(HFILES) $(CFILES)
 
 CLEANFILES = \
-	stamp-ip2k stamp-iq2000 stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
+	stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
 	stamp-xstormy16 \
 	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
 
@@ -425,8 +413,6 @@
 CGEN_CPUS = fr30 frv ip2k m32r openrisc xstormy16
 @CGEN_MAINT_TRUE@IP2K_DEPS = @CGEN_MAINT_TRUE@stamp-ip2k
 @CGEN_MAINT_FALSE@IP2K_DEPS = 
-@CGEN_MAINT_TRUE@IQ2000_DEPS = @CGEN_MAINT_TRUE@stamp-ip2000
-@CGEN_MAINT_FALSE@IQ2000_DEPS = 
 @CGEN_MAINT_TRUE@M32R_DEPS = @CGEN_MAINT_TRUE@stamp-m32r
 @CGEN_MAINT_FALSE@M32R_DEPS = 
 @CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
@@ -465,7 +451,7 @@
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
 OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -614,7 +600,7 @@
 	dot_seen=no; \
 	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
 	  rev="$$subdir $$rev"; \
-	  test "$$subdir" != "." || dot_seen=yes; \
+	  test "$$subdir" = "." && dot_seen=yes; \
 	done; \
 	test "$$dot_seen" = "no" && rev=". $$rev"; \
 	target=`echo $@ | sed s/-recursive//`; \
@@ -891,12 +877,6 @@
 stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
 	$(MAKE) run-cgen arch=ip2k prefix=ip2k options= extrafiles=
 
-$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
-	@true
-stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
-	$(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
-	$(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= extrafiles=
-
 $(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
 	@true
 stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
@@ -1134,23 +1114,6 @@
 ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
   ip2k-opc.h $(INCDIR)/libiberty.h
-iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(BFD_H) \
-  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h iq2000-desc.h \
-  $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
-iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(BFD_H) \
-  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h iq2000-desc.h \
-  $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
-iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
-  $(BFD_H) $(INCDIR)/ansidecl.h \
-  $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
-  iq2000-opc.h opintl.h
-iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
-  $(BFD_H) $(INCDIR)/ansidecl.h \
-  $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
-  iq2000-opc.h opintl.h
-iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(BFD_H) \
-  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h iq2000-desc.h \
-  $(INCDIR)/opcode/cgen.h iq2000-opc.h
 m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
   m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
diff --git a/opcodes/configure b/opcodes/configure
index 171fadd..6825a0b 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -2338,7 +2338,7 @@
   enableval="$enable_install_libbfd"
   install_libbfd_p=$enableval
 else
-  if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
+  if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then
         install_libbfd_p=yes
       else
         install_libbfd_p=no
@@ -4615,7 +4615,6 @@
 	bfd_i960_arch)		ta="$ta i960-dis.lo" ;;
 	bfd_ia64_arch)		ta="$ta ia64-dis.lo ia64-opc.lo" ;;
 	bfd_ip2k_arch)		ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
-        bfd_iq2000_arch)        ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
 	bfd_m32r_arch)		ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
 	bfd_m68hc11_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
 	bfd_m68hc12_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -4626,7 +4625,6 @@
 	bfd_mmix_arch)		ta="$ta mmix-dis.lo mmix-opc.lo" ;;
 	bfd_mn10200_arch)	ta="$ta m10200-dis.lo m10200-opc.lo" ;;
 	bfd_mn10300_arch)	ta="$ta m10300-dis.lo m10300-opc.lo" ;;
-	bfd_msp430_arch)	ta="$ta msp430-dis.lo" ;;
 	bfd_ns32k_arch)		ta="$ta ns32k-dis.lo" ;;
 	bfd_openrisc_arch)	ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
 	bfd_or32_arch)		ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 6e74b15..0e5eb6f 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -190,7 +190,6 @@
 	bfd_i960_arch)		ta="$ta i960-dis.lo" ;;
 	bfd_ia64_arch)		ta="$ta ia64-dis.lo ia64-opc.lo" ;;
 	bfd_ip2k_arch)		ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
-        bfd_iq2000_arch)        ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;;
 	bfd_m32r_arch)		ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
 	bfd_m68hc11_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
 	bfd_m68hc12_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -201,7 +200,6 @@
 	bfd_mmix_arch)		ta="$ta mmix-dis.lo mmix-opc.lo" ;;
 	bfd_mn10200_arch)	ta="$ta m10200-dis.lo m10200-opc.lo" ;;
 	bfd_mn10300_arch)	ta="$ta m10300-dis.lo m10300-opc.lo" ;;
-	bfd_msp430_arch)	ta="$ta msp430-dis.lo" ;;
 	bfd_ns32k_arch)		ta="$ta ns32k-dis.lo" ;;
 	bfd_openrisc_arch)	ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
 	bfd_or32_arch)		ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index 7e6ba0b..4bd0d89 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -49,7 +49,6 @@
 #define ARCH_mmix
 #define ARCH_mn10200
 #define ARCH_mn10300
-#define ARCH_msp430
 #define ARCH_ns32k
 #define ARCH_openrisc
 #define ARCH_or32
@@ -70,7 +69,6 @@
 #define ARCH_xstormy16
 #define ARCH_z8k
 #define ARCH_frv
-#define ARCH_iq2000
 #define INCLUDE_SHMEDIA
 #endif
 
@@ -216,11 +214,6 @@
       disassemble = print_insn_m88k;
       break;
 #endif
-#ifdef ARCH_msp430
-    case bfd_arch_msp430:
-      disassemble = print_insn_msp430;
-      break;
-#endif
 #ifdef ARCH_ns32k
     case bfd_arch_ns32k:
       disassemble = print_insn_ns32k;
@@ -361,11 +354,6 @@
       disassemble = print_insn_frv;
       break;
 #endif
-#ifdef ARCH_iq2000
-    case bfd_arch_iq2000:
-      disassemble = print_insn_iq2000;
-      break;
-#endif
     default:
       return 0;
     }
@@ -379,9 +367,6 @@
 #ifdef ARCH_arm
   print_arm_disassembler_options (stream);
 #endif
-#ifdef ARCH_mips
-  print_mips_disassembler_options (stream);
-#endif
 #ifdef ARCH_powerpc
   print_ppc_disassembler_options (stream);
 #endif
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
deleted file mode 100644
index 17b93eb..0000000
--- a/opcodes/iq2000-asm.c
+++ /dev/null
@@ -1,891 +0,0 @@
-/* Assembler interface for targets using CGEN. -*- C -*-
-   CGEN: Cpu tools GENerator
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-- the resultant file is machine generated, cgen-asm.in isn't
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* ??? Eventually more and more of this stuff can go to cpu-independent files.
-   Keep that in mind.  */
-
-#include "sysdep.h"
-#include <stdio.h>
-#include "ansidecl.h"
-#include "bfd.h"
-#include "symcat.h"
-#include "iq2000-desc.h"
-#include "iq2000-opc.h"
-#include "opintl.h"
-#include "xregex.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-
-#undef  min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef  max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-
-static const char * parse_insn_normal
-     PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-
-/* -- assembler routines inserted here.  */
-
-/* -- asm.c */
-static const char * parse_mimm PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
-static const char * parse_imm  PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
-static const char * parse_hi16 PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
-static const char * parse_lo16 PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
-
-/* Special check to ensure that instruction exists for given machine */
-int
-iq2000_cgen_insn_supported (cd, insn)
-     CGEN_CPU_DESC cd;
-     CGEN_INSN *insn;
-{
-  int machs = cd->machs;
-
-  return ((CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_MACH) & machs) != 0);
-}
-
-static int iq2000_cgen_isa_register (strp)
-     const char **strp;
-{
-  int len;
-  int ch1, ch2;
-  if (**strp == 'r' || **strp == 'R') 
-    {
-      len = strlen (*strp);
-      if (len == 2) 
-        {
-          ch1 = (*strp)[1];
-          if ('0' <= ch1 && ch1 <= '9')
-            return 1;
-        } 
-      else if (len == 3) 
-        {
-	  ch1 = (*strp)[1];
-          ch2 = (*strp)[2];
-          if (('1' <= ch1 && ch1 <= '2') && ('0' <= ch2 && ch2 <= '9'))
-            return 1;
-          if ('3' == ch1 && (ch2 == '0' || ch2 == '1'))
-            return 1;
-        }
-    }
-  if (**strp == '%' && tolower((*strp)[1]) != 'l' && tolower((*strp)[1]) != 'h')
-    return 1;
-  return 0;
-}
-
-/* Handle negated literal.  */
-
-static const char *
-parse_mimm (cd, strp, opindex, valuep)
-     CGEN_CPU_DESC cd;
-     const char **strp;
-     int opindex;
-     long *valuep;
-{
-  const char *errmsg;
-  long value;
-
-  /* Verify this isn't a register */
-  if (iq2000_cgen_isa_register (strp))
-    errmsg = _("immediate value cannot be register");
-  else
-    {
-      long value;
-      
-      errmsg = cgen_parse_signed_integer (cd, strp, opindex, & value);
-      if (errmsg == NULL)
-	{
-	  long x = (-value) & 0xFFFF0000;
-	  if (x != 0 && x != 0xFFFF0000)
-	    errmsg = _("immediate value out of range");
-	  else
-	    *valuep = (-value & 0xFFFF);
-	}
-    }
-  return errmsg;
-}
-
-/* Handle signed/unsigned literal.  */
-
-static const char *
-parse_imm (cd, strp, opindex, valuep)
-     CGEN_CPU_DESC cd;
-     const char **strp;
-     int opindex;
-     unsigned long *valuep;
-{
-  const char *errmsg;
-  long value;
-
-  if (iq2000_cgen_isa_register (strp))
-    errmsg = _("immediate value cannot be register");
-  else
-    {
-      long value;
-
-      errmsg = cgen_parse_signed_integer (cd, strp, opindex, & value);
-      if (errmsg == NULL)
-	{
-	  long x = value & 0xFFFF0000;
-	  if (x != 0 && x != 0xFFFF0000)
-	    errmsg = _("immediate value out of range");
-	  else
-	    *valuep = (value & 0xFFFF);
-	}
-    }
-  return errmsg;
-}
-
-/* Handle iq10 21-bit jmp offset.  */
-
-static const char *
-parse_jtargq10 (cd, strp, opindex, reloc, type_addr, valuep)
-     CGEN_CPU_DESC cd;
-     const char **strp;
-     int opindex;
-     int reloc;
-     enum cgen_parse_operand_result *type_addr;
-     unsigned long *valuep;
-{
-  const char *errmsg;
-  bfd_vma value;
-  enum cgen_parse_operand_result result_type = CGEN_PARSE_OPERAND_RESULT_NUMBER;
-
-  errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IQ2000_OFFSET_21,
-			       &result_type, &value);
-  if (errmsg == NULL && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-    {
-      /* check value is within 23-bits (remembering that 2-bit shift right will occur) */
-      if (value > 0x7fffff)
-        return _("21-bit offset out of range");
-    }
-  *valuep = (value & 0x7FFFFF);
-  return errmsg;
-}
-
-/* Handle high().  */
-
-static const char *
-parse_hi16 (cd, strp, opindex, valuep)
-     CGEN_CPU_DESC cd;
-     const char **strp;
-     int opindex;
-     unsigned long *valuep;
-{
-  if (strncasecmp (*strp, "%hi(", 4) == 0)
-    {
-      enum cgen_parse_operand_result result_type;
-      bfd_vma value;
-      const char *errmsg;
-
-      *strp += 4;
-      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16,
-				   &result_type, &value);
-      if (**strp != ')')
-	return _("missing `)'");
-
-      ++*strp;
-      if (errmsg == NULL
-  	  && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-	{
-	  /* if value has top-bit of %lo on, then it will
-	     sign-propagate and so we compensate by adding
-	     1 to the resultant %hi value */
-	  if (value & 0x8000)
-	    value += 0x10000;
-	  value >>= 16;
-	}
-      *valuep = value;
-
-      return errmsg;
-    }
-
-  /* we add %uhi in case a user just wants the high 16-bits or is using
-     an insn like ori for %lo which does not sign-propagate */
-  if (strncasecmp (*strp, "%uhi(", 5) == 0)
-    {
-      enum cgen_parse_operand_result result_type;
-      bfd_vma value;
-      const char *errmsg;
-
-      *strp += 5;
-      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IQ2000_UHI16,
-				   &result_type, &value);
-      if (**strp != ')')
-	return _("missing `)'");
-
-      ++*strp;
-      if (errmsg == NULL
-  	  && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-	{
-	  value >>= 16;
-	}
-      *valuep = value;
-
-      return errmsg;
-    }
-
-  return parse_imm (cd, strp, opindex, valuep);
-}
-
-/* Handle %lo in a signed context.
-   The signedness of the value doesn't matter to %lo(), but this also
-   handles the case where %lo() isn't present.  */
-
-static const char *
-parse_lo16 (cd, strp, opindex, valuep)
-     CGEN_CPU_DESC cd;
-     const char **strp;
-     int opindex;
-     long *valuep;
-{
-  if (strncasecmp (*strp, "%lo(", 4) == 0)
-    {
-      const char *errmsg;
-      enum cgen_parse_operand_result result_type;
-      bfd_vma value;
-
-      *strp += 4;
-      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16,
-				   &result_type, &value);
-      if (**strp != ')')
-	return _("missing `)'");
-      ++*strp;
-      if (errmsg == NULL
-	  && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-	value &= 0xffff;
-      *valuep = value;
-      return errmsg;
-    }
-
-  return parse_imm (cd, strp, opindex, valuep);
-}
-
-/* Handle %lo in a negated signed context.
-   The signedness of the value doesn't matter to %lo(), but this also
-   handles the case where %lo() isn't present.  */
-
-static const char *
-parse_mlo16 (cd, strp, opindex, valuep)
-     CGEN_CPU_DESC cd;
-     const char **strp;
-     int opindex;
-     long *valuep;
-{
-  if (strncasecmp (*strp, "%lo(", 4) == 0)
-    {
-      const char *errmsg;
-      enum cgen_parse_operand_result result_type;
-      bfd_vma value;
-
-      *strp += 4;
-      errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16,
-				   &result_type, &value);
-      if (**strp != ')')
-	return _("missing `)'");
-      ++*strp;
-      if (errmsg == NULL
-	  && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-	value = (-value) & 0xffff;
-      *valuep = value;
-      return errmsg;
-    }
-
-  return parse_mimm (cd, strp, opindex, valuep);
-}
-
-/* -- */
-
-const char * iq2000_cgen_parse_operand
-  PARAMS ((CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *));
-
-/* Main entry point for operand parsing.
-
-   This function is basically just a big switch statement.  Earlier versions
-   used tables to look up the function to use, but
-   - if the table contains both assembler and disassembler functions then
-     the disassembler contains much of the assembler and vice-versa,
-   - there's a lot of inlining possibilities as things grow,
-   - using a switch statement avoids the function call overhead.
-
-   This function could be moved into `parse_insn_normal', but keeping it
-   separate makes clear the interface between `parse_insn_normal' and each of
-   the handlers.  */
-
-const char *
-iq2000_cgen_parse_operand (cd, opindex, strp, fields)
-     CGEN_CPU_DESC cd;
-     int opindex;
-     const char ** strp;
-     CGEN_FIELDS * fields;
-{
-  const char * errmsg = NULL;
-  /* Used by scalar operands that still need to be parsed.  */
-  long junk ATTRIBUTE_UNUSED;
-
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rs);
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      {
-        bfd_vma value;
-        errmsg = cgen_parse_address (cd, strp, IQ2000_OPERAND_BASEOFF, 0, NULL,  & value);
-        fields->f_imm = value;
-      }
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_BITNUM, &fields->f_rt);
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_BYTECOUNT, &fields->f_bytecount);
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CAM_Y, &fields->f_cam_y);
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CAM_Z, &fields->f_cam_z);
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_3FUNC, &fields->f_cm_3func);
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_3Z, &fields->f_cm_3z);
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_4FUNC, &fields->f_cm_4func);
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_CM_4Z, &fields->f_cm_4z);
-      break;
-    case IQ2000_OPERAND_COUNT :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_COUNT, &fields->f_count);
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_EXECODE, &fields->f_excode);
-      break;
-    case IQ2000_OPERAND_HI16 :
-      errmsg = parse_hi16 (cd, strp, IQ2000_OPERAND_HI16, &fields->f_imm);
-      break;
-    case IQ2000_OPERAND_IMM :
-      errmsg = parse_imm (cd, strp, IQ2000_OPERAND_IMM, &fields->f_imm);
-      break;
-    case IQ2000_OPERAND_INDEX :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_INDEX, &fields->f_index);
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      {
-        bfd_vma value;
-        errmsg = cgen_parse_address (cd, strp, IQ2000_OPERAND_JMPTARG, 0, NULL,  & value);
-        fields->f_jtarg = value;
-      }
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      {
-        bfd_vma value;
-        errmsg = parse_jtargq10 (cd, strp, IQ2000_OPERAND_JMPTARGQ10, 0, NULL,  & value);
-        fields->f_jtargq10 = value;
-      }
-      break;
-    case IQ2000_OPERAND_LO16 :
-      errmsg = parse_lo16 (cd, strp, IQ2000_OPERAND_LO16, &fields->f_imm);
-      break;
-    case IQ2000_OPERAND_MASK :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASK, &fields->f_mask);
-      break;
-    case IQ2000_OPERAND_MASKL :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASKL, &fields->f_maskl);
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASKQ10, &fields->f_maskq10);
-      break;
-    case IQ2000_OPERAND_MASKR :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_MASKR, &fields->f_rs);
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      errmsg = parse_mlo16 (cd, strp, IQ2000_OPERAND_MLO16, &fields->f_imm);
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      {
-        bfd_vma value;
-        errmsg = cgen_parse_address (cd, strp, IQ2000_OPERAND_OFFSET, 0, NULL,  & value);
-        fields->f_offset = value;
-      }
-      break;
-    case IQ2000_OPERAND_RD :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rd);
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rd_rs);
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rd_rt);
-      break;
-    case IQ2000_OPERAND_RS :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rs);
-      break;
-    case IQ2000_OPERAND_RT :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rt);
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rt_rs);
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_SHAMT, &fields->f_shamt);
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex);
-      abort ();
-  }
-
-  return errmsg;
-}
-
-cgen_parse_fn * const iq2000_cgen_parse_handlers[] = 
-{
-  parse_insn_normal,
-};
-
-void
-iq2000_cgen_init_asm (cd)
-     CGEN_CPU_DESC cd;
-{
-  iq2000_cgen_init_opcode_table (cd);
-  iq2000_cgen_init_ibld_table (cd);
-  cd->parse_handlers = & iq2000_cgen_parse_handlers[0];
-  cd->parse_operand = iq2000_cgen_parse_operand;
-#ifdef CGEN_ASM_INIT_HOOK
-CGEN_ASM_INIT_HOOK
-#endif
-}
-
-
-
-/* Regex construction routine.
-
-   This translates an opcode syntax string into a regex string,
-   by replacing any non-character syntax element (such as an
-   opcode) with the pattern '.*'
-
-   It then compiles the regex and stores it in the opcode, for
-   later use by iq2000_cgen_assemble_insn
-
-   Returns NULL for success, an error message for failure.  */
-
-char * 
-iq2000_cgen_build_insn_regex (insn)
-     CGEN_INSN *insn;
-{  
-  CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
-  const char *mnem = CGEN_INSN_MNEMONIC (insn);
-  char rxbuf[CGEN_MAX_RX_ELEMENTS];
-  char *rx = rxbuf;
-  const CGEN_SYNTAX_CHAR_TYPE *syn;
-  int reg_err;
-
-  syn = CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc));
-
-  /* Mnemonics come first in the syntax string.  */
-  if (! CGEN_SYNTAX_MNEMONIC_P (* syn))
-    return _("missing mnemonic in syntax string");
-  ++syn;
-
-  /* Generate a case sensitive regular expression that emulates case
-     insensitive matching in the "C" locale.  We cannot generate a case
-     insensitive regular expression because in Turkish locales, 'i' and 'I'
-     are not equal modulo case conversion.  */
-
-  /* Copy the literal mnemonic out of the insn.  */
-  for (; *mnem; mnem++)
-    {
-      char c = *mnem;
-
-      if (ISALPHA (c))
-	{
-	  *rx++ = '[';
-	  *rx++ = TOLOWER (c);
-	  *rx++ = TOUPPER (c);
-	  *rx++ = ']';
-	}
-      else
-	*rx++ = c;
-    }
-
-  /* Copy any remaining literals from the syntax string into the rx.  */
-  for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn)
-    {
-      if (CGEN_SYNTAX_CHAR_P (* syn)) 
-	{
-	  char c = CGEN_SYNTAX_CHAR (* syn);
-
-	  switch (c) 
-	    {
-	      /* Escape any regex metacharacters in the syntax.  */
-	    case '.': case '[': case '\\': 
-	    case '*': case '^': case '$': 
-
-#ifdef CGEN_ESCAPE_EXTENDED_REGEX
-	    case '?': case '{': case '}': 
-	    case '(': case ')': case '*':
-	    case '|': case '+': case ']':
-#endif
-	      *rx++ = '\\';
-	      *rx++ = c;
-	      break;
-
-	    default:
-	      if (ISALPHA (c))
-		{
-		  *rx++ = '[';
-		  *rx++ = TOLOWER (c);
-		  *rx++ = TOUPPER (c);
-		  *rx++ = ']';
-		}
-	      else
-		*rx++ = c;
-	      break;
-	    }
-	}
-      else
-	{
-	  /* Replace non-syntax fields with globs.  */
-	  *rx++ = '.';
-	  *rx++ = '*';
-	}
-    }
-
-  /* Trailing whitespace ok.  */
-  * rx++ = '['; 
-  * rx++ = ' '; 
-  * rx++ = '\t'; 
-  * rx++ = ']'; 
-  * rx++ = '*'; 
-
-  /* But anchor it after that.  */
-  * rx++ = '$'; 
-  * rx = '\0';
-
-  CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t));
-  reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB);
-
-  if (reg_err == 0) 
-    return NULL;
-  else
-    {
-      static char msg[80];
-
-      regerror (reg_err, (regex_t *) CGEN_INSN_RX (insn), msg, 80);
-      regfree ((regex_t *) CGEN_INSN_RX (insn));
-      free (CGEN_INSN_RX (insn));
-      (CGEN_INSN_RX (insn)) = NULL;
-      return msg;
-    }
-}
-
-
-/* Default insn parser.
-
-   The syntax string is scanned and operands are parsed and stored in FIELDS.
-   Relocs are queued as we go via other callbacks.
-
-   ??? Note that this is currently an all-or-nothing parser.  If we fail to
-   parse the instruction, we return 0 and the caller will start over from
-   the beginning.  Backtracking will be necessary in parsing subexpressions,
-   but that can be handled there.  Not handling backtracking here may get
-   expensive in the case of the m68k.  Deal with later.
-
-   Returns NULL for success, an error message for failure.  */
-
-static const char *
-parse_insn_normal (cd, insn, strp, fields)
-     CGEN_CPU_DESC cd;
-     const CGEN_INSN *insn;
-     const char **strp;
-     CGEN_FIELDS *fields;
-{
-  /* ??? Runtime added insns not handled yet.  */
-  const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
-  const char *str = *strp;
-  const char *errmsg;
-  const char *p;
-  const CGEN_SYNTAX_CHAR_TYPE * syn;
-#ifdef CGEN_MNEMONIC_OPERANDS
-  /* FIXME: wip */
-  int past_opcode_p;
-#endif
-
-  /* For now we assume the mnemonic is first (there are no leading operands).
-     We can parse it without needing to set up operand parsing.
-     GAS's input scrubber will ensure mnemonics are lowercase, but we may
-     not be called from GAS.  */
-  p = CGEN_INSN_MNEMONIC (insn);
-  while (*p && TOLOWER (*p) == TOLOWER (*str))
-    ++p, ++str;
-
-  if (* p)
-    return _("unrecognized instruction");
-
-#ifndef CGEN_MNEMONIC_OPERANDS
-  if (* str && ! ISSPACE (* str))
-    return _("unrecognized instruction");
-#endif
-
-  CGEN_INIT_PARSE (cd);
-  cgen_init_parse_operand (cd);
-#ifdef CGEN_MNEMONIC_OPERANDS
-  past_opcode_p = 0;
-#endif
-
-  /* We don't check for (*str != '\0') here because we want to parse
-     any trailing fake arguments in the syntax string.  */
-  syn = CGEN_SYNTAX_STRING (syntax);
-
-  /* Mnemonics come first for now, ensure valid string.  */
-  if (! CGEN_SYNTAX_MNEMONIC_P (* syn))
-    abort ();
-
-  ++syn;
-
-  while (* syn != 0)
-    {
-      /* Non operand chars must match exactly.  */
-      if (CGEN_SYNTAX_CHAR_P (* syn))
-	{
-	  /* FIXME: While we allow for non-GAS callers above, we assume the
-	     first char after the mnemonic part is a space.  */
-	  /* FIXME: We also take inappropriate advantage of the fact that
-	     GAS's input scrubber will remove extraneous blanks.  */
-	  if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
-	    {
-#ifdef CGEN_MNEMONIC_OPERANDS
-	      if (CGEN_SYNTAX_CHAR(* syn) == ' ')
-		past_opcode_p = 1;
-#endif
-	      ++ syn;
-	      ++ str;
-	    }
-	  else if (*str)
-	    {
-	      /* Syntax char didn't match.  Can't be this insn.  */
-	      static char msg [80];
-
-	      /* xgettext:c-format */
-	      sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
-		       CGEN_SYNTAX_CHAR(*syn), *str);
-	      return msg;
-	    }
-	  else
-	    {
-	      /* Ran out of input.  */
-	      static char msg [80];
-
-	      /* xgettext:c-format */
-	      sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
-		       CGEN_SYNTAX_CHAR(*syn));
-	      return msg;
-	    }
-	  continue;
-	}
-
-      /* We have an operand of some sort.  */
-      errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
-					  &str, fields);
-      if (errmsg)
-	return errmsg;
-
-      /* Done with this operand, continue with next one.  */
-      ++ syn;
-    }
-
-  /* If we're at the end of the syntax string, we're done.  */
-  if (* syn == 0)
-    {
-      /* FIXME: For the moment we assume a valid `str' can only contain
-	 blanks now.  IE: We needn't try again with a longer version of
-	 the insn and it is assumed that longer versions of insns appear
-	 before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3).  */
-      while (ISSPACE (* str))
-	++ str;
-
-      if (* str != '\0')
-	return _("junk at end of line"); /* FIXME: would like to include `str' */
-
-      return NULL;
-    }
-
-  /* We couldn't parse it.  */
-  return _("unrecognized instruction");
-}
-
-/* Main entry point.
-   This routine is called for each instruction to be assembled.
-   STR points to the insn to be assembled.
-   We assume all necessary tables have been initialized.
-   The assembled instruction, less any fixups, is stored in BUF.
-   Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value
-   still needs to be converted to target byte order, otherwise BUF is an array
-   of bytes in target byte order.
-   The result is a pointer to the insn's entry in the opcode table,
-   or NULL if an error occured (an error message will have already been
-   printed).
-
-   Note that when processing (non-alias) macro-insns,
-   this function recurses.
-
-   ??? It's possible to make this cpu-independent.
-   One would have to deal with a few minor things.
-   At this point in time doing so would be more of a curiosity than useful
-   [for example this file isn't _that_ big], but keeping the possibility in
-   mind helps keep the design clean.  */
-
-const CGEN_INSN *
-iq2000_cgen_assemble_insn (cd, str, fields, buf, errmsg)
-     CGEN_CPU_DESC cd;
-     const char *str;
-     CGEN_FIELDS *fields;
-     CGEN_INSN_BYTES_PTR buf;
-     char **errmsg;
-{
-  const char *start;
-  CGEN_INSN_LIST *ilist;
-  const char *parse_errmsg = NULL;
-  const char *insert_errmsg = NULL;
-  int recognized_mnemonic = 0;
-
-  /* Skip leading white space.  */
-  while (ISSPACE (* str))
-    ++ str;
-
-  /* The instructions are stored in hashed lists.
-     Get the first in the list.  */
-  ilist = CGEN_ASM_LOOKUP_INSN (cd, str);
-
-  /* Keep looking until we find a match.  */
-  start = str;
-  for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist))
-    {
-      const CGEN_INSN *insn = ilist->insn;
-      recognized_mnemonic = 1;
-
-#ifdef CGEN_VALIDATE_INSN_SUPPORTED 
-      /* Not usually needed as unsupported opcodes
-	 shouldn't be in the hash lists.  */
-      /* Is this insn supported by the selected cpu?  */
-      if (! iq2000_cgen_insn_supported (cd, insn))
-	continue;
-#endif
-      /* If the RELAX attribute is set, this is an insn that shouldn't be
-	 chosen immediately.  Instead, it is used during assembler/linker
-	 relaxation if possible.  */
-      if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
-	continue;
-
-      str = start;
-
-      /* Skip this insn if str doesn't look right lexically.  */
-      if (CGEN_INSN_RX (insn) != NULL &&
-	  regexec ((regex_t *) CGEN_INSN_RX (insn), str, 0, NULL, 0) == REG_NOMATCH)
-	continue;
-
-      /* Allow parse/insert handlers to obtain length of insn.  */
-      CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
-
-      parse_errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields);
-      if (parse_errmsg != NULL)
-	continue;
-
-      /* ??? 0 is passed for `pc'.  */
-      insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf,
-						 (bfd_vma) 0);
-      if (insert_errmsg != NULL)
-        continue;
-
-      /* It is up to the caller to actually output the insn and any
-         queued relocs.  */
-      return insn;
-    }
-
-  {
-    static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
-    const char *tmp_errmsg;
-
-    /* If requesting verbose error messages, use insert_errmsg.
-       Failing that, use parse_errmsg.  */
-    tmp_errmsg = (insert_errmsg ? insert_errmsg :
-		  parse_errmsg ? parse_errmsg :
-		  recognized_mnemonic ?
-		  _("unrecognized form of instruction") :
-		  _("unrecognized instruction"));
-
-    if (strlen (start) > 50)
-      /* xgettext:c-format */
-      sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
-    else 
-      /* xgettext:c-format */
-      sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
-#else
-    if (strlen (start) > 50)
-      /* xgettext:c-format */
-      sprintf (errbuf, _("bad instruction `%.50s...'"), start);
-    else 
-      /* xgettext:c-format */
-      sprintf (errbuf, _("bad instruction `%.50s'"), start);
-#endif
-      
-    *errmsg = errbuf;
-    return NULL;
-  }
-}
-
-#if 0 /* This calls back to GAS which we can't do without care.  */
-
-/* Record each member of OPVALS in the assembler's symbol table.
-   This lets GAS parse registers for us.
-   ??? Interesting idea but not currently used.  */
-
-/* Record each member of OPVALS in the assembler's symbol table.
-   FIXME: Not currently used.  */
-
-void
-iq2000_cgen_asm_hash_keywords (cd, opvals)
-     CGEN_CPU_DESC cd;
-     CGEN_KEYWORD *opvals;
-{
-  CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
-  const CGEN_KEYWORD_ENTRY * ke;
-
-  while ((ke = cgen_keyword_search_next (& search)) != NULL)
-    {
-#if 0 /* Unnecessary, should be done in the search routine.  */
-      if (! iq2000_cgen_opval_supported (ke))
-	continue;
-#endif
-      cgen_asm_record_register (cd, ke->name, ke->value);
-    }
-}
-
-#endif /* 0 */
diff --git a/opcodes/iq2000-desc.c b/opcodes/iq2000-desc.c
deleted file mode 100644
index a30bf56..0000000
--- a/opcodes/iq2000-desc.c
+++ /dev/null
@@ -1,2222 +0,0 @@
-/* CPU data for iq2000.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "sysdep.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include "ansidecl.h"
-#include "bfd.h"
-#include "symcat.h"
-#include "iq2000-desc.h"
-#include "iq2000-opc.h"
-#include "opintl.h"
-#include "libiberty.h"
-
-/* Attributes.  */
-
-static const CGEN_ATTR_ENTRY bool_attr[] =
-{
-  { "#f", 0 },
-  { "#t", 1 },
-  { 0, 0 }
-};
-
-static const CGEN_ATTR_ENTRY MACH_attr[] =
-{
-  { "base", MACH_BASE },
-  { "iq2000", MACH_IQ2000 },
-  { "iq10", MACH_IQ10 },
-  { "max", MACH_MAX },
-  { 0, 0 }
-};
-
-static const CGEN_ATTR_ENTRY ISA_attr[] =
-{
-  { "iq2000", ISA_IQ2000 },
-  { "max", ISA_MAX },
-  { 0, 0 }
-};
-
-const CGEN_ATTR_TABLE iq2000_cgen_ifield_attr_table[] =
-{
-  { "MACH", & MACH_attr[0], & MACH_attr[0] },
-  { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
-  { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
-  { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
-  { "RESERVED", &bool_attr[0], &bool_attr[0] },
-  { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
-  { "SIGNED", &bool_attr[0], &bool_attr[0] },
-  { 0, 0, 0 }
-};
-
-const CGEN_ATTR_TABLE iq2000_cgen_hardware_attr_table[] =
-{
-  { "MACH", & MACH_attr[0], & MACH_attr[0] },
-  { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
-  { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] },
-  { "PC", &bool_attr[0], &bool_attr[0] },
-  { "PROFILE", &bool_attr[0], &bool_attr[0] },
-  { 0, 0, 0 }
-};
-
-const CGEN_ATTR_TABLE iq2000_cgen_operand_attr_table[] =
-{
-  { "MACH", & MACH_attr[0], & MACH_attr[0] },
-  { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
-  { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
-  { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
-  { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
-  { "SIGNED", &bool_attr[0], &bool_attr[0] },
-  { "NEGATIVE", &bool_attr[0], &bool_attr[0] },
-  { "RELAX", &bool_attr[0], &bool_attr[0] },
-  { "SEM-ONLY", &bool_attr[0], &bool_attr[0] },
-  { 0, 0, 0 }
-};
-
-const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] =
-{
-  { "MACH", & MACH_attr[0], & MACH_attr[0] },
-  { "ALIAS", &bool_attr[0], &bool_attr[0] },
-  { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
-  { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] },
-  { "COND-CTI", &bool_attr[0], &bool_attr[0] },
-  { "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
-  { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
-  { "RELAXABLE", &bool_attr[0], &bool_attr[0] },
-  { "RELAX", &bool_attr[0], &bool_attr[0] },
-  { "NO-DIS", &bool_attr[0], &bool_attr[0] },
-  { "PBB", &bool_attr[0], &bool_attr[0] },
-  { "YIELD-INSN", &bool_attr[0], &bool_attr[0] },
-  { "LOAD-DELAY", &bool_attr[0], &bool_attr[0] },
-  { "EVEN-REG-NUM", &bool_attr[0], &bool_attr[0] },
-  { "UNSUPPORTED", &bool_attr[0], &bool_attr[0] },
-  { "USES-RD", &bool_attr[0], &bool_attr[0] },
-  { "USES-RS", &bool_attr[0], &bool_attr[0] },
-  { "USES-RT", &bool_attr[0], &bool_attr[0] },
-  { "USES-R31", &bool_attr[0], &bool_attr[0] },
-  { 0, 0, 0 }
-};
-
-/* Instruction set variants.  */
-
-static const CGEN_ISA iq2000_cgen_isa_table[] = {
-  { "iq2000", 32, 32, 32, 32 },
-  { 0, 0, 0, 0, 0 }
-};
-
-/* Machine variants.  */
-
-static const CGEN_MACH iq2000_cgen_mach_table[] = {
-  { "iq2000", "iq2000", MACH_IQ2000, 0 },
-  { "iq10", "iq10", MACH_IQ10, 0 },
-  { 0, 0, 0, 0 }
-};
-
-static CGEN_KEYWORD_ENTRY iq2000_cgen_opval_gr_names_entries[] =
-{
-  { "r0", 0, {0, {0}}, 0, 0 },
-  { "%0", 0, {0, {0}}, 0, 0 },
-  { "r1", 1, {0, {0}}, 0, 0 },
-  { "%1", 1, {0, {0}}, 0, 0 },
-  { "r2", 2, {0, {0}}, 0, 0 },
-  { "%2", 2, {0, {0}}, 0, 0 },
-  { "r3", 3, {0, {0}}, 0, 0 },
-  { "%3", 3, {0, {0}}, 0, 0 },
-  { "r4", 4, {0, {0}}, 0, 0 },
-  { "%4", 4, {0, {0}}, 0, 0 },
-  { "r5", 5, {0, {0}}, 0, 0 },
-  { "%5", 5, {0, {0}}, 0, 0 },
-  { "r6", 6, {0, {0}}, 0, 0 },
-  { "%6", 6, {0, {0}}, 0, 0 },
-  { "r7", 7, {0, {0}}, 0, 0 },
-  { "%7", 7, {0, {0}}, 0, 0 },
-  { "r8", 8, {0, {0}}, 0, 0 },
-  { "%8", 8, {0, {0}}, 0, 0 },
-  { "r9", 9, {0, {0}}, 0, 0 },
-  { "%9", 9, {0, {0}}, 0, 0 },
-  { "r10", 10, {0, {0}}, 0, 0 },
-  { "%10", 10, {0, {0}}, 0, 0 },
-  { "r11", 11, {0, {0}}, 0, 0 },
-  { "%11", 11, {0, {0}}, 0, 0 },
-  { "r12", 12, {0, {0}}, 0, 0 },
-  { "%12", 12, {0, {0}}, 0, 0 },
-  { "r13", 13, {0, {0}}, 0, 0 },
-  { "%13", 13, {0, {0}}, 0, 0 },
-  { "r14", 14, {0, {0}}, 0, 0 },
-  { "%14", 14, {0, {0}}, 0, 0 },
-  { "r15", 15, {0, {0}}, 0, 0 },
-  { "%15", 15, {0, {0}}, 0, 0 },
-  { "r16", 16, {0, {0}}, 0, 0 },
-  { "%16", 16, {0, {0}}, 0, 0 },
-  { "r17", 17, {0, {0}}, 0, 0 },
-  { "%17", 17, {0, {0}}, 0, 0 },
-  { "r18", 18, {0, {0}}, 0, 0 },
-  { "%18", 18, {0, {0}}, 0, 0 },
-  { "r19", 19, {0, {0}}, 0, 0 },
-  { "%19", 19, {0, {0}}, 0, 0 },
-  { "r20", 20, {0, {0}}, 0, 0 },
-  { "%20", 20, {0, {0}}, 0, 0 },
-  { "r21", 21, {0, {0}}, 0, 0 },
-  { "%21", 21, {0, {0}}, 0, 0 },
-  { "r22", 22, {0, {0}}, 0, 0 },
-  { "%22", 22, {0, {0}}, 0, 0 },
-  { "r23", 23, {0, {0}}, 0, 0 },
-  { "%23", 23, {0, {0}}, 0, 0 },
-  { "r24", 24, {0, {0}}, 0, 0 },
-  { "%24", 24, {0, {0}}, 0, 0 },
-  { "r25", 25, {0, {0}}, 0, 0 },
-  { "%25", 25, {0, {0}}, 0, 0 },
-  { "r26", 26, {0, {0}}, 0, 0 },
-  { "%26", 26, {0, {0}}, 0, 0 },
-  { "r27", 27, {0, {0}}, 0, 0 },
-  { "%27", 27, {0, {0}}, 0, 0 },
-  { "r28", 28, {0, {0}}, 0, 0 },
-  { "%28", 28, {0, {0}}, 0, 0 },
-  { "r29", 29, {0, {0}}, 0, 0 },
-  { "%29", 29, {0, {0}}, 0, 0 },
-  { "r30", 30, {0, {0}}, 0, 0 },
-  { "%30", 30, {0, {0}}, 0, 0 },
-  { "r31", 31, {0, {0}}, 0, 0 },
-  { "%31", 31, {0, {0}}, 0, 0 }
-};
-
-CGEN_KEYWORD iq2000_cgen_opval_gr_names =
-{
-  & iq2000_cgen_opval_gr_names_entries[0],
-  64,
-  0, 0, 0, 0, ""
-};
-
-
-/* The hardware table.  */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_HW_##a)
-#else
-#define A(a) (1 << CGEN_HW_/**/a)
-#endif
-
-const CGEN_HW_ENTRY iq2000_cgen_hw_table[] =
-{
-  { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
-  { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
-  { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
-  { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
-  { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
-  { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PROFILE)|A(PC), { (1<<MACH_BASE) } } },
-  { "h-gr", HW_H_GR, CGEN_ASM_KEYWORD, (PTR) & iq2000_cgen_opval_gr_names, { 0, { (1<<MACH_BASE) } } },
-  { 0, 0, CGEN_ASM_NONE, 0, {0, {0}} }
-};
-
-#undef A
-
-
-/* The instruction field table.  */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_IFLD_##a)
-#else
-#define A(a) (1 << CGEN_IFLD_/**/a)
-#endif
-
-const CGEN_IFLD iq2000_cgen_ifld_table[] =
-{
-  { IQ2000_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_OPCODE, "f-opcode", 0, 32, 31, 6, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_RS, "f-rs", 0, 32, 25, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_RT, "f-rt", 0, 32, 20, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_RD, "f-rd", 0, 32, 15, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_SHAMT, "f-shamt", 0, 32, 10, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CP_OP, "f-cp-op", 0, 32, 10, 3, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CP_OP_10, "f-cp-op-10", 0, 32, 10, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CP_GRP, "f-cp-grp", 0, 32, 7, 2, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_FUNC, "f-func", 0, 32, 5, 6, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_IMM, "f-imm", 0, 32, 15, 16, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_JTARG, "f-jtarg", 0, 32, 15, 16, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
-  { IQ2000_F_JTARGQ10, "f-jtargq10", 0, 32, 20, 21, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
-  { IQ2000_F_OFFSET, "f-offset", 0, 32, 15, 16, { 0|A(PCREL_ADDR), { (1<<MACH_BASE) } }  },
-  { IQ2000_F_COUNT, "f-count", 0, 32, 15, 7, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_BYTECOUNT, "f-bytecount", 0, 32, 7, 8, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_INDEX, "f-index", 0, 32, 8, 9, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_MASK, "f-mask", 0, 32, 9, 4, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_MASKQ10, "f-maskq10", 0, 32, 10, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_MASKL, "f-maskl", 0, 32, 4, 5, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_EXCODE, "f-excode", 0, 32, 25, 20, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_RSRVD, "f-rsrvd", 0, 32, 25, 10, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_10_11, "f-10-11", 0, 32, 10, 11, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_24_19, "f-24-19", 0, 32, 24, 19, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_5, "f-5", 0, 32, 5, 1, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_10, "f-10", 0, 32, 10, 1, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_25, "f-25", 0, 32, 25, 1, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CAM_Z, "f-cam-z", 0, 32, 5, 3, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CAM_Y, "f-cam-y", 0, 32, 2, 3, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CM_3FUNC, "f-cm-3func", 0, 32, 5, 3, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CM_4FUNC, "f-cm-4func", 0, 32, 5, 4, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CM_3Z, "f-cm-3z", 0, 32, 1, 2, { 0, { (1<<MACH_BASE) } }  },
-  { IQ2000_F_CM_4Z, "f-cm-4z", 0, 32, 2, 3, { 0, { (1<<MACH_BASE) } }  },
-  { 0, 0, 0, 0, 0, 0, {0, {0}} }
-};
-
-#undef A
-
-
-
-/* multi ifield declarations */
-
-const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [];
-const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [];
-const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [];
-
-
-/* multi ifield definitions */
-
-const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [] =
-{
-    { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
-    { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
-    {0,{0}}
-};
-const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [] =
-{
-    { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
-    { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
-    {0,{0}}
-};
-const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [] =
-{
-    { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
-    { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
-    {0,{0}}
-};
-
-/* The operand table.  */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_OPERAND_##a)
-#else
-#define A(a) (1 << CGEN_OPERAND_/**/a)
-#endif
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define OPERAND(op) IQ2000_OPERAND_##op
-#else
-#define OPERAND(op) IQ2000_OPERAND_/**/op
-#endif
-
-const CGEN_OPERAND iq2000_cgen_operand_table[] =
-{
-/* pc: program counter */
-  { "pc", IQ2000_OPERAND_PC, HW_H_PC, 0, 0,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[0])} }, 
-    { 0|A(SEM_ONLY), { (1<<MACH_BASE) } }  },
-/* rs: register Rs */
-  { "rs", IQ2000_OPERAND_RS, HW_H_GR, 25, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[3])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* rt: register Rt */
-  { "rt", IQ2000_OPERAND_RT, HW_H_GR, 20, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[4])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* rd: register Rd */
-  { "rd", IQ2000_OPERAND_RD, HW_H_GR, 15, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[5])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* rd-rs: register Rd from Rs */
-  { "rd-rs", IQ2000_OPERAND_RD_RS, HW_H_GR, 15, 10,
-    { 2, { (void *) &(IQ2000_F_RD_RS_MULTI_IFIELD[0])} }, 
-    { 0|A(VIRTUAL), { (1<<MACH_BASE) } }  },
-/* rd-rt: register Rd from Rt */
-  { "rd-rt", IQ2000_OPERAND_RD_RT, HW_H_GR, 15, 10,
-    { 2, { (void *) &(IQ2000_F_RD_RT_MULTI_IFIELD[0])} }, 
-    { 0|A(VIRTUAL), { (1<<MACH_BASE) } }  },
-/* rt-rs: register Rt from Rs */
-  { "rt-rs", IQ2000_OPERAND_RT_RS, HW_H_GR, 20, 10,
-    { 2, { (void *) &(IQ2000_F_RT_RS_MULTI_IFIELD[0])} }, 
-    { 0|A(VIRTUAL), { (1<<MACH_BASE) } }  },
-/* shamt: shift amount */
-  { "shamt", IQ2000_OPERAND_SHAMT, HW_H_UINT, 10, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[6])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* imm: immediate */
-  { "imm", IQ2000_OPERAND_IMM, HW_H_UINT, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[11])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* offset: pc-relative offset */
-  { "offset", IQ2000_OPERAND_OFFSET, HW_H_IADDR, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[14])} }, 
-    { 0|A(PCREL_ADDR), { (1<<MACH_BASE) } }  },
-/* baseoff: base register offset */
-  { "baseoff", IQ2000_OPERAND_BASEOFF, HW_H_IADDR, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[11])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* jmptarg: jump target */
-  { "jmptarg", IQ2000_OPERAND_JMPTARG, HW_H_IADDR, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[12])} }, 
-    { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
-/* mask: mask */
-  { "mask", IQ2000_OPERAND_MASK, HW_H_UINT, 9, 4,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[18])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* maskq10: iq10 mask */
-  { "maskq10", IQ2000_OPERAND_MASKQ10, HW_H_UINT, 10, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[19])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* maskl: mask left */
-  { "maskl", IQ2000_OPERAND_MASKL, HW_H_UINT, 4, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[20])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* count: count */
-  { "count", IQ2000_OPERAND_COUNT, HW_H_UINT, 15, 7,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[15])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* index: index */
-  { "index", IQ2000_OPERAND_INDEX, HW_H_UINT, 8, 9,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[17])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* execode: execcode */
-  { "execode", IQ2000_OPERAND_EXECODE, HW_H_UINT, 25, 20,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[21])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* bytecount: byte count */
-  { "bytecount", IQ2000_OPERAND_BYTECOUNT, HW_H_UINT, 7, 8,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[16])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* cam-y: cam global opn y */
-  { "cam-y", IQ2000_OPERAND_CAM_Y, HW_H_UINT, 2, 3,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[29])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* cam-z: cam global mask z */
-  { "cam-z", IQ2000_OPERAND_CAM_Z, HW_H_UINT, 5, 3,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[28])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* cm-3func: CM 3 bit fn field */
-  { "cm-3func", IQ2000_OPERAND_CM_3FUNC, HW_H_UINT, 5, 3,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[30])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* cm-4func: CM 4 bit fn field */
-  { "cm-4func", IQ2000_OPERAND_CM_4FUNC, HW_H_UINT, 5, 4,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[31])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* cm-3z: CM 3 bit Z field */
-  { "cm-3z", IQ2000_OPERAND_CM_3Z, HW_H_UINT, 1, 2,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[32])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* cm-4z: CM 4 bit Z field */
-  { "cm-4z", IQ2000_OPERAND_CM_4Z, HW_H_UINT, 2, 3,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[33])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* base: base register */
-  { "base", IQ2000_OPERAND_BASE, HW_H_GR, 25, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[3])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* maskr: mask right */
-  { "maskr", IQ2000_OPERAND_MASKR, HW_H_UINT, 25, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[3])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* bitnum: bit number */
-  { "bitnum", IQ2000_OPERAND_BITNUM, HW_H_UINT, 20, 5,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[4])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* hi16: high 16 bit immediate */
-  { "hi16", IQ2000_OPERAND_HI16, HW_H_UINT, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[11])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* lo16: 16 bit signed immediate, for low */
-  { "lo16", IQ2000_OPERAND_LO16, HW_H_UINT, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[11])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* mlo16: negated 16 bit signed immediate */
-  { "mlo16", IQ2000_OPERAND_MLO16, HW_H_UINT, 15, 16,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[11])} }, 
-    { 0, { (1<<MACH_BASE) } }  },
-/* jmptargq10: iq10 21-bit jump offset */
-  { "jmptargq10", IQ2000_OPERAND_JMPTARGQ10, HW_H_IADDR, 20, 21,
-    { 0, { (void *) &(iq2000_cgen_ifld_table[13])} }, 
-    { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
-  { 0, 0, 0, 0, 0, {0, {0}}, {0, {0}} }
-};
-
-#undef A
-
-
-/* The instruction table.  */
-
-#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_INSN_##a)
-#else
-#define A(a) (1 << CGEN_INSN_/**/a)
-#endif
-
-static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
-{
-  /* Special null first entry.
-     A `num' value of zero is thus invalid.
-     Also, the special `invalid' insn resides here.  */
-  { 0, 0, 0, 0, {0, {0}} },
-/* add ${rd-rs},$rt */
-  {
-    -1, "add2", "add", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* add $rd,$rs,$rt */
-  {
-    IQ2000_INSN_ADD, "add", "add", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* addi ${rt-rs},$lo16 */
-  {
-    -1, "addi2", "addi", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* addi $rt,$rs,$lo16 */
-  {
-    IQ2000_INSN_ADDI, "addi", "addi", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* addiu ${rt-rs},$lo16 */
-  {
-    -1, "addiu2", "addiu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* addiu $rt,$rs,$lo16 */
-  {
-    IQ2000_INSN_ADDIU, "addiu", "addiu", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* addu ${rd-rs},$rt */
-  {
-    -1, "addu2", "addu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* addu $rd,$rs,$rt */
-  {
-    IQ2000_INSN_ADDU, "addu", "addu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* ado16 ${rd-rs},$rt */
-  {
-    -1, "ado162", "ado16", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* ado16 $rd,$rs,$rt */
-  {
-    IQ2000_INSN_ADO16, "ado16", "ado16", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* and ${rd-rs},$rt */
-  {
-    -1, "and2", "and", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* and $rd,$rs,$rt */
-  {
-    IQ2000_INSN_AND, "and", "and", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* andi ${rt-rs},$lo16 */
-  {
-    -1, "andi2", "andi", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* andi $rt,$rs,$lo16 */
-  {
-    IQ2000_INSN_ANDI, "andi", "andi", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* andoi ${rt-rs},$lo16 */
-  {
-    -1, "andoi2", "andoi", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* andoi $rt,$rs,$lo16 */
-  {
-    IQ2000_INSN_ANDOI, "andoi", "andoi", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* nor ${rd-rs},$rt */
-  {
-    -1, "nor2", "nor", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* nor $rd,$rs,$rt */
-  {
-    IQ2000_INSN_NOR, "nor", "nor", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* or ${rd-rs},$rt */
-  {
-    -1, "or2", "or", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* or $rd,$rs,$rt */
-  {
-    IQ2000_INSN_OR, "or", "or", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* ori ${rt-rs},$lo16 */
-  {
-    -1, "ori2", "ori", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* ori $rt,$rs,$lo16 */
-  {
-    IQ2000_INSN_ORI, "ori", "ori", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* ram $rd,$rt,$shamt,$maskl,$maskr */
-  {
-    IQ2000_INSN_RAM, "ram", "ram", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* sll $rd,$rt,$shamt */
-  {
-    IQ2000_INSN_SLL, "sll", "sll", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* sllv ${rd-rt},$rs */
-  {
-    -1, "sllv2", "sllv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sllv $rd,$rt,$rs */
-  {
-    IQ2000_INSN_SLLV, "sllv", "sllv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* slmv ${rd-rt},$rs,$shamt */
-  {
-    -1, "slmv2", "slmv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* slmv $rd,$rt,$rs,$shamt */
-  {
-    IQ2000_INSN_SLMV, "slmv", "slmv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* slt ${rd-rs},$rt */
-  {
-    -1, "slt2", "slt", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* slt $rd,$rs,$rt */
-  {
-    IQ2000_INSN_SLT, "slt", "slt", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* slti ${rt-rs},$imm */
-  {
-    -1, "slti2", "slti", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* slti $rt,$rs,$imm */
-  {
-    IQ2000_INSN_SLTI, "slti", "slti", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* sltiu ${rt-rs},$imm */
-  {
-    -1, "sltiu2", "sltiu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sltiu $rt,$rs,$imm */
-  {
-    IQ2000_INSN_SLTIU, "sltiu", "sltiu", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* sltu ${rd-rs},$rt */
-  {
-    -1, "sltu2", "sltu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sltu $rd,$rs,$rt */
-  {
-    IQ2000_INSN_SLTU, "sltu", "sltu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* sra ${rd-rt},$shamt */
-  {
-    -1, "sra2", "sra", 32,
-    { 0|A(USES_RT)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sra $rd,$rt,$shamt */
-  {
-    IQ2000_INSN_SRA, "sra", "sra", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* srav ${rd-rt},$rs */
-  {
-    -1, "srav2", "srav", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* srav $rd,$rt,$rs */
-  {
-    IQ2000_INSN_SRAV, "srav", "srav", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* srl $rd,$rt,$shamt */
-  {
-    IQ2000_INSN_SRL, "srl", "srl", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* srlv ${rd-rt},$rs */
-  {
-    -1, "srlv2", "srlv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* srlv $rd,$rt,$rs */
-  {
-    IQ2000_INSN_SRLV, "srlv", "srlv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* srmv ${rd-rt},$rs,$shamt */
-  {
-    -1, "srmv2", "srmv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* srmv $rd,$rt,$rs,$shamt */
-  {
-    IQ2000_INSN_SRMV, "srmv", "srmv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* sub ${rd-rs},$rt */
-  {
-    -1, "sub2", "sub", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sub $rd,$rs,$rt */
-  {
-    IQ2000_INSN_SUB, "sub", "sub", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* subu ${rd-rs},$rt */
-  {
-    -1, "subu2", "subu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* subu $rd,$rs,$rt */
-  {
-    IQ2000_INSN_SUBU, "subu", "subu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* xor ${rd-rs},$rt */
-  {
-    -1, "xor2", "xor", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* xor $rd,$rs,$rt */
-  {
-    IQ2000_INSN_XOR, "xor", "xor", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_BASE) } }
-  },
-/* xori ${rt-rs},$lo16 */
-  {
-    -1, "xori2", "xori", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* xori $rt,$rs,$lo16 */
-  {
-    IQ2000_INSN_XORI, "xori", "xori", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* bbi $rs($bitnum),$offset */
-  {
-    IQ2000_INSN_BBI, "bbi", "bbi", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bbin $rs($bitnum),$offset */
-  {
-    IQ2000_INSN_BBIN, "bbin", "bbin", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bbv $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BBV, "bbv", "bbv", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bbvn $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BBVN, "bbvn", "bbvn", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* beq $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BEQ, "beq", "beq", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* beql $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BEQL, "beql", "beql", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bgez $rs,$offset */
-  {
-    IQ2000_INSN_BGEZ, "bgez", "bgez", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bgezal $rs,$offset */
-  {
-    IQ2000_INSN_BGEZAL, "bgezal", "bgezal", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bgezall $rs,$offset */
-  {
-    IQ2000_INSN_BGEZALL, "bgezall", "bgezall", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bgezl $rs,$offset */
-  {
-    IQ2000_INSN_BGEZL, "bgezl", "bgezl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bltz $rs,$offset */
-  {
-    IQ2000_INSN_BLTZ, "bltz", "bltz", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bltzl $rs,$offset */
-  {
-    IQ2000_INSN_BLTZL, "bltzl", "bltzl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bltzal $rs,$offset */
-  {
-    IQ2000_INSN_BLTZAL, "bltzal", "bltzal", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bltzall $rs,$offset */
-  {
-    IQ2000_INSN_BLTZALL, "bltzall", "bltzall", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bmb0 $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMB0, "bmb0", "bmb0", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bmb1 $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMB1, "bmb1", "bmb1", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bmb2 $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMB2, "bmb2", "bmb2", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bmb3 $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMB3, "bmb3", "bmb3", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bne $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BNE, "bne", "bne", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* bnel $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BNEL, "bnel", "bnel", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* jalr $rd,$rs */
-  {
-    IQ2000_INSN_JALR, "jalr", "jalr", 32,
-    { 0|A(USES_RS)|A(USES_RD)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* jr $rs */
-  {
-    IQ2000_INSN_JR, "jr", "jr", 32,
-    { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_BASE) } }
-  },
-/* lb $rt,$lo16($base) */
-  {
-    IQ2000_INSN_LB, "lb", "lb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
-  },
-/* lbu $rt,$lo16($base) */
-  {
-    IQ2000_INSN_LBU, "lbu", "lbu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
-  },
-/* lh $rt,$lo16($base) */
-  {
-    IQ2000_INSN_LH, "lh", "lh", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
-  },
-/* lhu $rt,$lo16($base) */
-  {
-    IQ2000_INSN_LHU, "lhu", "lhu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
-  },
-/* lui $rt,$hi16 */
-  {
-    IQ2000_INSN_LUI, "lui", "lui", 32,
-    { 0|A(USES_RT), { (1<<MACH_BASE) } }
-  },
-/* lw $rt,$lo16($base) */
-  {
-    IQ2000_INSN_LW, "lw", "lw", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(LOAD_DELAY), { (1<<MACH_BASE) } }
-  },
-/* sb $rt,$lo16($base) */
-  {
-    IQ2000_INSN_SB, "sb", "sb", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* sh $rt,$lo16($base) */
-  {
-    IQ2000_INSN_SH, "sh", "sh", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* sw $rt,$lo16($base) */
-  {
-    IQ2000_INSN_SW, "sw", "sw", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_BASE) } }
-  },
-/* break */
-  {
-    IQ2000_INSN_BREAK, "break", "break", 32,
-    { 0, { (1<<MACH_BASE) } }
-  },
-/* syscall */
-  {
-    IQ2000_INSN_SYSCALL, "syscall", "syscall", 32,
-    { 0|A(YIELD_INSN), { (1<<MACH_BASE) } }
-  },
-/* andoui $rt,$rs,$hi16 */
-  {
-    IQ2000_INSN_ANDOUI, "andoui", "andoui", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ2000) } }
-  },
-/* andoui ${rt-rs},$hi16 */
-  {
-    -1, "andoui2", "andoui", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ2000) } }
-  },
-/* orui ${rt-rs},$hi16 */
-  {
-    -1, "orui2", "orui", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ2000) } }
-  },
-/* orui $rt,$rs,$hi16 */
-  {
-    IQ2000_INSN_ORUI, "orui", "orui", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ2000) } }
-  },
-/* bgtz $rs,$offset */
-  {
-    IQ2000_INSN_BGTZ, "bgtz", "bgtz", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bgtzl $rs,$offset */
-  {
-    IQ2000_INSN_BGTZL, "bgtzl", "bgtzl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* blez $rs,$offset */
-  {
-    IQ2000_INSN_BLEZ, "blez", "blez", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* blezl $rs,$offset */
-  {
-    IQ2000_INSN_BLEZL, "blezl", "blezl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* mrgb $rd,$rs,$rt,$mask */
-  {
-    IQ2000_INSN_MRGB, "mrgb", "mrgb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* mrgb ${rd-rs},$rt,$mask */
-  {
-    -1, "mrgb2", "mrgb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ2000) } }
-  },
-/* bctxt $rs,$offset */
-  {
-    IQ2000_INSN_BCTXT, "bctxt", "bctxt", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc0f $offset */
-  {
-    IQ2000_INSN_BC0F, "bc0f", "bc0f", 32,
-    { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc0fl $offset */
-  {
-    IQ2000_INSN_BC0FL, "bc0fl", "bc0fl", 32,
-    { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc3f $offset */
-  {
-    IQ2000_INSN_BC3F, "bc3f", "bc3f", 32,
-    { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc3fl $offset */
-  {
-    IQ2000_INSN_BC3FL, "bc3fl", "bc3fl", 32,
-    { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc0t $offset */
-  {
-    IQ2000_INSN_BC0T, "bc0t", "bc0t", 32,
-    { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc0tl $offset */
-  {
-    IQ2000_INSN_BC0TL, "bc0tl", "bc0tl", 32,
-    { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc3t $offset */
-  {
-    IQ2000_INSN_BC3T, "bc3t", "bc3t", 32,
-    { 0|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bc3tl $offset */
-  {
-    IQ2000_INSN_BC3TL, "bc3tl", "bc3tl", 32,
-    { 0|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* cfc0 $rt,$rd */
-  {
-    IQ2000_INSN_CFC0, "cfc0", "cfc0", 32,
-    { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* cfc1 $rt,$rd */
-  {
-    IQ2000_INSN_CFC1, "cfc1", "cfc1", 32,
-    { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* cfc2 $rt,$rd */
-  {
-    IQ2000_INSN_CFC2, "cfc2", "cfc2", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* cfc3 $rt,$rd */
-  {
-    IQ2000_INSN_CFC3, "cfc3", "cfc3", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* chkhdr $rd,$rt */
-  {
-    IQ2000_INSN_CHKHDR, "chkhdr", "chkhdr", 32,
-    { 0|A(YIELD_INSN)|A(USES_RD)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* ctc0 $rt,$rd */
-  {
-    IQ2000_INSN_CTC0, "ctc0", "ctc0", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* ctc1 $rt,$rd */
-  {
-    IQ2000_INSN_CTC1, "ctc1", "ctc1", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* ctc2 $rt,$rd */
-  {
-    IQ2000_INSN_CTC2, "ctc2", "ctc2", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* ctc3 $rt,$rd */
-  {
-    IQ2000_INSN_CTC3, "ctc3", "ctc3", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* jcr $rs */
-  {
-    IQ2000_INSN_JCR, "jcr", "jcr", 32,
-    { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* luc32 $rt,$rd */
-  {
-    IQ2000_INSN_LUC32, "luc32", "luc32", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* luc32l $rt,$rd */
-  {
-    IQ2000_INSN_LUC32L, "luc32l", "luc32l", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* luc64 $rt,$rd */
-  {
-    IQ2000_INSN_LUC64, "luc64", "luc64", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* luc64l $rt,$rd */
-  {
-    IQ2000_INSN_LUC64L, "luc64l", "luc64l", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* luk $rt,$rd */
-  {
-    IQ2000_INSN_LUK, "luk", "luk", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* lulck $rt */
-  {
-    IQ2000_INSN_LULCK, "lulck", "lulck", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* lum32 $rt,$rd */
-  {
-    IQ2000_INSN_LUM32, "lum32", "lum32", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* lum32l $rt,$rd */
-  {
-    IQ2000_INSN_LUM32L, "lum32l", "lum32l", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* lum64 $rt,$rd */
-  {
-    IQ2000_INSN_LUM64, "lum64", "lum64", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* lum64l $rt,$rd */
-  {
-    IQ2000_INSN_LUM64L, "lum64l", "lum64l", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* lur $rt,$rd */
-  {
-    IQ2000_INSN_LUR, "lur", "lur", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* lurl $rt,$rd */
-  {
-    IQ2000_INSN_LURL, "lurl", "lurl", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* luulck $rt */
-  {
-    IQ2000_INSN_LUULCK, "luulck", "luulck", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* mfc0 $rt,$rd */
-  {
-    IQ2000_INSN_MFC0, "mfc0", "mfc0", 32,
-    { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* mfc1 $rt,$rd */
-  {
-    IQ2000_INSN_MFC1, "mfc1", "mfc1", 32,
-    { 0|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* mfc2 $rt,$rd */
-  {
-    IQ2000_INSN_MFC2, "mfc2", "mfc2", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* mfc3 $rt,$rd */
-  {
-    IQ2000_INSN_MFC3, "mfc3", "mfc3", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(LOAD_DELAY), { (1<<MACH_IQ2000) } }
-  },
-/* mtc0 $rt,$rd */
-  {
-    IQ2000_INSN_MTC0, "mtc0", "mtc0", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* mtc1 $rt,$rd */
-  {
-    IQ2000_INSN_MTC1, "mtc1", "mtc1", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* mtc2 $rt,$rd */
-  {
-    IQ2000_INSN_MTC2, "mtc2", "mtc2", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* mtc3 $rt,$rd */
-  {
-    IQ2000_INSN_MTC3, "mtc3", "mtc3", 32,
-    { 0|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* pkrl $rd,$rt */
-  {
-    IQ2000_INSN_PKRL, "pkrl", "pkrl", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* pkrlr1 $rt,$index,$count */
-  {
-    IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* pkrlr30 $rt,$index,$count */
-  {
-    IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* rb $rd,$rt */
-  {
-    IQ2000_INSN_RB, "rb", "rb", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* rbr1 $rt,$index,$count */
-  {
-    IQ2000_INSN_RBR1, "rbr1", "rbr1", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* rbr30 $rt,$index,$count */
-  {
-    IQ2000_INSN_RBR30, "rbr30", "rbr30", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* rfe */
-  {
-    IQ2000_INSN_RFE, "rfe", "rfe", 32,
-    { 0, { (1<<MACH_IQ2000) } }
-  },
-/* rx $rd,$rt */
-  {
-    IQ2000_INSN_RX, "rx", "rx", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* rxr1 $rt,$index,$count */
-  {
-    IQ2000_INSN_RXR1, "rxr1", "rxr1", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* rxr30 $rt,$index,$count */
-  {
-    IQ2000_INSN_RXR30, "rxr30", "rxr30", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* sleep */
-  {
-    IQ2000_INSN_SLEEP, "sleep", "sleep", 32,
-    { 0|A(YIELD_INSN), { (1<<MACH_IQ2000) } }
-  },
-/* srrd $rt */
-  {
-    IQ2000_INSN_SRRD, "srrd", "srrd", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* srrdl $rt */
-  {
-    IQ2000_INSN_SRRDL, "srrdl", "srrdl", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* srulck $rt */
-  {
-    IQ2000_INSN_SRULCK, "srulck", "srulck", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* srwr $rt,$rd */
-  {
-    IQ2000_INSN_SRWR, "srwr", "srwr", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* srwru $rt,$rd */
-  {
-    IQ2000_INSN_SRWRU, "srwru", "srwru", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* trapqfl */
-  {
-    IQ2000_INSN_TRAPQFL, "trapqfl", "trapqfl", 32,
-    { 0|A(YIELD_INSN), { (1<<MACH_IQ2000) } }
-  },
-/* trapqne */
-  {
-    IQ2000_INSN_TRAPQNE, "trapqne", "trapqne", 32,
-    { 0|A(YIELD_INSN), { (1<<MACH_IQ2000) } }
-  },
-/* traprel $rt */
-  {
-    IQ2000_INSN_TRAPREL, "traprel", "traprel", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wb $rd,$rt */
-  {
-    IQ2000_INSN_WB, "wb", "wb", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* wbu $rd,$rt */
-  {
-    IQ2000_INSN_WBU, "wbu", "wbu", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* wbr1 $rt,$index,$count */
-  {
-    IQ2000_INSN_WBR1, "wbr1", "wbr1", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wbr1u $rt,$index,$count */
-  {
-    IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wbr30 $rt,$index,$count */
-  {
-    IQ2000_INSN_WBR30, "wbr30", "wbr30", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wbr30u $rt,$index,$count */
-  {
-    IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wx $rd,$rt */
-  {
-    IQ2000_INSN_WX, "wx", "wx", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* wxu $rd,$rt */
-  {
-    IQ2000_INSN_WXU, "wxu", "wxu", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
-  },
-/* wxr1 $rt,$index,$count */
-  {
-    IQ2000_INSN_WXR1, "wxr1", "wxr1", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wxr1u $rt,$index,$count */
-  {
-    IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wxr30 $rt,$index,$count */
-  {
-    IQ2000_INSN_WXR30, "wxr30", "wxr30", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* wxr30u $rt,$index,$count */
-  {
-    IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 32,
-    { 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
-  },
-/* ldw $rt,$lo16($base) */
-  {
-    IQ2000_INSN_LDW, "ldw", "ldw", 32,
-    { 0|A(USES_RT)|A(LOAD_DELAY)|A(EVEN_REG_NUM), { (1<<MACH_IQ2000) } }
-  },
-/* sdw $rt,$lo16($base) */
-  {
-    IQ2000_INSN_SDW, "sdw", "sdw", 32,
-    { 0|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ2000) } }
-  },
-/* j $jmptarg */
-  {
-    IQ2000_INSN_J, "j", "j", 32,
-    { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* jal $jmptarg */
-  {
-    IQ2000_INSN_JAL, "jal", "jal", 32,
-    { 0|A(USES_R31)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* bmb $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMB, "bmb", "bmb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ2000) } }
-  },
-/* andoui $rt,$rs,$hi16 */
-  {
-    IQ2000_INSN_ANDOUI_Q10, "andoui-q10", "andoui", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* andoui ${rt-rs},$hi16 */
-  {
-    -1, "andoui2-q10", "andoui", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* orui $rt,$rs,$hi16 */
-  {
-    IQ2000_INSN_ORUI_Q10, "orui-q10", "orui", 32,
-    { 0|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* orui ${rt-rs},$hi16 */
-  {
-    -1, "orui2-q10", "orui", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* mrgb $rd,$rs,$rt,$maskq10 */
-  {
-    IQ2000_INSN_MRGBQ10, "mrgbq10", "mrgb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* mrgb ${rd-rs},$rt,$maskq10 */
-  {
-    -1, "mrgbq102", "mrgb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* j $jmptarg */
-  {
-    IQ2000_INSN_JQ10, "jq10", "j", 32,
-    { 0|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* jal $rt,$jmptarg */
-  {
-    IQ2000_INSN_JALQ10, "jalq10", "jal", 32,
-    { 0|A(USES_RT)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* jal $jmptarg */
-  {
-    IQ2000_INSN_JALQ10_2, "jalq10-2", "jal", 32,
-    { 0|A(USES_RT)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bbil $rs($bitnum),$offset */
-  {
-    IQ2000_INSN_BBIL, "bbil", "bbil", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bbinl $rs($bitnum),$offset */
-  {
-    IQ2000_INSN_BBINL, "bbinl", "bbinl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bbvl $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BBVL, "bbvl", "bbvl", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bbvnl $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BBVNL, "bbvnl", "bbvnl", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bgtzal $rs,$offset */
-  {
-    IQ2000_INSN_BGTZAL, "bgtzal", "bgtzal", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bgtzall $rs,$offset */
-  {
-    IQ2000_INSN_BGTZALL, "bgtzall", "bgtzall", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* blezal $rs,$offset */
-  {
-    IQ2000_INSN_BLEZAL, "blezal", "blezal", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* blezall $rs,$offset */
-  {
-    IQ2000_INSN_BLEZALL, "blezall", "blezall", 32,
-    { 0|A(USES_R31)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bgtz $rs,$offset */
-  {
-    IQ2000_INSN_BGTZ_Q10, "bgtz-q10", "bgtz", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bgtzl $rs,$offset */
-  {
-    IQ2000_INSN_BGTZL_Q10, "bgtzl-q10", "bgtzl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* blez $rs,$offset */
-  {
-    IQ2000_INSN_BLEZ_Q10, "blez-q10", "blez", 32,
-    { 0|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* blezl $rs,$offset */
-  {
-    IQ2000_INSN_BLEZL_Q10, "blezl-q10", "blezl", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bmb $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMB_Q10, "bmb-q10", "bmb", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bmbl $rs,$rt,$offset */
-  {
-    IQ2000_INSN_BMBL, "bmbl", "bmbl", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bri $rs,$offset */
-  {
-    IQ2000_INSN_BRI, "bri", "bri", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* brv $rs,$offset */
-  {
-    IQ2000_INSN_BRV, "brv", "brv", 32,
-    { 0|A(USES_RS)|A(SKIP_CTI)|A(COND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* bctx $rs,$offset */
-  {
-    IQ2000_INSN_BCTX, "bctx", "bctx", 32,
-    { 0|A(USES_RS)|A(UNCOND_CTI)|A(DELAY_SLOT), { (1<<MACH_IQ10) } }
-  },
-/* yield */
-  {
-    IQ2000_INSN_YIELD, "yield", "yield", 32,
-    { 0, { (1<<MACH_IQ10) } }
-  },
-/* crc32 $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CRC32, "crc32", "crc32", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* crc32b $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CRC32B, "crc32b", "crc32b", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* cnt1s $rd,$rs */
-  {
-    IQ2000_INSN_CNT1S, "cnt1s", "cnt1s", 32,
-    { 0|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* avail $rd */
-  {
-    IQ2000_INSN_AVAIL, "avail", "avail", 32,
-    { 0|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* free $rd,$rs */
-  {
-    IQ2000_INSN_FREE, "free", "free", 32,
-    { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* tstod $rd,$rs */
-  {
-    IQ2000_INSN_TSTOD, "tstod", "tstod", 32,
-    { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cmphdr $rd */
-  {
-    IQ2000_INSN_CMPHDR, "cmphdr", "cmphdr", 32,
-    { 0|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* mcid $rd,$rt */
-  {
-    IQ2000_INSN_MCID, "mcid", "mcid", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* dba $rd */
-  {
-    IQ2000_INSN_DBA, "dba", "dba", 32,
-    { 0|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* dbd $rd,$rs,$rt */
-  {
-    IQ2000_INSN_DBD, "dbd", "dbd", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* dpwt $rd,$rs */
-  {
-    IQ2000_INSN_DPWT, "dpwt", "dpwt", 32,
-    { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* chkhdr $rd,$rs */
-  {
-    IQ2000_INSN_CHKHDRQ10, "chkhdrq10", "chkhdr", 32,
-    { 0|A(USES_RD)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* rba $rd,$rs,$rt */
-  {
-    IQ2000_INSN_RBA, "rba", "rba", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* rbal $rd,$rs,$rt */
-  {
-    IQ2000_INSN_RBAL, "rbal", "rbal", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* rbar $rd,$rs,$rt */
-  {
-    IQ2000_INSN_RBAR, "rbar", "rbar", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* wba $rd,$rs,$rt */
-  {
-    IQ2000_INSN_WBA, "wba", "wba", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* wbau $rd,$rs,$rt */
-  {
-    IQ2000_INSN_WBAU, "wbau", "wbau", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* wbac $rd,$rs,$rt */
-  {
-    IQ2000_INSN_WBAC, "wbac", "wbac", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* rbi $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_RBI, "rbi", "rbi", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* rbil $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_RBIL, "rbil", "rbil", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* rbir $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_RBIR, "rbir", "rbir", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* wbi $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_WBI, "wbi", "wbi", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* wbic $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_WBIC, "wbic", "wbic", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* wbiu $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_WBIU, "wbiu", "wbiu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* pkrli $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_PKRLI, "pkrli", "pkrli", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* pkrlih $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_PKRLIH, "pkrlih", "pkrlih", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* pkrliu $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_PKRLIU, "pkrliu", "pkrliu", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* pkrlic $rd,$rs,$rt,$bytecount */
-  {
-    IQ2000_INSN_PKRLIC, "pkrlic", "pkrlic", 32,
-    { 0|A(USES_RT)|A(USES_RS)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* pkrla $rd,$rs,$rt */
-  {
-    IQ2000_INSN_PKRLA, "pkrla", "pkrla", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlau $rd,$rs,$rt */
-  {
-    IQ2000_INSN_PKRLAU, "pkrlau", "pkrlau", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlah $rd,$rs,$rt */
-  {
-    IQ2000_INSN_PKRLAH, "pkrlah", "pkrlah", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlac $rd,$rs,$rt */
-  {
-    IQ2000_INSN_PKRLAC, "pkrlac", "pkrlac", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* lock $rd,$rt */
-  {
-    IQ2000_INSN_LOCK, "lock", "lock", 32,
-    { 0|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ10) } }
-  },
-/* unlk $rd,$rt */
-  {
-    IQ2000_INSN_UNLK, "unlk", "unlk", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* swrd $rd,$rt */
-  {
-    IQ2000_INSN_SWRD, "swrd", "swrd", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* swrdl $rd,$rt */
-  {
-    IQ2000_INSN_SWRDL, "swrdl", "swrdl", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* swwr $rd,$rs,$rt */
-  {
-    IQ2000_INSN_SWWR, "swwr", "swwr", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* swwru $rd,$rs,$rt */
-  {
-    IQ2000_INSN_SWWRU, "swwru", "swwru", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* dwrd $rd,$rt */
-  {
-    IQ2000_INSN_DWRD, "dwrd", "dwrd", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* dwrdl $rd,$rt */
-  {
-    IQ2000_INSN_DWRDL, "dwrdl", "dwrdl", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cam36 $rd,$rt,${cam-z},${cam-y} */
-  {
-    IQ2000_INSN_CAM36, "cam36", "cam36", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cam72 $rd,$rt,${cam-y},${cam-z} */
-  {
-    IQ2000_INSN_CAM72, "cam72", "cam72", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cam144 $rd,$rt,${cam-y},${cam-z} */
-  {
-    IQ2000_INSN_CAM144, "cam144", "cam144", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cam288 $rd,$rt,${cam-y},${cam-z} */
-  {
-    IQ2000_INSN_CAM288, "cam288", "cam288", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cm32and $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32AND, "cm32and", "cm32and", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32andn $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32ANDN, "cm32andn", "cm32andn", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32or $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32OR, "cm32or", "cm32or", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32ra $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32RA, "cm32ra", "cm32ra", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32rd $rd,$rt */
-  {
-    IQ2000_INSN_CM32RD, "cm32rd", "cm32rd", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cm32ri $rd,$rt */
-  {
-    IQ2000_INSN_CM32RI, "cm32ri", "cm32ri", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cm32rs $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32RS, "cm32rs", "cm32rs", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32sa $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32SA, "cm32sa", "cm32sa", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32sd $rd,$rt */
-  {
-    IQ2000_INSN_CM32SD, "cm32sd", "cm32sd", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cm32si $rd,$rt */
-  {
-    IQ2000_INSN_CM32SI, "cm32si", "cm32si", 32,
-    { 0|A(USES_RD)|A(USES_RT), { (1<<MACH_IQ10) } }
-  },
-/* cm32ss $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32SS, "cm32ss", "cm32ss", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm32xor $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM32XOR, "cm32xor", "cm32xor", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm64clr $rd,$rt */
-  {
-    IQ2000_INSN_CM64CLR, "cm64clr", "cm64clr", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64ra $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM64RA, "cm64ra", "cm64ra", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64rd $rd,$rt */
-  {
-    IQ2000_INSN_CM64RD, "cm64rd", "cm64rd", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64ri $rd,$rt */
-  {
-    IQ2000_INSN_CM64RI, "cm64ri", "cm64ri", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64ria2 $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM64RIA2, "cm64ria2", "cm64ria2", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64rs $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM64RS, "cm64rs", "cm64rs", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64sa $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM64SA, "cm64sa", "cm64sa", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64sd $rd,$rt */
-  {
-    IQ2000_INSN_CM64SD, "cm64sd", "cm64sd", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64si $rd,$rt */
-  {
-    IQ2000_INSN_CM64SI, "cm64si", "cm64si", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64sia2 $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM64SIA2, "cm64sia2", "cm64sia2", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm64ss $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM64SS, "cm64ss", "cm64ss", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm128ria2 $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM128RIA2, "cm128ria2", "cm128ria2", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm128ria3 $rd,$rs,$rt,${cm-3z} */
-  {
-    IQ2000_INSN_CM128RIA3, "cm128ria3", "cm128ria3", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm128ria4 $rd,$rs,$rt,${cm-4z} */
-  {
-    IQ2000_INSN_CM128RIA4, "cm128ria4", "cm128ria4", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm128sia2 $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM128SIA2, "cm128sia2", "cm128sia2", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm128sia3 $rd,$rs,$rt,${cm-3z} */
-  {
-    IQ2000_INSN_CM128SIA3, "cm128sia3", "cm128sia3", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(EVEN_REG_NUM), { (1<<MACH_IQ10) } }
-  },
-/* cm128sia4 $rd,$rs,$rt,${cm-4z} */
-  {
-    IQ2000_INSN_CM128SIA4, "cm128sia4", "cm128sia4", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cm128vsa $rd,$rs,$rt */
-  {
-    IQ2000_INSN_CM128VSA, "cm128vsa", "cm128vsa", 32,
-    { 0|A(USES_RD)|A(USES_RT)|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-/* cfc $rd,$rt */
-  {
-    IQ2000_INSN_CFC, "cfc", "cfc", 32,
-    { 0|A(YIELD_INSN)|A(USES_RD)|A(LOAD_DELAY), { (1<<MACH_IQ10) } }
-  },
-/* ctc $rs,$rt */
-  {
-    IQ2000_INSN_CTC, "ctc", "ctc", 32,
-    { 0|A(USES_RS), { (1<<MACH_IQ10) } }
-  },
-};
-
-#undef OP
-#undef A
-
-/* Initialize anything needed to be done once, before any cpu_open call.  */
-static void init_tables PARAMS ((void));
-
-static void
-init_tables ()
-{
-}
-
-static const CGEN_MACH * lookup_mach_via_bfd_name
-  PARAMS ((const CGEN_MACH *, const char *));
-static void build_hw_table  PARAMS ((CGEN_CPU_TABLE *));
-static void build_ifield_table  PARAMS ((CGEN_CPU_TABLE *));
-static void build_operand_table PARAMS ((CGEN_CPU_TABLE *));
-static void build_insn_table    PARAMS ((CGEN_CPU_TABLE *));
-static void iq2000_cgen_rebuild_tables PARAMS ((CGEN_CPU_TABLE *));
-
-/* Subroutine of iq2000_cgen_cpu_open to look up a mach via its bfd name.  */
-
-static const CGEN_MACH *
-lookup_mach_via_bfd_name (table, name)
-     const CGEN_MACH *table;
-     const char *name;
-{
-  while (table->name)
-    {
-      if (strcmp (name, table->bfd_name) == 0)
-	return table;
-      ++table;
-    }
-  abort ();
-}
-
-/* Subroutine of iq2000_cgen_cpu_open to build the hardware table.  */
-
-static void
-build_hw_table (cd)
-     CGEN_CPU_TABLE *cd;
-{
-  int i;
-  int machs = cd->machs;
-  const CGEN_HW_ENTRY *init = & iq2000_cgen_hw_table[0];
-  /* MAX_HW is only an upper bound on the number of selected entries.
-     However each entry is indexed by it's enum so there can be holes in
-     the table.  */
-  const CGEN_HW_ENTRY **selected =
-    (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *));
-
-  cd->hw_table.init_entries = init;
-  cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY);
-  memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *));
-  /* ??? For now we just use machs to determine which ones we want.  */
-  for (i = 0; init[i].name != NULL; ++i)
-    if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH)
-	& machs)
-      selected[init[i].type] = &init[i];
-  cd->hw_table.entries = selected;
-  cd->hw_table.num_entries = MAX_HW;
-}
-
-/* Subroutine of iq2000_cgen_cpu_open to build the hardware table.  */
-
-static void
-build_ifield_table (cd)
-     CGEN_CPU_TABLE *cd;
-{
-  cd->ifld_table = & iq2000_cgen_ifld_table[0];
-}
-
-/* Subroutine of iq2000_cgen_cpu_open to build the hardware table.  */
-
-static void
-build_operand_table (cd)
-     CGEN_CPU_TABLE *cd;
-{
-  int i;
-  int machs = cd->machs;
-  const CGEN_OPERAND *init = & iq2000_cgen_operand_table[0];
-  /* MAX_OPERANDS is only an upper bound on the number of selected entries.
-     However each entry is indexed by it's enum so there can be holes in
-     the table.  */
-  const CGEN_OPERAND **selected =
-    (const CGEN_OPERAND **) xmalloc (MAX_OPERANDS * sizeof (CGEN_OPERAND *));
-
-  cd->operand_table.init_entries = init;
-  cd->operand_table.entry_size = sizeof (CGEN_OPERAND);
-  memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *));
-  /* ??? For now we just use mach to determine which ones we want.  */
-  for (i = 0; init[i].name != NULL; ++i)
-    if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH)
-	& machs)
-      selected[init[i].type] = &init[i];
-  cd->operand_table.entries = selected;
-  cd->operand_table.num_entries = MAX_OPERANDS;
-}
-
-/* Subroutine of iq2000_cgen_cpu_open to build the hardware table.
-   ??? This could leave out insns not supported by the specified mach/isa,
-   but that would cause errors like "foo only supported by bar" to become
-   "unknown insn", so for now we include all insns and require the app to
-   do the checking later.
-   ??? On the other hand, parsing of such insns may require their hardware or
-   operand elements to be in the table [which they mightn't be].  */
-
-static void
-build_insn_table (cd)
-     CGEN_CPU_TABLE *cd;
-{
-  int i;
-  const CGEN_IBASE *ib = & iq2000_cgen_insn_table[0];
-  CGEN_INSN *insns = (CGEN_INSN *) xmalloc (MAX_INSNS * sizeof (CGEN_INSN));
-
-  memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN));
-  for (i = 0; i < MAX_INSNS; ++i)
-    insns[i].base = &ib[i];
-  cd->insn_table.init_entries = insns;
-  cd->insn_table.entry_size = sizeof (CGEN_IBASE);
-  cd->insn_table.num_init_entries = MAX_INSNS;
-}
-
-/* Subroutine of iq2000_cgen_cpu_open to rebuild the tables.  */
-
-static void
-iq2000_cgen_rebuild_tables (cd)
-     CGEN_CPU_TABLE *cd;
-{
-  int i;
-  unsigned int isas = cd->isas;
-  unsigned int machs = cd->machs;
-
-  cd->int_insn_p = CGEN_INT_INSN_P;
-
-  /* Data derived from the isa spec.  */
-#define UNSET (CGEN_SIZE_UNKNOWN + 1)
-  cd->default_insn_bitsize = UNSET;
-  cd->base_insn_bitsize = UNSET;
-  cd->min_insn_bitsize = 65535; /* some ridiculously big number */
-  cd->max_insn_bitsize = 0;
-  for (i = 0; i < MAX_ISAS; ++i)
-    if (((1 << i) & isas) != 0)
-      {
-	const CGEN_ISA *isa = & iq2000_cgen_isa_table[i];
-
-	/* Default insn sizes of all selected isas must be
-	   equal or we set the result to 0, meaning "unknown".  */
-	if (cd->default_insn_bitsize == UNSET)
-	  cd->default_insn_bitsize = isa->default_insn_bitsize;
-	else if (isa->default_insn_bitsize == cd->default_insn_bitsize)
-	  ; /* this is ok */
-	else
-	  cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN;
-
-	/* Base insn sizes of all selected isas must be equal
-	   or we set the result to 0, meaning "unknown".  */
-	if (cd->base_insn_bitsize == UNSET)
-	  cd->base_insn_bitsize = isa->base_insn_bitsize;
-	else if (isa->base_insn_bitsize == cd->base_insn_bitsize)
-	  ; /* this is ok */
-	else
-	  cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN;
-
-	/* Set min,max insn sizes.  */
-	if (isa->min_insn_bitsize < cd->min_insn_bitsize)
-	  cd->min_insn_bitsize = isa->min_insn_bitsize;
-	if (isa->max_insn_bitsize > cd->max_insn_bitsize)
-	  cd->max_insn_bitsize = isa->max_insn_bitsize;
-      }
-
-  /* Data derived from the mach spec.  */
-  for (i = 0; i < MAX_MACHS; ++i)
-    if (((1 << i) & machs) != 0)
-      {
-	const CGEN_MACH *mach = & iq2000_cgen_mach_table[i];
-
-	if (mach->insn_chunk_bitsize != 0)
-	{
-	  if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
-	    {
-	      fprintf (stderr, "iq2000_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n",
-		       cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
-	      abort ();
-	    }
-
- 	  cd->insn_chunk_bitsize = mach->insn_chunk_bitsize;
-	}
-      }
-
-  /* Determine which hw elements are used by MACH.  */
-  build_hw_table (cd);
-
-  /* Build the ifield table.  */
-  build_ifield_table (cd);
-
-  /* Determine which operands are used by MACH/ISA.  */
-  build_operand_table (cd);
-
-  /* Build the instruction table.  */
-  build_insn_table (cd);
-}
-
-/* Initialize a cpu table and return a descriptor.
-   It's much like opening a file, and must be the first function called.
-   The arguments are a set of (type/value) pairs, terminated with
-   CGEN_CPU_OPEN_END.
-
-   Currently supported values:
-   CGEN_CPU_OPEN_ISAS:    bitmap of values in enum isa_attr
-   CGEN_CPU_OPEN_MACHS:   bitmap of values in enum mach_attr
-   CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name
-   CGEN_CPU_OPEN_ENDIAN:  specify endian choice
-   CGEN_CPU_OPEN_END:     terminates arguments
-
-   ??? Simultaneous multiple isas might not make sense, but it's not (yet)
-   precluded.
-
-   ??? We only support ISO C stdargs here, not K&R.
-   Laziness, plus experiment to see if anything requires K&R - eventually
-   K&R will no longer be supported - e.g. GDB is currently trying this.  */
-
-CGEN_CPU_DESC
-iq2000_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
-{
-  CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE));
-  static int init_p;
-  unsigned int isas = 0;  /* 0 = "unspecified" */
-  unsigned int machs = 0; /* 0 = "unspecified" */
-  enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN;
-  va_list ap;
-
-  if (! init_p)
-    {
-      init_tables ();
-      init_p = 1;
-    }
-
-  memset (cd, 0, sizeof (*cd));
-
-  va_start (ap, arg_type);
-  while (arg_type != CGEN_CPU_OPEN_END)
-    {
-      switch (arg_type)
-	{
-	case CGEN_CPU_OPEN_ISAS :
-	  isas = va_arg (ap, unsigned int);
-	  break;
-	case CGEN_CPU_OPEN_MACHS :
-	  machs = va_arg (ap, unsigned int);
-	  break;
-	case CGEN_CPU_OPEN_BFDMACH :
-	  {
-	    const char *name = va_arg (ap, const char *);
-	    const CGEN_MACH *mach =
-	      lookup_mach_via_bfd_name (iq2000_cgen_mach_table, name);
-
-	    machs |= 1 << mach->num;
-	    break;
-	  }
-	case CGEN_CPU_OPEN_ENDIAN :
-	  endian = va_arg (ap, enum cgen_endian);
-	  break;
-	default :
-	  fprintf (stderr, "iq2000_cgen_cpu_open: unsupported argument `%d'\n",
-		   arg_type);
-	  abort (); /* ??? return NULL? */
-	}
-      arg_type = va_arg (ap, enum cgen_cpu_open_arg);
-    }
-  va_end (ap);
-
-  /* mach unspecified means "all" */
-  if (machs == 0)
-    machs = (1 << MAX_MACHS) - 1;
-  /* base mach is always selected */
-  machs |= 1;
-  /* isa unspecified means "all" */
-  if (isas == 0)
-    isas = (1 << MAX_ISAS) - 1;
-  if (endian == CGEN_ENDIAN_UNKNOWN)
-    {
-      /* ??? If target has only one, could have a default.  */
-      fprintf (stderr, "iq2000_cgen_cpu_open: no endianness specified\n");
-      abort ();
-    }
-
-  cd->isas = isas;
-  cd->machs = machs;
-  cd->endian = endian;
-  /* FIXME: for the sparc case we can determine insn-endianness statically.
-     The worry here is where both data and insn endian can be independently
-     chosen, in which case this function will need another argument.
-     Actually, will want to allow for more arguments in the future anyway.  */
-  cd->insn_endian = endian;
-
-  /* Table (re)builder.  */
-  cd->rebuild_tables = iq2000_cgen_rebuild_tables;
-  iq2000_cgen_rebuild_tables (cd);
-
-  /* Default to not allowing signed overflow.  */
-  cd->signed_overflow_ok_p = 0;
-  
-  return (CGEN_CPU_DESC) cd;
-}
-
-/* Cover fn to iq2000_cgen_cpu_open to handle the simple case of 1 isa, 1 mach.
-   MACH_NAME is the bfd name of the mach.  */
-
-CGEN_CPU_DESC
-iq2000_cgen_cpu_open_1 (mach_name, endian)
-     const char *mach_name;
-     enum cgen_endian endian;
-{
-  return iq2000_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
-			       CGEN_CPU_OPEN_ENDIAN, endian,
-			       CGEN_CPU_OPEN_END);
-}
-
-/* Close a cpu table.
-   ??? This can live in a machine independent file, but there's currently
-   no place to put this file (there's no libcgen).  libopcodes is the wrong
-   place as some simulator ports use this but they don't use libopcodes.  */
-
-void
-iq2000_cgen_cpu_close (cd)
-     CGEN_CPU_DESC cd;
-{
-  unsigned int i;
-  CGEN_INSN *insns;
-
-  if (cd->macro_insn_table.init_entries)
-    {
-      insns = cd->macro_insn_table.init_entries;
-      for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
-	{
-	  if (CGEN_INSN_RX ((insns)))
-	    regfree(CGEN_INSN_RX (insns));
-	}
-    }
-
-  if (cd->insn_table.init_entries)
-    {
-      insns = cd->insn_table.init_entries;
-      for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
-	{
-	  if (CGEN_INSN_RX (insns))
-	    regfree(CGEN_INSN_RX (insns));
-	}
-    }
-
-  
-
-  if (cd->macro_insn_table.init_entries)
-    free ((CGEN_INSN *) cd->macro_insn_table.init_entries);
-
-  if (cd->insn_table.init_entries)
-    free ((CGEN_INSN *) cd->insn_table.init_entries);
-
-  if (cd->hw_table.entries)
-    free ((CGEN_HW_ENTRY *) cd->hw_table.entries);
-
-  if (cd->operand_table.entries)
-    free ((CGEN_HW_ENTRY *) cd->operand_table.entries);
-
-  free (cd);
-}
-
diff --git a/opcodes/iq2000-desc.h b/opcodes/iq2000-desc.h
deleted file mode 100644
index 584c3ded..0000000
--- a/opcodes/iq2000-desc.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/* CPU data header for iq2000.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef IQ2000_CPU_H
-#define IQ2000_CPU_H
-
-#define CGEN_ARCH iq2000
-
-/* Given symbol S, return iq2000_cgen_<S>.  */
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define CGEN_SYM(s) iq2000##_cgen_##s
-#else
-#define CGEN_SYM(s) iq2000/**/_cgen_/**/s
-#endif
-
-
-/* Selected cpu families.  */
-#define HAVE_CPU_IQ2000BF
-#define HAVE_CPU_IQ10BF
-
-#define CGEN_INSN_LSB0_P 1
-
-/* Minimum size of any insn (in bytes).  */
-#define CGEN_MIN_INSN_SIZE 4
-
-/* Maximum size of any insn (in bytes).  */
-#define CGEN_MAX_INSN_SIZE 4
-
-#define CGEN_INT_INSN_P 1
-
-/* Maximum number of syntax elements in an instruction.  */
-#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 19
-
-/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands.
-   e.g. In "b,a foo" the ",a" is an operand.  If mnemonics have operands
-   we can't hash on everything up to the space.  */
-#define CGEN_MNEMONIC_OPERANDS
-
-/* Maximum number of fields in an instruction.  */
-#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 8
-
-/* Enums.  */
-
-/* Enum declaration for .  */
-typedef enum gr_names {
-  H_GR_R0 = 0, H_GR__0 = 0, H_GR_R1 = 1, H_GR__1 = 1
- , H_GR_R2 = 2, H_GR__2 = 2, H_GR_R3 = 3, H_GR__3 = 3
- , H_GR_R4 = 4, H_GR__4 = 4, H_GR_R5 = 5, H_GR__5 = 5
- , H_GR_R6 = 6, H_GR__6 = 6, H_GR_R7 = 7, H_GR__7 = 7
- , H_GR_R8 = 8, H_GR__8 = 8, H_GR_R9 = 9, H_GR__9 = 9
- , H_GR_R10 = 10, H_GR__10 = 10, H_GR_R11 = 11, H_GR__11 = 11
- , H_GR_R12 = 12, H_GR__12 = 12, H_GR_R13 = 13, H_GR__13 = 13
- , H_GR_R14 = 14, H_GR__14 = 14, H_GR_R15 = 15, H_GR__15 = 15
- , H_GR_R16 = 16, H_GR__16 = 16, H_GR_R17 = 17, H_GR__17 = 17
- , H_GR_R18 = 18, H_GR__18 = 18, H_GR_R19 = 19, H_GR__19 = 19
- , H_GR_R20 = 20, H_GR__20 = 20, H_GR_R21 = 21, H_GR__21 = 21
- , H_GR_R22 = 22, H_GR__22 = 22, H_GR_R23 = 23, H_GR__23 = 23
- , H_GR_R24 = 24, H_GR__24 = 24, H_GR_R25 = 25, H_GR__25 = 25
- , H_GR_R26 = 26, H_GR__26 = 26, H_GR_R27 = 27, H_GR__27 = 27
- , H_GR_R28 = 28, H_GR__28 = 28, H_GR_R29 = 29, H_GR__29 = 29
- , H_GR_R30 = 30, H_GR__30 = 30, H_GR_R31 = 31, H_GR__31 = 31
-} GR_NAMES;
-
-/* Enum declaration for primary opcodes.  */
-typedef enum opcodes {
-  OP_SPECIAL = 0, OP_REGIMM = 1, OP_J = 2, OP_JAL = 3
- , OP_BEQ = 4, OP_BNE = 5, OP_BLEZ = 6, OP_BGTZ = 7
- , OP_ADDI = 8, OP_ADDIU = 9, OP_SLTI = 10, OP_SLTIU = 11
- , OP_ANDI = 12, OP_ORI = 13, OP_XORI = 14, OP_LUI = 15
- , OP_COP0 = 16, OP_COP1 = 17, OP_COP2 = 18, OP_COP3 = 19
- , OP_BEQL = 20, OP_BNEL = 21, OP_BLEZL = 22, OP_BGTZL = 23
- , OP_BMB0 = 24, OP_BMB1 = 25, OP_BMB2 = 26, OP_BMB3 = 27
- , OP_BBI = 28, OP_BBV = 29, OP_BBIN = 30, OP_BBVN = 31
- , OP_LB = 32, OP_LH = 33, OP_LW = 35, OP_LBU = 36
- , OP_LHU = 37, OP_RAM = 39, OP_SB = 40, OP_SH = 41
- , OP_SW = 43, OP_ANDOI = 44, OP_BMB = 45, OP_ORUI = 47
- , OP_LDW = 48, OP_SDW = 56, OP_ANDOUI = 63
-} OPCODES;
-
-/* Enum declaration for iq10-only primary opcodes.  */
-typedef enum q10_opcodes {
-  OP10_BMB = 6, OP10_ORUI = 15, OP10_BMBL = 22, OP10_ANDOUI = 47
- , OP10_BBIL = 60, OP10_BBVL = 61, OP10_BBINL = 62, OP10_BBVNL = 63
-} Q10_OPCODES;
-
-/* Enum declaration for branch sub-opcodes.  */
-typedef enum regimm_functions {
-  FUNC_BLTZ = 0, FUNC_BGEZ = 1, FUNC_BLTZL = 2, FUNC_BGEZL = 3
- , FUNC_BLEZ = 4, FUNC_BGTZ = 5, FUNC_BLEZL = 6, FUNC_BGTZL = 7
- , FUNC_BRI = 8, FUNC_BRV = 9, FUNC_BCTX = 12, FUNC_BLTZAL = 16
- , FUNC_BGEZAL = 17, FUNC_BLTZALL = 18, FUNC_BGEZALL = 19, FUNC_BLEZAL = 20
- , FUNC_BGTZAL = 21, FUNC_BLEZALL = 22, FUNC_BGTZALL = 23
-} REGIMM_FUNCTIONS;
-
-/* Enum declaration for function sub-opcodes.  */
-typedef enum functions {
-  FUNC_SLL = 0, FUNC_SLMV = 1, FUNC_SRL = 2, FUNC_SRA = 3
- , FUNC_SLLV = 4, FUNC_SRMV = 5, FUNC_SRLV = 6, FUNC_SRAV = 7
- , FUNC_JR = 8, FUNC_JALR = 9, FUNC_JCR = 10, FUNC_SYSCALL = 12
- , FUNC_BREAK = 13, FUNC_SLEEP = 14, FUNC_ADD = 32, FUNC_ADDU = 33
- , FUNC_SUB = 34, FUNC_SUBU = 35, FUNC_AND = 36, FUNC_OR = 37
- , FUNC_XOR = 38, FUNC_NOR = 39, FUNC_ADO16 = 41, FUNC_SLT = 42
- , FUNC_SLTU = 43, FUNC_MRGB = 45
-} FUNCTIONS;
-
-/* Enum declaration for iq10-only special function sub-opcodes.  */
-typedef enum q10s_functions {
-  FUNC10_YIELD = 14, FUNC10_CNT1S = 46
-} Q10S_FUNCTIONS;
-
-/* Enum declaration for iq10 function sub-opcodes.  */
-typedef enum cop_functions {
-  FUNC10_CFC = 0, FUNC10_LOCK = 1, FUNC10_CTC = 2, FUNC10_UNLK = 3
- , FUNC10_SWRD = 4, FUNC10_SWRDL = 5, FUNC10_SWWR = 6, FUNC10_SWWRU = 7
- , FUNC10_RBA = 8, FUNC10_RBAL = 9, FUNC10_RBAR = 10, FUNC10_DWRD = 12
- , FUNC10_DWRDL = 13, FUNC10_WBA = 16, FUNC10_WBAU = 17, FUNC10_WBAC = 18
- , FUNC10_CRC32 = 20, FUNC10_CRC32B = 21, FUNC10_MCID = 32, FUNC10_DBD = 33
- , FUNC10_DBA = 34, FUNC10_DPWT = 35, FUNC10_AVAIL = 36, FUNC10_FREE = 37
- , FUNC10_CHKHDR = 38, FUNC10_TSTOD = 39, FUNC10_PKRLA = 40, FUNC10_PKRLAU = 41
- , FUNC10_PKRLAH = 42, FUNC10_PKRLAC = 43, FUNC10_CMPHDR = 44, FUNC10_CM64RS = 0
- , FUNC10_CM64RD = 1, FUNC10_CM64RI = 4, FUNC10_CM64CLR = 5, FUNC10_CM64SS = 8
- , FUNC10_CM64SD = 9, FUNC10_CM64SI = 12, FUNC10_CM64RA = 16, FUNC10_CM64RIA2 = 20
- , FUNC10_CM128RIA2 = 21, FUNC10_CM64SA = 24, FUNC10_CM64SIA2 = 28, FUNC10_CM128SIA2 = 29
- , FUNC10_CM32RS = 32, FUNC10_CM32RD = 33, FUNC10_CM32XOR = 34, FUNC10_CM32ANDN = 35
- , FUNC10_CM32RI = 36, FUNC10_CM128VSA = 38, FUNC10_CM32SS = 40, FUNC10_CM32SD = 41
- , FUNC10_CM32OR = 42, FUNC10_CM32AND = 43, FUNC10_CM32SI = 44, FUNC10_CM32RA = 48
- , FUNC10_CM32SA = 56
-} COP_FUNCTIONS;
-
-/* Enum declaration for iq10 function sub-opcodes.  */
-typedef enum cop_cm128_4functions {
-  FUNC10_CM128RIA3 = 4, FUNC10_CM128SIA3 = 6
-} COP_CM128_4FUNCTIONS;
-
-/* Enum declaration for iq10 function sub-opcodes.  */
-typedef enum cop_cm128_3functions {
-  FUNC10_CM128RIA4 = 6, FUNC10_CM128SIA4 = 7
-} COP_CM128_3FUNCTIONS;
-
-/* Enum declaration for iq10 coprocessor sub-opcodes.  */
-typedef enum cop2_functions {
-  FUNC10_PKRLI = 0, FUNC10_PKRLIU = 1, FUNC10_PKRLIH = 2, FUNC10_PKRLIC = 3
- , FUNC10_RBIR = 1, FUNC10_RBI = 2, FUNC10_RBIL = 3, FUNC10_WBIC = 5
- , FUNC10_WBI = 6, FUNC10_WBIU = 7
-} COP2_FUNCTIONS;
-
-/* Enum declaration for iq10 coprocessor cam sub-opcodes.  */
-typedef enum cop3_cam_functions {
-  FUNC10_CAM36 = 16, FUNC10_CAM72 = 17, FUNC10_CAM144 = 18, FUNC10_CAM288 = 19
-} COP3_CAM_FUNCTIONS;
-
-/* Attributes.  */
-
-/* Enum declaration for machine type selection.  */
-typedef enum mach_attr {
-  MACH_BASE, MACH_IQ2000, MACH_IQ10, MACH_MAX
-} MACH_ATTR;
-
-/* Enum declaration for instruction set selection.  */
-typedef enum isa_attr {
-  ISA_IQ2000, ISA_MAX
-} ISA_ATTR;
-
-/* Number of architecture variants.  */
-#define MAX_ISAS  1
-#define MAX_MACHS ((int) MACH_MAX)
-
-/* Ifield support.  */
-
-extern const struct cgen_ifld iq2000_cgen_ifld_table[];
-
-/* Ifield attribute indices.  */
-
-/* Enum declaration for cgen_ifld attrs.  */
-typedef enum cgen_ifld_attr {
-  CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED
- , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31
- , CGEN_IFLD_MACH, CGEN_IFLD_END_NBOOLS
-} CGEN_IFLD_ATTR;
-
-/* Number of non-boolean elements in cgen_ifld_attr.  */
-#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1)
-
-/* Enum declaration for iq2000 ifield types.  */
-typedef enum ifield_type {
-  IQ2000_F_NIL, IQ2000_F_ANYOF, IQ2000_F_OPCODE, IQ2000_F_RS
- , IQ2000_F_RT, IQ2000_F_RD, IQ2000_F_SHAMT, IQ2000_F_CP_OP
- , IQ2000_F_CP_OP_10, IQ2000_F_CP_GRP, IQ2000_F_FUNC, IQ2000_F_IMM
- , IQ2000_F_RD_RS, IQ2000_F_RD_RT, IQ2000_F_RT_RS, IQ2000_F_JTARG
- , IQ2000_F_JTARGQ10, IQ2000_F_OFFSET, IQ2000_F_COUNT, IQ2000_F_BYTECOUNT
- , IQ2000_F_INDEX, IQ2000_F_MASK, IQ2000_F_MASKQ10, IQ2000_F_MASKL
- , IQ2000_F_EXCODE, IQ2000_F_RSRVD, IQ2000_F_10_11, IQ2000_F_24_19
- , IQ2000_F_5, IQ2000_F_10, IQ2000_F_25, IQ2000_F_CAM_Z
- , IQ2000_F_CAM_Y, IQ2000_F_CM_3FUNC, IQ2000_F_CM_4FUNC, IQ2000_F_CM_3Z
- , IQ2000_F_CM_4Z, IQ2000_F_MAX
-} IFIELD_TYPE;
-
-#define MAX_IFLD ((int) IQ2000_F_MAX)
-
-/* Hardware attribute indices.  */
-
-/* Enum declaration for cgen_hw attrs.  */
-typedef enum cgen_hw_attr {
-  CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE
- , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS
-} CGEN_HW_ATTR;
-
-/* Number of non-boolean elements in cgen_hw_attr.  */
-#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1)
-
-/* Enum declaration for iq2000 hardware types.  */
-typedef enum cgen_hw_type {
-  HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
- , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_MAX
-} CGEN_HW_TYPE;
-
-#define MAX_HW ((int) HW_MAX)
-
-/* Operand attribute indices.  */
-
-/* Enum declaration for cgen_operand attrs.  */
-typedef enum cgen_operand_attr {
-  CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT
- , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY
- , CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_END_NBOOLS
-} CGEN_OPERAND_ATTR;
-
-/* Number of non-boolean elements in cgen_operand_attr.  */
-#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1)
-
-/* Enum declaration for iq2000 operand types.  */
-typedef enum cgen_operand_type {
-  IQ2000_OPERAND_PC, IQ2000_OPERAND_RS, IQ2000_OPERAND_RT, IQ2000_OPERAND_RD
- , IQ2000_OPERAND_RD_RS, IQ2000_OPERAND_RD_RT, IQ2000_OPERAND_RT_RS, IQ2000_OPERAND_SHAMT
- , IQ2000_OPERAND_IMM, IQ2000_OPERAND_OFFSET, IQ2000_OPERAND_BASEOFF, IQ2000_OPERAND_JMPTARG
- , IQ2000_OPERAND_MASK, IQ2000_OPERAND_MASKQ10, IQ2000_OPERAND_MASKL, IQ2000_OPERAND_COUNT
- , IQ2000_OPERAND_INDEX, IQ2000_OPERAND_EXECODE, IQ2000_OPERAND_BYTECOUNT, IQ2000_OPERAND_CAM_Y
- , IQ2000_OPERAND_CAM_Z, IQ2000_OPERAND_CM_3FUNC, IQ2000_OPERAND_CM_4FUNC, IQ2000_OPERAND_CM_3Z
- , IQ2000_OPERAND_CM_4Z, IQ2000_OPERAND_BASE, IQ2000_OPERAND_MASKR, IQ2000_OPERAND_BITNUM
- , IQ2000_OPERAND_HI16, IQ2000_OPERAND_LO16, IQ2000_OPERAND_MLO16, IQ2000_OPERAND_JMPTARGQ10
- , IQ2000_OPERAND_MAX
-} CGEN_OPERAND_TYPE;
-
-/* Number of operands types.  */
-#define MAX_OPERANDS 32
-
-/* Maximum number of operands referenced by any insn.  */
-#define MAX_OPERAND_INSTANCES 8
-
-/* Insn attribute indices.  */
-
-/* Enum declaration for cgen_insn attrs.  */
-typedef enum cgen_insn_attr {
-  CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
- , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_YIELD_INSN, CGEN_INSN_LOAD_DELAY
- , CGEN_INSN_EVEN_REG_NUM, CGEN_INSN_UNSUPPORTED, CGEN_INSN_USES_RD, CGEN_INSN_USES_RS
- , CGEN_INSN_USES_RT, CGEN_INSN_USES_R31, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31
- , CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
-} CGEN_INSN_ATTR;
-
-/* Number of non-boolean elements in cgen_insn_attr.  */
-#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1)
-
-/* cgen.h uses things we just defined.  */
-#include "opcode/cgen.h"
-
-/* Attributes.  */
-extern const CGEN_ATTR_TABLE iq2000_cgen_hardware_attr_table[];
-extern const CGEN_ATTR_TABLE iq2000_cgen_ifield_attr_table[];
-extern const CGEN_ATTR_TABLE iq2000_cgen_operand_attr_table[];
-extern const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[];
-
-/* Hardware decls.  */
-
-extern CGEN_KEYWORD iq2000_cgen_opval_gr_names;
-
-
-
-
-#endif /* IQ2000_CPU_H */
diff --git a/opcodes/iq2000-dis.c b/opcodes/iq2000-dis.c
deleted file mode 100644
index 49e0120..0000000
--- a/opcodes/iq2000-dis.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/* Disassembler interface for targets using CGEN. -*- C -*-
-   CGEN: Cpu tools GENerator
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-- the resultant file is machine generated, cgen-dis.in isn't
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* ??? Eventually more and more of this stuff can go to cpu-independent files.
-   Keep that in mind.  */
-
-#include "sysdep.h"
-#include <stdio.h>
-#include "ansidecl.h"
-#include "dis-asm.h"
-#include "bfd.h"
-#include "symcat.h"
-#include "iq2000-desc.h"
-#include "iq2000-opc.h"
-#include "opintl.h"
-
-/* Default text to print if an instruction isn't recognized.  */
-#define UNKNOWN_INSN_MSG _("*unknown*")
-
-static void print_normal
-     PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
-static void print_address
-     PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
-static void print_keyword
-     PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
-static void print_insn_normal
-     PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
-	      bfd_vma, int));
-static int print_insn
-     PARAMS ((CGEN_CPU_DESC, bfd_vma,  disassemble_info *, char *, unsigned));
-static int default_print_insn
-     PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
-static int read_insn
-     PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
-	      CGEN_EXTRACT_INFO *, unsigned long *));
-
-/* -- disassembler routines inserted here */
-
-
-void iq2000_cgen_print_operand
-  PARAMS ((CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *,
-           void const *, bfd_vma, int));
-
-/* Main entry point for printing operands.
-   XINFO is a `void *' and not a `disassemble_info *' to not put a requirement
-   of dis-asm.h on cgen.h.
-
-   This function is basically just a big switch statement.  Earlier versions
-   used tables to look up the function to use, but
-   - if the table contains both assembler and disassembler functions then
-     the disassembler contains much of the assembler and vice-versa,
-   - there's a lot of inlining possibilities as things grow,
-   - using a switch statement avoids the function call overhead.
-
-   This function could be moved into `print_insn_normal', but keeping it
-   separate makes clear the interface between `print_insn_normal' and each of
-   the handlers.  */
-
-void
-iq2000_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
-     CGEN_CPU_DESC cd;
-     int opindex;
-     PTR xinfo;
-     CGEN_FIELDS *fields;
-     void const *attrs ATTRIBUTE_UNUSED;
-     bfd_vma pc;
-     int length;
-{
- disassemble_info *info = (disassemble_info *) xinfo;
-
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rs, 0);
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      print_address (cd, info, fields->f_imm, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      print_normal (cd, info, fields->f_rt, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      print_normal (cd, info, fields->f_bytecount, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      print_normal (cd, info, fields->f_cam_y, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      print_normal (cd, info, fields->f_cam_z, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      print_normal (cd, info, fields->f_cm_3func, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      print_normal (cd, info, fields->f_cm_3z, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      print_normal (cd, info, fields->f_cm_4func, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      print_normal (cd, info, fields->f_cm_4z, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_COUNT :
-      print_normal (cd, info, fields->f_count, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      print_normal (cd, info, fields->f_excode, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_HI16 :
-      print_normal (cd, info, fields->f_imm, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_IMM :
-      print_normal (cd, info, fields->f_imm, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_INDEX :
-      print_normal (cd, info, fields->f_index, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      print_address (cd, info, fields->f_jtarg, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      print_address (cd, info, fields->f_jtargq10, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
-      break;
-    case IQ2000_OPERAND_LO16 :
-      print_normal (cd, info, fields->f_imm, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_MASK :
-      print_normal (cd, info, fields->f_mask, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_MASKL :
-      print_normal (cd, info, fields->f_maskl, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      print_normal (cd, info, fields->f_maskq10, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_MASKR :
-      print_normal (cd, info, fields->f_rs, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      print_normal (cd, info, fields->f_imm, 0, pc, length);
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      print_address (cd, info, fields->f_offset, 0|(1<<CGEN_OPERAND_PCREL_ADDR), pc, length);
-      break;
-    case IQ2000_OPERAND_RD :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rd, 0);
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rd_rs, 0|(1<<CGEN_OPERAND_VIRTUAL));
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rd_rt, 0|(1<<CGEN_OPERAND_VIRTUAL));
-      break;
-    case IQ2000_OPERAND_RS :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rs, 0);
-      break;
-    case IQ2000_OPERAND_RT :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rt, 0);
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      print_keyword (cd, info, & iq2000_cgen_opval_gr_names, fields->f_rt_rs, 0|(1<<CGEN_OPERAND_VIRTUAL));
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      print_normal (cd, info, fields->f_shamt, 0, pc, length);
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while printing insn.\n"),
-	       opindex);
-    abort ();
-  }
-}
-
-cgen_print_fn * const iq2000_cgen_print_handlers[] = 
-{
-  print_insn_normal,
-};
-
-
-void
-iq2000_cgen_init_dis (cd)
-     CGEN_CPU_DESC cd;
-{
-  iq2000_cgen_init_opcode_table (cd);
-  iq2000_cgen_init_ibld_table (cd);
-  cd->print_handlers = & iq2000_cgen_print_handlers[0];
-  cd->print_operand = iq2000_cgen_print_operand;
-}
-
-
-/* Default print handler.  */
-
-static void
-print_normal (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     PTR dis_info;
-     long value;
-     unsigned int attrs;
-     bfd_vma pc ATTRIBUTE_UNUSED;
-     int length ATTRIBUTE_UNUSED;
-{
-  disassemble_info *info = (disassemble_info *) dis_info;
-
-#ifdef CGEN_PRINT_NORMAL
-  CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
-#endif
-
-  /* Print the operand as directed by the attributes.  */
-  if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
-    ; /* nothing to do */
-  else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED))
-    (*info->fprintf_func) (info->stream, "%ld", value);
-  else
-    (*info->fprintf_func) (info->stream, "0x%lx", value);
-}
-
-/* Default address handler.  */
-
-static void
-print_address (cd, dis_info, value, attrs, pc, length)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     PTR dis_info;
-     bfd_vma value;
-     unsigned int attrs;
-     bfd_vma pc ATTRIBUTE_UNUSED;
-     int length ATTRIBUTE_UNUSED;
-{
-  disassemble_info *info = (disassemble_info *) dis_info;
-
-#ifdef CGEN_PRINT_ADDRESS
-  CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
-#endif
-
-  /* Print the operand as directed by the attributes.  */
-  if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
-    ; /* nothing to do */
-  else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_PCREL_ADDR))
-    (*info->print_address_func) (value, info);
-  else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_ABS_ADDR))
-    (*info->print_address_func) (value, info);
-  else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED))
-    (*info->fprintf_func) (info->stream, "%ld", (long) value);
-  else
-    (*info->fprintf_func) (info->stream, "0x%lx", (long) value);
-}
-
-/* Keyword print handler.  */
-
-static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     PTR dis_info;
-     CGEN_KEYWORD *keyword_table;
-     long value;
-     unsigned int attrs ATTRIBUTE_UNUSED;
-{
-  disassemble_info *info = (disassemble_info *) dis_info;
-  const CGEN_KEYWORD_ENTRY *ke;
-
-  ke = cgen_keyword_lookup_value (keyword_table, value);
-  if (ke != NULL)
-    (*info->fprintf_func) (info->stream, "%s", ke->name);
-  else
-    (*info->fprintf_func) (info->stream, "???");
-}
-
-/* Default insn printer.
-
-   DIS_INFO is defined as `PTR' so the disassembler needn't know anything
-   about disassemble_info.  */
-
-static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
-     CGEN_CPU_DESC cd;
-     PTR dis_info;
-     const CGEN_INSN *insn;
-     CGEN_FIELDS *fields;
-     bfd_vma pc;
-     int length;
-{
-  const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
-  disassemble_info *info = (disassemble_info *) dis_info;
-  const CGEN_SYNTAX_CHAR_TYPE *syn;
-
-  CGEN_INIT_PRINT (cd);
-
-  for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
-    {
-      if (CGEN_SYNTAX_MNEMONIC_P (*syn))
-	{
-	  (*info->fprintf_func) (info->stream, "%s", CGEN_INSN_MNEMONIC (insn));
-	  continue;
-	}
-      if (CGEN_SYNTAX_CHAR_P (*syn))
-	{
-	  (*info->fprintf_func) (info->stream, "%c", CGEN_SYNTAX_CHAR (*syn));
-	  continue;
-	}
-
-      /* We have an operand.  */
-      iq2000_cgen_print_operand (cd, CGEN_SYNTAX_FIELD (*syn), info,
-				 fields, CGEN_INSN_ATTRS (insn), pc, length);
-    }
-}
-
-/* Subroutine of print_insn. Reads an insn into the given buffers and updates
-   the extract info.
-   Returns 0 if all is well, non-zero otherwise.  */
-
-static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     bfd_vma pc;
-     disassemble_info *info;
-     char *buf;
-     int buflen;
-     CGEN_EXTRACT_INFO *ex_info;
-     unsigned long *insn_value;
-{
-  int status = (*info->read_memory_func) (pc, buf, buflen, info);
-  if (status != 0)
-    {
-      (*info->memory_error_func) (status, pc, info);
-      return -1;
-    }
-
-  ex_info->dis_info = info;
-  ex_info->valid = (1 << buflen) - 1;
-  ex_info->insn_bytes = buf;
-
-  *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG);
-  return 0;
-}
-
-/* Utility to print an insn.
-   BUF is the base part of the insn, target byte order, BUFLEN bytes long.
-   The result is the size of the insn in bytes or zero for an unknown insn
-   or -1 if an error occurs fetching data (memory_error_func will have
-   been called).  */
-
-static int
-print_insn (cd, pc, info, buf, buflen)
-     CGEN_CPU_DESC cd;
-     bfd_vma pc;
-     disassemble_info *info;
-     char *buf;
-     unsigned int buflen;
-{
-  CGEN_INSN_INT insn_value;
-  const CGEN_INSN_LIST *insn_list;
-  CGEN_EXTRACT_INFO ex_info;
-  int basesize;
-
-  /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
-  basesize = cd->base_insn_bitsize < buflen * 8 ?
-                                     cd->base_insn_bitsize : buflen * 8;
-  insn_value = cgen_get_insn_value (cd, buf, basesize);
-
-
-  /* Fill in ex_info fields like read_insn would.  Don't actually call
-     read_insn, since the incoming buffer is already read (and possibly
-     modified a la m32r).  */
-  ex_info.valid = (1 << buflen) - 1;
-  ex_info.dis_info = info;
-  ex_info.insn_bytes = buf;
-
-  /* The instructions are stored in hash lists.
-     Pick the first one and keep trying until we find the right one.  */
-
-  insn_list = CGEN_DIS_LOOKUP_INSN (cd, buf, insn_value);
-  while (insn_list != NULL)
-    {
-      const CGEN_INSN *insn = insn_list->insn;
-      CGEN_FIELDS fields;
-      int length;
-      unsigned long insn_value_cropped;
-
-#ifdef CGEN_VALIDATE_INSN_SUPPORTED 
-      /* Not needed as insn shouldn't be in hash lists if not supported.  */
-      /* Supported by this cpu?  */
-      if (! iq2000_cgen_insn_supported (cd, insn))
-        {
-          insn_list = CGEN_DIS_NEXT_INSN (insn_list);
-	  continue;
-        }
-#endif
-
-      /* Basic bit mask must be correct.  */
-      /* ??? May wish to allow target to defer this check until the extract
-	 handler.  */
-
-      /* Base size may exceed this instruction's size.  Extract the
-         relevant part from the buffer. */
-      if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen &&
-	  (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
-	insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn), 
-					   info->endian == BFD_ENDIAN_BIG);
-      else
-	insn_value_cropped = insn_value;
-
-      if ((insn_value_cropped & CGEN_INSN_BASE_MASK (insn))
-	  == CGEN_INSN_BASE_VALUE (insn))
-	{
-	  /* Printing is handled in two passes.  The first pass parses the
-	     machine insn and extracts the fields.  The second pass prints
-	     them.  */
-
-	  /* Make sure the entire insn is loaded into insn_value, if it
-	     can fit.  */
-	  if (((unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize) &&
-	      (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
-	    {
-	      unsigned long full_insn_value;
-	      int rc = read_insn (cd, pc, info, buf,
-				  CGEN_INSN_BITSIZE (insn) / 8,
-				  & ex_info, & full_insn_value);
-	      if (rc != 0)
-		return rc;
-	      length = CGEN_EXTRACT_FN (cd, insn)
-		(cd, insn, &ex_info, full_insn_value, &fields, pc);
-	    }
-	  else
-	    length = CGEN_EXTRACT_FN (cd, insn)
-	      (cd, insn, &ex_info, insn_value_cropped, &fields, pc);
-
-	  /* length < 0 -> error */
-	  if (length < 0)
-	    return length;
-	  if (length > 0)
-	    {
-	      CGEN_PRINT_FN (cd, insn) (cd, info, insn, &fields, pc, length);
-	      /* length is in bits, result is in bytes */
-	      return length / 8;
-	    }
-	}
-
-      insn_list = CGEN_DIS_NEXT_INSN (insn_list);
-    }
-
-  return 0;
-}
-
-/* Default value for CGEN_PRINT_INSN.
-   The result is the size of the insn in bytes or zero for an unknown insn
-   or -1 if an error occured fetching bytes.  */
-
-#ifndef CGEN_PRINT_INSN
-#define CGEN_PRINT_INSN default_print_insn
-#endif
-
-static int
-default_print_insn (cd, pc, info)
-     CGEN_CPU_DESC cd;
-     bfd_vma pc;
-     disassemble_info *info;
-{
-  char buf[CGEN_MAX_INSN_SIZE];
-  int buflen;
-  int status;
-
-  /* Attempt to read the base part of the insn.  */
-  buflen = cd->base_insn_bitsize / 8;
-  status = (*info->read_memory_func) (pc, buf, buflen, info);
-
-  /* Try again with the minimum part, if min < base.  */
-  if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize))
-    {
-      buflen = cd->min_insn_bitsize / 8;
-      status = (*info->read_memory_func) (pc, buf, buflen, info);
-    }
-
-  if (status != 0)
-    {
-      (*info->memory_error_func) (status, pc, info);
-      return -1;
-    }
-
-  return print_insn (cd, pc, info, buf, buflen);
-}
-
-/* Main entry point.
-   Print one instruction from PC on INFO->STREAM.
-   Return the size of the instruction (in bytes).  */
-
-typedef struct cpu_desc_list {
-  struct cpu_desc_list *next;
-  int isa;
-  int mach;
-  int endian;
-  CGEN_CPU_DESC cd;
-} cpu_desc_list;
-
-int
-print_insn_iq2000 (pc, info)
-     bfd_vma pc;
-     disassemble_info *info;
-{
-  static cpu_desc_list *cd_list = 0;
-  cpu_desc_list *cl = 0;
-  static CGEN_CPU_DESC cd = 0;
-  static int prev_isa;
-  static int prev_mach;
-  static int prev_endian;
-  int length;
-  int isa,mach;
-  int endian = (info->endian == BFD_ENDIAN_BIG
-		? CGEN_ENDIAN_BIG
-		: CGEN_ENDIAN_LITTLE);
-  enum bfd_architecture arch;
-
-  /* ??? gdb will set mach but leave the architecture as "unknown" */
-#ifndef CGEN_BFD_ARCH
-#define CGEN_BFD_ARCH bfd_arch_iq2000
-#endif
-  arch = info->arch;
-  if (arch == bfd_arch_unknown)
-    arch = CGEN_BFD_ARCH;
-   
-  /* There's no standard way to compute the machine or isa number
-     so we leave it to the target.  */
-#ifdef CGEN_COMPUTE_MACH
-  mach = CGEN_COMPUTE_MACH (info);
-#else
-  mach = info->mach;
-#endif
-
-#ifdef CGEN_COMPUTE_ISA
-  isa = CGEN_COMPUTE_ISA (info);
-#else
-  isa = info->insn_sets;
-#endif
-
-  /* If we've switched cpu's, try to find a handle we've used before */
-  if (cd
-      && (isa != prev_isa
-	  || mach != prev_mach
-	  || endian != prev_endian))
-    {
-      cd = 0;
-      for (cl = cd_list; cl; cl = cl->next)
-	{
-	  if (cl->isa == isa &&
-	      cl->mach == mach &&
-	      cl->endian == endian)
-	    {
-	      cd = cl->cd;
-	      break;
-	    }
-	}
-    } 
-
-  /* If we haven't initialized yet, initialize the opcode table.  */
-  if (! cd)
-    {
-      const bfd_arch_info_type *arch_type = bfd_lookup_arch (arch, mach);
-      const char *mach_name;
-
-      if (!arch_type)
-	abort ();
-      mach_name = arch_type->printable_name;
-
-      prev_isa = isa;
-      prev_mach = mach;
-      prev_endian = endian;
-      cd = iq2000_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa,
-				 CGEN_CPU_OPEN_BFDMACH, mach_name,
-				 CGEN_CPU_OPEN_ENDIAN, prev_endian,
-				 CGEN_CPU_OPEN_END);
-      if (!cd)
-	abort ();
-
-      /* save this away for future reference */
-      cl = xmalloc (sizeof (struct cpu_desc_list));
-      cl->cd = cd;
-      cl->isa = isa;
-      cl->mach = mach;
-      cl->endian = endian;
-      cl->next = cd_list;
-      cd_list = cl;
-
-      iq2000_cgen_init_dis (cd);
-    }
-
-  /* We try to have as much common code as possible.
-     But at this point some targets need to take over.  */
-  /* ??? Some targets may need a hook elsewhere.  Try to avoid this,
-     but if not possible try to move this hook elsewhere rather than
-     have two hooks.  */
-  length = CGEN_PRINT_INSN (cd, pc, info);
-  if (length > 0)
-    return length;
-  if (length < 0)
-    return -1;
-
-  (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
-  return cd->default_insn_bitsize / 8;
-}
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
deleted file mode 100644
index 5a29228..0000000
--- a/opcodes/iq2000-ibld.c
+++ /dev/null
@@ -1,1394 +0,0 @@
-/* Instruction building/extraction support for iq2000. -*- C -*-
-
-THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
-- the resultant file is machine generated, cgen-ibld.in isn't
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* ??? Eventually more and more of this stuff can go to cpu-independent files.
-   Keep that in mind.  */
-
-#include "sysdep.h"
-#include <stdio.h>
-#include "ansidecl.h"
-#include "dis-asm.h"
-#include "bfd.h"
-#include "symcat.h"
-#include "iq2000-desc.h"
-#include "iq2000-opc.h"
-#include "opintl.h"
-#include "safe-ctype.h"
-
-#undef  min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef  max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-
-/* Used by the ifield rtx function.  */
-#define FLD(f) (fields->f)
-
-static const char * insert_normal
-     PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
-	      unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
-static const char * insert_insn_normal
-     PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
-	      CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
-static int extract_normal
-     PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
-	      unsigned int, unsigned int, unsigned int, unsigned int,
-	      unsigned int, unsigned int, bfd_vma, long *));
-static int extract_insn_normal
-     PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
-	      CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
-#if CGEN_INT_INSN_P
-static void put_insn_int_value
-     PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
-#endif
-#if ! CGEN_INT_INSN_P
-static CGEN_INLINE void insert_1
-     PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
-static CGEN_INLINE int fill_cache
-     PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *,  int, int, bfd_vma));
-static CGEN_INLINE long extract_1
-     PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
-	      unsigned char *, bfd_vma));
-#endif
-
-/* Operand insertion.  */
-
-#if ! CGEN_INT_INSN_P
-
-/* Subroutine of insert_normal.  */
-
-static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
-     CGEN_CPU_DESC cd;
-     unsigned long value;
-     int start,length,word_length;
-     unsigned char *bufp;
-{
-  unsigned long x,mask;
-  int shift;
-
-  x = cgen_get_insn_value (cd, bufp, word_length);
-
-  /* Written this way to avoid undefined behaviour.  */
-  mask = (((1L << (length - 1)) - 1) << 1) | 1;
-  if (CGEN_INSN_LSB0_P)
-    shift = (start + 1) - length;
-  else
-    shift = (word_length - (start + length));
-  x = (x & ~(mask << shift)) | ((value & mask) << shift);
-
-  cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
-}
-
-#endif /* ! CGEN_INT_INSN_P */
-
-/* Default insertion routine.
-
-   ATTRS is a mask of the boolean attributes.
-   WORD_OFFSET is the offset in bits from the start of the insn of the value.
-   WORD_LENGTH is the length of the word in bits in which the value resides.
-   START is the starting bit number in the word, architecture origin.
-   LENGTH is the length of VALUE in bits.
-   TOTAL_LENGTH is the total length of the insn in bits.
-
-   The result is an error message or NULL if success.  */
-
-/* ??? This duplicates functionality with bfd's howto table and
-   bfd_install_relocation.  */
-/* ??? This doesn't handle bfd_vma's.  Create another function when
-   necessary.  */
-
-static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
-	       total_length, buffer)
-     CGEN_CPU_DESC cd;
-     long value;
-     unsigned int attrs;
-     unsigned int word_offset, start, length, word_length, total_length;
-     CGEN_INSN_BYTES_PTR buffer;
-{
-  static char errbuf[100];
-  /* Written this way to avoid undefined behaviour.  */
-  unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
-
-  /* If LENGTH is zero, this operand doesn't contribute to the value.  */
-  if (length == 0)
-    return NULL;
-
-#if 0
-  if (CGEN_INT_INSN_P
-      && word_offset != 0)
-    abort ();
-#endif
-
-  if (word_length > 32)
-    abort ();
-
-  /* For architectures with insns smaller than the base-insn-bitsize,
-     word_length may be too big.  */
-  if (cd->min_insn_bitsize < cd->base_insn_bitsize)
-    {
-      if (word_offset == 0
-	  && word_length > total_length)
-	word_length = total_length;
-    }
-
-  /* Ensure VALUE will fit.  */
-  if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
-    {
-      long minval = - (1L << (length - 1));
-      unsigned long maxval = mask;
-      
-      if ((value > 0 && (unsigned long) value > maxval)
-	  || value < minval)
-	{
-	  /* xgettext:c-format */
-	  sprintf (errbuf,
-		   _("operand out of range (%ld not between %ld and %lu)"),
-		   value, minval, maxval);
-	  return errbuf;
-	}
-    }
-  else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
-    {
-      unsigned long maxval = mask;
-      
-      if ((unsigned long) value > maxval)
-	{
-	  /* xgettext:c-format */
-	  sprintf (errbuf,
-		   _("operand out of range (%lu not between 0 and %lu)"),
-		   value, maxval);
-	  return errbuf;
-	}
-    }
-  else
-    {
-      if (! cgen_signed_overflow_ok_p (cd))
-	{
-	  long minval = - (1L << (length - 1));
-	  long maxval =   (1L << (length - 1)) - 1;
-	  
-	  if (value < minval || value > maxval)
-	    {
-	      sprintf
-		/* xgettext:c-format */
-		(errbuf, _("operand out of range (%ld not between %ld and %ld)"),
-		 value, minval, maxval);
-	      return errbuf;
-	    }
-	}
-    }
-
-#if CGEN_INT_INSN_P
-
-  {
-    int shift;
-
-    if (CGEN_INSN_LSB0_P)
-      shift = (word_offset + start + 1) - length;
-    else
-      shift = total_length - (word_offset + start + length);
-    *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
-  }
-
-#else /* ! CGEN_INT_INSN_P */
-
-  {
-    unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
-
-    insert_1 (cd, value, start, length, word_length, bufp);
-  }
-
-#endif /* ! CGEN_INT_INSN_P */
-
-  return NULL;
-}
-
-/* Default insn builder (insert handler).
-   The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
-   that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
-   recorded in host byte order, otherwise BUFFER is an array of bytes
-   and the value is recorded in target byte order).
-   The result is an error message or NULL if success.  */
-
-static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
-     CGEN_CPU_DESC cd;
-     const CGEN_INSN * insn;
-     CGEN_FIELDS * fields;
-     CGEN_INSN_BYTES_PTR buffer;
-     bfd_vma pc;
-{
-  const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
-  unsigned long value;
-  const CGEN_SYNTAX_CHAR_TYPE * syn;
-
-  CGEN_INIT_INSERT (cd);
-  value = CGEN_INSN_BASE_VALUE (insn);
-
-  /* If we're recording insns as numbers (rather than a string of bytes),
-     target byte order handling is deferred until later.  */
-
-#if CGEN_INT_INSN_P
-
-  put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
-		      CGEN_FIELDS_BITSIZE (fields), value);
-
-#else
-
-  cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
-					(unsigned) CGEN_FIELDS_BITSIZE (fields)),
-		       value);
-
-#endif /* ! CGEN_INT_INSN_P */
-
-  /* ??? It would be better to scan the format's fields.
-     Still need to be able to insert a value based on the operand though;
-     e.g. storing a branch displacement that got resolved later.
-     Needs more thought first.  */
-
-  for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
-    {
-      const char *errmsg;
-
-      if (CGEN_SYNTAX_CHAR_P (* syn))
-	continue;
-
-      errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
-				       fields, buffer, pc);
-      if (errmsg)
-	return errmsg;
-    }
-
-  return NULL;
-}
-
-#if CGEN_INT_INSN_P
-/* Cover function to store an insn value into an integral insn.  Must go here
- because it needs <prefix>-desc.h for CGEN_INT_INSN_P.  */
-
-static void
-put_insn_int_value (cd, buf, length, insn_length, value)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     CGEN_INSN_BYTES_PTR buf;
-     int length;
-     int insn_length;
-     CGEN_INSN_INT value;
-{
-  /* For architectures with insns smaller than the base-insn-bitsize,
-     length may be too big.  */
-  if (length > insn_length)
-    *buf = value;
-  else
-    {
-      int shift = insn_length - length;
-      /* Written this way to avoid undefined behaviour.  */
-      CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
-      *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
-    }
-}
-#endif
-
-/* Operand extraction.  */
-
-#if ! CGEN_INT_INSN_P
-
-/* Subroutine of extract_normal.
-   Ensure sufficient bytes are cached in EX_INFO.
-   OFFSET is the offset in bytes from the start of the insn of the value.
-   BYTES is the length of the needed value.
-   Returns 1 for success, 0 for failure.  */
-
-static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     CGEN_EXTRACT_INFO *ex_info;
-     int offset, bytes;
-     bfd_vma pc;
-{
-  /* It's doubtful that the middle part has already been fetched so
-     we don't optimize that case.  kiss.  */
-  unsigned int mask;
-  disassemble_info *info = (disassemble_info *) ex_info->dis_info;
-
-  /* First do a quick check.  */
-  mask = (1 << bytes) - 1;
-  if (((ex_info->valid >> offset) & mask) == mask)
-    return 1;
-
-  /* Search for the first byte we need to read.  */
-  for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
-    if (! (mask & ex_info->valid))
-      break;
-
-  if (bytes)
-    {
-      int status;
-
-      pc += offset;
-      status = (*info->read_memory_func)
-	(pc, ex_info->insn_bytes + offset, bytes, info);
-
-      if (status != 0)
-	{
-	  (*info->memory_error_func) (status, pc, info);
-	  return 0;
-	}
-
-      ex_info->valid |= ((1 << bytes) - 1) << offset;
-    }
-
-  return 1;
-}
-
-/* Subroutine of extract_normal.  */
-
-static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
-     CGEN_CPU_DESC cd;
-     CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
-     int start,length,word_length;
-     unsigned char *bufp;
-     bfd_vma pc ATTRIBUTE_UNUSED;
-{
-  unsigned long x;
-  int shift;
-#if 0
-  int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG;
-#endif
-  x = cgen_get_insn_value (cd, bufp, word_length);
-
-  if (CGEN_INSN_LSB0_P)
-    shift = (start + 1) - length;
-  else
-    shift = (word_length - (start + length));
-  return x >> shift;
-}
-
-#endif /* ! CGEN_INT_INSN_P */
-
-/* Default extraction routine.
-
-   INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
-   or sometimes less for cases like the m32r where the base insn size is 32
-   but some insns are 16 bits.
-   ATTRS is a mask of the boolean attributes.  We only need `SIGNED',
-   but for generality we take a bitmask of all of them.
-   WORD_OFFSET is the offset in bits from the start of the insn of the value.
-   WORD_LENGTH is the length of the word in bits in which the value resides.
-   START is the starting bit number in the word, architecture origin.
-   LENGTH is the length of VALUE in bits.
-   TOTAL_LENGTH is the total length of the insn in bits.
-
-   Returns 1 for success, 0 for failure.  */
-
-/* ??? The return code isn't properly used.  wip.  */
-
-/* ??? This doesn't handle bfd_vma's.  Create another function when
-   necessary.  */
-
-static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
-		word_length, total_length, pc, valuep)
-     CGEN_CPU_DESC cd;
-#if ! CGEN_INT_INSN_P
-     CGEN_EXTRACT_INFO *ex_info;
-#else
-     CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
-#endif
-     CGEN_INSN_INT insn_value;
-     unsigned int attrs;
-     unsigned int word_offset, start, length, word_length, total_length;
-#if ! CGEN_INT_INSN_P
-     bfd_vma pc;
-#else
-     bfd_vma pc ATTRIBUTE_UNUSED;
-#endif
-     long *valuep;
-{
-  long value, mask;
-
-  /* If LENGTH is zero, this operand doesn't contribute to the value
-     so give it a standard value of zero.  */
-  if (length == 0)
-    {
-      *valuep = 0;
-      return 1;
-    }
-
-#if 0
-  if (CGEN_INT_INSN_P
-      && word_offset != 0)
-    abort ();
-#endif
-
-  if (word_length > 32)
-    abort ();
-
-  /* For architectures with insns smaller than the insn-base-bitsize,
-     word_length may be too big.  */
-  if (cd->min_insn_bitsize < cd->base_insn_bitsize)
-    {
-      if (word_offset == 0
-	  && word_length > total_length)
-	word_length = total_length;
-    }
-
-  /* Does the value reside in INSN_VALUE, and at the right alignment?  */
-
-  if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
-    {
-      if (CGEN_INSN_LSB0_P)
-	value = insn_value >> ((word_offset + start + 1) - length);
-      else
-	value = insn_value >> (total_length - ( word_offset + start + length));
-    }
-
-#if ! CGEN_INT_INSN_P
-
-  else
-    {
-      unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
-
-      if (word_length > 32)
-	abort ();
-
-      if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
-	return 0;
-
-      value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
-    }
-
-#endif /* ! CGEN_INT_INSN_P */
-
-  /* Written this way to avoid undefined behaviour.  */
-  mask = (((1L << (length - 1)) - 1) << 1) | 1;
-
-  value &= mask;
-  /* sign extend? */
-  if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
-      && (value & (1L << (length - 1))))
-    value |= ~mask;
-
-  *valuep = value;
-
-  return 1;
-}
-
-/* Default insn extractor.
-
-   INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
-   The extracted fields are stored in FIELDS.
-   EX_INFO is used to handle reading variable length insns.
-   Return the length of the insn in bits, or 0 if no match,
-   or -1 if an error occurs fetching data (memory_error_func will have
-   been called).  */
-
-static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
-     CGEN_CPU_DESC cd;
-     const CGEN_INSN *insn;
-     CGEN_EXTRACT_INFO *ex_info;
-     CGEN_INSN_INT insn_value;
-     CGEN_FIELDS *fields;
-     bfd_vma pc;
-{
-  const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
-  const CGEN_SYNTAX_CHAR_TYPE *syn;
-
-  CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
-
-  CGEN_INIT_EXTRACT (cd);
-
-  for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
-    {
-      int length;
-
-      if (CGEN_SYNTAX_CHAR_P (*syn))
-	continue;
-
-      length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
-					ex_info, insn_value, fields, pc);
-      if (length <= 0)
-	return length;
-    }
-
-  /* We recognized and successfully extracted this insn.  */
-  return CGEN_INSN_BITSIZE (insn);
-}
-
-/* machine generated code added here */
-
-const char * iq2000_cgen_insert_operand
-  PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
-
-/* Main entry point for operand insertion.
-
-   This function is basically just a big switch statement.  Earlier versions
-   used tables to look up the function to use, but
-   - if the table contains both assembler and disassembler functions then
-     the disassembler contains much of the assembler and vice-versa,
-   - there's a lot of inlining possibilities as things grow,
-   - using a switch statement avoids the function call overhead.
-
-   This function could be moved into `parse_insn_normal', but keeping it
-   separate makes clear the interface between `parse_insn_normal' and each of
-   the handlers.  It's also needed by GAS to insert operands that couldn't be
-   resolved during parsing.  */
-
-const char *
-iq2000_cgen_insert_operand (cd, opindex, fields, buffer, pc)
-     CGEN_CPU_DESC cd;
-     int opindex;
-     CGEN_FIELDS * fields;
-     CGEN_INSN_BYTES_PTR buffer;
-     bfd_vma pc ATTRIBUTE_UNUSED;
-{
-  const char * errmsg = NULL;
-  unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
-
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      errmsg = insert_normal (cd, fields->f_bytecount, 0, 0, 7, 8, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      errmsg = insert_normal (cd, fields->f_cam_y, 0, 0, 2, 3, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      errmsg = insert_normal (cd, fields->f_cam_z, 0, 0, 5, 3, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      errmsg = insert_normal (cd, fields->f_cm_3func, 0, 0, 5, 3, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      errmsg = insert_normal (cd, fields->f_cm_3z, 0, 0, 1, 2, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      errmsg = insert_normal (cd, fields->f_cm_4func, 0, 0, 5, 4, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      errmsg = insert_normal (cd, fields->f_cm_4z, 0, 0, 2, 3, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_COUNT :
-      errmsg = insert_normal (cd, fields->f_count, 0, 0, 15, 7, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      errmsg = insert_normal (cd, fields->f_excode, 0, 0, 25, 20, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_HI16 :
-      errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_IMM :
-      errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_INDEX :
-      errmsg = insert_normal (cd, fields->f_index, 0, 0, 8, 9, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      {
-        long value = fields->f_jtarg;
-        value = ((unsigned int) (((value) & (262143))) >> (2));
-        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 15, 16, 32, total_length, buffer);
-      }
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      {
-        long value = fields->f_jtargq10;
-        value = ((unsigned int) (((value) & (8388607))) >> (2));
-        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 20, 21, 32, total_length, buffer);
-      }
-      break;
-    case IQ2000_OPERAND_LO16 :
-      errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_MASK :
-      errmsg = insert_normal (cd, fields->f_mask, 0, 0, 9, 4, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_MASKL :
-      errmsg = insert_normal (cd, fields->f_maskl, 0, 0, 4, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      errmsg = insert_normal (cd, fields->f_maskq10, 0, 0, 10, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_MASKR :
-      errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      {
-        long value = fields->f_offset;
-        value = ((int) (((value) - (pc))) >> (2));
-        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, buffer);
-      }
-      break;
-    case IQ2000_OPERAND_RD :
-      errmsg = insert_normal (cd, fields->f_rd, 0, 0, 15, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      {
-{
-  FLD (f_rd) = FLD (f_rd_rs);
-  FLD (f_rs) = FLD (f_rd_rs);
-}
-        errmsg = insert_normal (cd, fields->f_rd, 0, 0, 15, 5, 32, total_length, buffer);
-        if (errmsg)
-          break;
-        errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
-        if (errmsg)
-          break;
-      }
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      {
-{
-  FLD (f_rd) = FLD (f_rd_rt);
-  FLD (f_rt) = FLD (f_rd_rt);
-}
-        errmsg = insert_normal (cd, fields->f_rd, 0, 0, 15, 5, 32, total_length, buffer);
-        if (errmsg)
-          break;
-        errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
-        if (errmsg)
-          break;
-      }
-      break;
-    case IQ2000_OPERAND_RS :
-      errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_RT :
-      errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      {
-{
-  FLD (f_rt) = FLD (f_rt_rs);
-  FLD (f_rs) = FLD (f_rt_rs);
-}
-        errmsg = insert_normal (cd, fields->f_rt, 0, 0, 20, 5, 32, total_length, buffer);
-        if (errmsg)
-          break;
-        errmsg = insert_normal (cd, fields->f_rs, 0, 0, 25, 5, 32, total_length, buffer);
-        if (errmsg)
-          break;
-      }
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      errmsg = insert_normal (cd, fields->f_shamt, 0, 0, 10, 5, 32, total_length, buffer);
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
-	       opindex);
-      abort ();
-  }
-
-  return errmsg;
-}
-
-int iq2000_cgen_extract_operand
-  PARAMS ((CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
-           CGEN_FIELDS *, bfd_vma));
-
-/* Main entry point for operand extraction.
-   The result is <= 0 for error, >0 for success.
-   ??? Actual values aren't well defined right now.
-
-   This function is basically just a big switch statement.  Earlier versions
-   used tables to look up the function to use, but
-   - if the table contains both assembler and disassembler functions then
-     the disassembler contains much of the assembler and vice-versa,
-   - there's a lot of inlining possibilities as things grow,
-   - using a switch statement avoids the function call overhead.
-
-   This function could be moved into `print_insn_normal', but keeping it
-   separate makes clear the interface between `print_insn_normal' and each of
-   the handlers.  */
-
-int
-iq2000_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
-     CGEN_CPU_DESC cd;
-     int opindex;
-     CGEN_EXTRACT_INFO *ex_info;
-     CGEN_INSN_INT insn_value;
-     CGEN_FIELDS * fields;
-     bfd_vma pc;
-{
-  /* Assume success (for those operands that are nops).  */
-  int length = 1;
-  unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
-
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 8, 32, total_length, pc, & fields->f_bytecount);
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 32, total_length, pc, & fields->f_cam_y);
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cam_z);
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_cm_3func);
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 2, 32, total_length, pc, & fields->f_cm_3z);
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 4, 32, total_length, pc, & fields->f_cm_4func);
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 32, total_length, pc, & fields->f_cm_4z);
-      break;
-    case IQ2000_OPERAND_COUNT :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 7, 32, total_length, pc, & fields->f_count);
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 20, 32, total_length, pc, & fields->f_excode);
-      break;
-    case IQ2000_OPERAND_HI16 :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
-      break;
-    case IQ2000_OPERAND_IMM :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
-      break;
-    case IQ2000_OPERAND_INDEX :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 9, 32, total_length, pc, & fields->f_index);
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      {
-        long value;
-        length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 15, 16, 32, total_length, pc, & value);
-        value = ((((pc) & (0xf0000000))) | (((value) << (2))));
-        fields->f_jtarg = value;
-      }
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      {
-        long value;
-        length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 20, 21, 32, total_length, pc, & value);
-        value = ((((pc) & (0xf0000000))) | (((value) << (2))));
-        fields->f_jtargq10 = value;
-      }
-      break;
-    case IQ2000_OPERAND_LO16 :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
-      break;
-    case IQ2000_OPERAND_MASK :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 4, 32, total_length, pc, & fields->f_mask);
-      break;
-    case IQ2000_OPERAND_MASKL :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 5, 32, total_length, pc, & fields->f_maskl);
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 5, 32, total_length, pc, & fields->f_maskq10);
-      break;
-    case IQ2000_OPERAND_MASKR :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      {
-        long value;
-        length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, pc, & value);
-        value = ((((value) << (2))) + (((pc) + (4))));
-        fields->f_offset = value;
-      }
-      break;
-    case IQ2000_OPERAND_RD :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_rd);
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      {
-        length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_rd);
-        if (length <= 0) break;
-        length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
-        if (length <= 0) break;
-{
-  FLD (f_rd_rs) = FLD (f_rs);
-}
-      }
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      {
-        length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 5, 32, total_length, pc, & fields->f_rd);
-        if (length <= 0) break;
-        length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
-        if (length <= 0) break;
-{
-  FLD (f_rd_rt) = FLD (f_rt);
-}
-      }
-      break;
-    case IQ2000_OPERAND_RS :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
-      break;
-    case IQ2000_OPERAND_RT :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      {
-        length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 5, 32, total_length, pc, & fields->f_rt);
-        if (length <= 0) break;
-        length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 5, 32, total_length, pc, & fields->f_rs);
-        if (length <= 0) break;
-{
-  FLD (f_rd_rs) = FLD (f_rs);
-}
-      }
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 5, 32, total_length, pc, & fields->f_shamt);
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
-	       opindex);
-      abort ();
-    }
-
-  return length;
-}
-
-cgen_insert_fn * const iq2000_cgen_insert_handlers[] = 
-{
-  insert_insn_normal,
-};
-
-cgen_extract_fn * const iq2000_cgen_extract_handlers[] = 
-{
-  extract_insn_normal,
-};
-
-int iq2000_cgen_get_int_operand
-  PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
-bfd_vma iq2000_cgen_get_vma_operand
-  PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
-
-/* Getting values from cgen_fields is handled by a collection of functions.
-   They are distinguished by the type of the VALUE argument they return.
-   TODO: floating point, inlining support, remove cases where result type
-   not appropriate.  */
-
-int
-iq2000_cgen_get_int_operand (cd, opindex, fields)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     int opindex;
-     const CGEN_FIELDS * fields;
-{
-  int value;
-
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      value = fields->f_rs;
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      value = fields->f_rt;
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      value = fields->f_bytecount;
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      value = fields->f_cam_y;
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      value = fields->f_cam_z;
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      value = fields->f_cm_3func;
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      value = fields->f_cm_3z;
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      value = fields->f_cm_4func;
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      value = fields->f_cm_4z;
-      break;
-    case IQ2000_OPERAND_COUNT :
-      value = fields->f_count;
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      value = fields->f_excode;
-      break;
-    case IQ2000_OPERAND_HI16 :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_IMM :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_INDEX :
-      value = fields->f_index;
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      value = fields->f_jtarg;
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      value = fields->f_jtargq10;
-      break;
-    case IQ2000_OPERAND_LO16 :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_MASK :
-      value = fields->f_mask;
-      break;
-    case IQ2000_OPERAND_MASKL :
-      value = fields->f_maskl;
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      value = fields->f_maskq10;
-      break;
-    case IQ2000_OPERAND_MASKR :
-      value = fields->f_rs;
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      value = fields->f_offset;
-      break;
-    case IQ2000_OPERAND_RD :
-      value = fields->f_rd;
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      value = fields->f_rd_rs;
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      value = fields->f_rd_rt;
-      break;
-    case IQ2000_OPERAND_RS :
-      value = fields->f_rs;
-      break;
-    case IQ2000_OPERAND_RT :
-      value = fields->f_rt;
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      value = fields->f_rt_rs;
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      value = fields->f_shamt;
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
-		       opindex);
-      abort ();
-  }
-
-  return value;
-}
-
-bfd_vma
-iq2000_cgen_get_vma_operand (cd, opindex, fields)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     int opindex;
-     const CGEN_FIELDS * fields;
-{
-  bfd_vma value;
-
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      value = fields->f_rs;
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      value = fields->f_rt;
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      value = fields->f_bytecount;
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      value = fields->f_cam_y;
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      value = fields->f_cam_z;
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      value = fields->f_cm_3func;
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      value = fields->f_cm_3z;
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      value = fields->f_cm_4func;
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      value = fields->f_cm_4z;
-      break;
-    case IQ2000_OPERAND_COUNT :
-      value = fields->f_count;
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      value = fields->f_excode;
-      break;
-    case IQ2000_OPERAND_HI16 :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_IMM :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_INDEX :
-      value = fields->f_index;
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      value = fields->f_jtarg;
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      value = fields->f_jtargq10;
-      break;
-    case IQ2000_OPERAND_LO16 :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_MASK :
-      value = fields->f_mask;
-      break;
-    case IQ2000_OPERAND_MASKL :
-      value = fields->f_maskl;
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      value = fields->f_maskq10;
-      break;
-    case IQ2000_OPERAND_MASKR :
-      value = fields->f_rs;
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      value = fields->f_imm;
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      value = fields->f_offset;
-      break;
-    case IQ2000_OPERAND_RD :
-      value = fields->f_rd;
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      value = fields->f_rd_rs;
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      value = fields->f_rd_rt;
-      break;
-    case IQ2000_OPERAND_RS :
-      value = fields->f_rs;
-      break;
-    case IQ2000_OPERAND_RT :
-      value = fields->f_rt;
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      value = fields->f_rt_rs;
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      value = fields->f_shamt;
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
-		       opindex);
-      abort ();
-  }
-
-  return value;
-}
-
-void iq2000_cgen_set_int_operand
-  PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, int));
-void iq2000_cgen_set_vma_operand
-  PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma));
-
-/* Stuffing values in cgen_fields is handled by a collection of functions.
-   They are distinguished by the type of the VALUE argument they accept.
-   TODO: floating point, inlining support, remove cases where argument type
-   not appropriate.  */
-
-void
-iq2000_cgen_set_int_operand (cd, opindex, fields, value)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     int opindex;
-     CGEN_FIELDS * fields;
-     int value;
-{
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      fields->f_rs = value;
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      fields->f_rt = value;
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      fields->f_bytecount = value;
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      fields->f_cam_y = value;
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      fields->f_cam_z = value;
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      fields->f_cm_3func = value;
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      fields->f_cm_3z = value;
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      fields->f_cm_4func = value;
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      fields->f_cm_4z = value;
-      break;
-    case IQ2000_OPERAND_COUNT :
-      fields->f_count = value;
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      fields->f_excode = value;
-      break;
-    case IQ2000_OPERAND_HI16 :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_IMM :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_INDEX :
-      fields->f_index = value;
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      fields->f_jtarg = value;
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      fields->f_jtargq10 = value;
-      break;
-    case IQ2000_OPERAND_LO16 :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_MASK :
-      fields->f_mask = value;
-      break;
-    case IQ2000_OPERAND_MASKL :
-      fields->f_maskl = value;
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      fields->f_maskq10 = value;
-      break;
-    case IQ2000_OPERAND_MASKR :
-      fields->f_rs = value;
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      fields->f_offset = value;
-      break;
-    case IQ2000_OPERAND_RD :
-      fields->f_rd = value;
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      fields->f_rd_rs = value;
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      fields->f_rd_rt = value;
-      break;
-    case IQ2000_OPERAND_RS :
-      fields->f_rs = value;
-      break;
-    case IQ2000_OPERAND_RT :
-      fields->f_rt = value;
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      fields->f_rt_rs = value;
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      fields->f_shamt = value;
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
-		       opindex);
-      abort ();
-  }
-}
-
-void
-iq2000_cgen_set_vma_operand (cd, opindex, fields, value)
-     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-     int opindex;
-     CGEN_FIELDS * fields;
-     bfd_vma value;
-{
-  switch (opindex)
-    {
-    case IQ2000_OPERAND_BASE :
-      fields->f_rs = value;
-      break;
-    case IQ2000_OPERAND_BASEOFF :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_BITNUM :
-      fields->f_rt = value;
-      break;
-    case IQ2000_OPERAND_BYTECOUNT :
-      fields->f_bytecount = value;
-      break;
-    case IQ2000_OPERAND_CAM_Y :
-      fields->f_cam_y = value;
-      break;
-    case IQ2000_OPERAND_CAM_Z :
-      fields->f_cam_z = value;
-      break;
-    case IQ2000_OPERAND_CM_3FUNC :
-      fields->f_cm_3func = value;
-      break;
-    case IQ2000_OPERAND_CM_3Z :
-      fields->f_cm_3z = value;
-      break;
-    case IQ2000_OPERAND_CM_4FUNC :
-      fields->f_cm_4func = value;
-      break;
-    case IQ2000_OPERAND_CM_4Z :
-      fields->f_cm_4z = value;
-      break;
-    case IQ2000_OPERAND_COUNT :
-      fields->f_count = value;
-      break;
-    case IQ2000_OPERAND_EXECODE :
-      fields->f_excode = value;
-      break;
-    case IQ2000_OPERAND_HI16 :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_IMM :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_INDEX :
-      fields->f_index = value;
-      break;
-    case IQ2000_OPERAND_JMPTARG :
-      fields->f_jtarg = value;
-      break;
-    case IQ2000_OPERAND_JMPTARGQ10 :
-      fields->f_jtargq10 = value;
-      break;
-    case IQ2000_OPERAND_LO16 :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_MASK :
-      fields->f_mask = value;
-      break;
-    case IQ2000_OPERAND_MASKL :
-      fields->f_maskl = value;
-      break;
-    case IQ2000_OPERAND_MASKQ10 :
-      fields->f_maskq10 = value;
-      break;
-    case IQ2000_OPERAND_MASKR :
-      fields->f_rs = value;
-      break;
-    case IQ2000_OPERAND_MLO16 :
-      fields->f_imm = value;
-      break;
-    case IQ2000_OPERAND_OFFSET :
-      fields->f_offset = value;
-      break;
-    case IQ2000_OPERAND_RD :
-      fields->f_rd = value;
-      break;
-    case IQ2000_OPERAND_RD_RS :
-      fields->f_rd_rs = value;
-      break;
-    case IQ2000_OPERAND_RD_RT :
-      fields->f_rd_rt = value;
-      break;
-    case IQ2000_OPERAND_RS :
-      fields->f_rs = value;
-      break;
-    case IQ2000_OPERAND_RT :
-      fields->f_rt = value;
-      break;
-    case IQ2000_OPERAND_RT_RS :
-      fields->f_rt_rs = value;
-      break;
-    case IQ2000_OPERAND_SHAMT :
-      fields->f_shamt = value;
-      break;
-
-    default :
-      /* xgettext:c-format */
-      fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
-		       opindex);
-      abort ();
-  }
-}
-
-/* Function to call before using the instruction builder tables.  */
-
-void
-iq2000_cgen_init_ibld_table (cd)
-     CGEN_CPU_DESC cd;
-{
-  cd->insert_handlers = & iq2000_cgen_insert_handlers[0];
-  cd->extract_handlers = & iq2000_cgen_extract_handlers[0];
-
-  cd->insert_operand = iq2000_cgen_insert_operand;
-  cd->extract_operand = iq2000_cgen_extract_operand;
-
-  cd->get_int_operand = iq2000_cgen_get_int_operand;
-  cd->set_int_operand = iq2000_cgen_set_int_operand;
-  cd->get_vma_operand = iq2000_cgen_get_vma_operand;
-  cd->set_vma_operand = iq2000_cgen_set_vma_operand;
-}
diff --git a/opcodes/iq2000-opc.c b/opcodes/iq2000-opc.c
deleted file mode 100644
index fe8cf64..0000000
--- a/opcodes/iq2000-opc.c
+++ /dev/null
@@ -1,3482 +0,0 @@
-/* Instruction opcode table for iq2000.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "sysdep.h"
-#include "ansidecl.h"
-#include "bfd.h"
-#include "symcat.h"
-#include "iq2000-desc.h"
-#include "iq2000-opc.h"
-#include "libiberty.h"
-
-/* The hash functions are recorded here to help keep assembler code out of
-   the disassembler and vice versa.  */
-
-static int asm_hash_insn_p PARAMS ((const CGEN_INSN *));
-static unsigned int asm_hash_insn PARAMS ((const char *));
-static int dis_hash_insn_p PARAMS ((const CGEN_INSN *));
-static unsigned int dis_hash_insn PARAMS ((const char *, CGEN_INSN_INT));
-
-/* Instruction formats.  */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define F(f) & iq2000_cgen_ifld_table[IQ2000_##f]
-#else
-#define F(f) & iq2000_cgen_ifld_table[IQ2000_/**/f]
-#endif
-static const CGEN_IFMT ifmt_empty = {
-  0, 0, 0x0, { { 0 } }
-};
-
-static const CGEN_IFMT ifmt_add2 = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RT) }, { F (F_RD_RS) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_add = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_addi2 = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RT_RS) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_addi = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_ram = {
-  32, 32, 0xfc000020, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_5) }, { F (F_MASKL) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sll = {
-  32, 32, 0xffe0003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sllv2 = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RD_RT) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_slmv2 = {
-  32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RD_RT) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_slmv = {
-  32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_slti2 = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RT_RS) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_slti = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sra2 = {
-  32, 32, 0xffe0003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RD_RT) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_bbi = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_bbv = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_bgez = {
-  32, 32, 0xfc1f0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_jalr = {
-  32, 32, 0xfc1f07ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_jr = {
-  32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lb = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lui = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_break = {
-  32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_syscall = {
-  32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_EXCODE) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_andoui = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_andoui2 = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RT_RS) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_mrgb = {
-  32, 32, 0xfc00043f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_10) }, { F (F_MASK) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_mrgb2 = {
-  32, 32, 0xfc00043f, { { F (F_OPCODE) }, { F (F_RT) }, { F (F_RD_RS) }, { F (F_10) }, { F (F_MASK) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_bc0f = {
-  32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_OFFSET) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_cfc0 = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_10_11) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_chkhdr = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lulck = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_pkrlr1 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_COUNT) }, { F (F_INDEX) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_rfe = {
-  32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_25) }, { F (F_24_19) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_j = {
-  32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_RSRVD) }, { F (F_JTARG) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_mrgbq10 = {
-  32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_MASKQ10) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_mrgbq102 = {
-  32, 32, 0xfc00003f, { { F (F_OPCODE) }, { F (F_RT) }, { F (F_RD_RS) }, { F (F_MASKQ10) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_jq10 = {
-  32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_JTARG) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_jalq10 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_JTARG) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_avail = {
-  32, 32, 0xffff07ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_rbi = {
-  32, 32, 0xfc000700, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_cam36 = {
-  32, 32, 0xffe007c0, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_cm32and = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_cm32rd = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_cm128ria3 = {
-  32, 32, 0xfc0007fc, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_4FUNC) }, { F (F_CM_3Z) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_cm128ria4 = {
-  32, 32, 0xfc0007f8, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_3FUNC) }, { F (F_CM_4Z) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_ctc = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-#undef F
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_INSN_##a)
-#else
-#define A(a) (1 << CGEN_INSN_/**/a)
-#endif
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define OPERAND(op) IQ2000_OPERAND_##op
-#else
-#define OPERAND(op) IQ2000_OPERAND_/**/op
-#endif
-#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
-#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
-
-/* The instruction table.  */
-
-static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
-{
-  /* Special null first entry.
-     A `num' value of zero is thus invalid.
-     Also, the special `invalid' insn resides here.  */
-  { { 0, 0, 0, 0 }, {{0}}, 0, {0}},
-/* add ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x20 }
-  },
-/* add $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x20 }
-  },
-/* addi ${rt-rs},$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
-    & ifmt_addi2, { 0x20000000 }
-  },
-/* addi $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_addi, { 0x20000000 }
-  },
-/* addiu ${rt-rs},$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
-    & ifmt_addi2, { 0x24000000 }
-  },
-/* addiu $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_addi, { 0x24000000 }
-  },
-/* addu ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x21 }
-  },
-/* addu $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x21 }
-  },
-/* ado16 ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x29 }
-  },
-/* ado16 $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x29 }
-  },
-/* and ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x24 }
-  },
-/* and $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x24 }
-  },
-/* andi ${rt-rs},$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
-    & ifmt_addi2, { 0x30000000 }
-  },
-/* andi $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_addi, { 0x30000000 }
-  },
-/* andoi ${rt-rs},$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
-    & ifmt_addi2, { 0xb0000000 }
-  },
-/* andoi $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_addi, { 0xb0000000 }
-  },
-/* nor ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x27 }
-  },
-/* nor $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x27 }
-  },
-/* or ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x25 }
-  },
-/* or $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x25 }
-  },
-/* ori ${rt-rs},$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
-    & ifmt_addi2, { 0x34000000 }
-  },
-/* ori $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_addi, { 0x34000000 }
-  },
-/* ram $rd,$rt,$shamt,$maskl,$maskr */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), ',', OP (MASKL), ',', OP (MASKR), 0 } },
-    & ifmt_ram, { 0x9c000000 }
-  },
-/* sll $rd,$rt,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), 0 } },
-    & ifmt_sll, { 0x0 }
-  },
-/* sllv ${rd-rt},$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RT), ',', OP (RS), 0 } },
-    & ifmt_sllv2, { 0x4 }
-  },
-/* sllv $rd,$rt,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
-    & ifmt_add, { 0x4 }
-  },
-/* slmv ${rd-rt},$rs,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
-    & ifmt_slmv2, { 0x1 }
-  },
-/* slmv $rd,$rt,$rs,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
-    & ifmt_slmv, { 0x1 }
-  },
-/* slt ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x2a }
-  },
-/* slt $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x2a }
-  },
-/* slti ${rt-rs},$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (IMM), 0 } },
-    & ifmt_slti2, { 0x28000000 }
-  },
-/* slti $rt,$rs,$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
-    & ifmt_slti, { 0x28000000 }
-  },
-/* sltiu ${rt-rs},$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (IMM), 0 } },
-    & ifmt_slti2, { 0x2c000000 }
-  },
-/* sltiu $rt,$rs,$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
-    & ifmt_slti, { 0x2c000000 }
-  },
-/* sltu ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x2b }
-  },
-/* sltu $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x2b }
-  },
-/* sra ${rd-rt},$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RT), ',', OP (SHAMT), 0 } },
-    & ifmt_sra2, { 0x3 }
-  },
-/* sra $rd,$rt,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), 0 } },
-    & ifmt_sll, { 0x3 }
-  },
-/* srav ${rd-rt},$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RT), ',', OP (RS), 0 } },
-    & ifmt_sllv2, { 0x7 }
-  },
-/* srav $rd,$rt,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
-    & ifmt_add, { 0x7 }
-  },
-/* srl $rd,$rt,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (SHAMT), 0 } },
-    & ifmt_sll, { 0x2 }
-  },
-/* srlv ${rd-rt},$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RT), ',', OP (RS), 0 } },
-    & ifmt_sllv2, { 0x6 }
-  },
-/* srlv $rd,$rt,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
-    & ifmt_add, { 0x6 }
-  },
-/* srmv ${rd-rt},$rs,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
-    & ifmt_slmv2, { 0x5 }
-  },
-/* srmv $rd,$rt,$rs,$shamt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), ',', OP (SHAMT), 0 } },
-    & ifmt_slmv, { 0x5 }
-  },
-/* sub ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x22 }
-  },
-/* sub $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x22 }
-  },
-/* subu ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x23 }
-  },
-/* subu $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x23 }
-  },
-/* xor ${rd-rs},$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), 0 } },
-    & ifmt_add2, { 0x26 }
-  },
-/* xor $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x26 }
-  },
-/* xori ${rt-rs},$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (LO16), 0 } },
-    & ifmt_addi2, { 0x38000000 }
-  },
-/* xori $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_addi, { 0x38000000 }
-  },
-/* bbi $rs($bitnum),$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
-    & ifmt_bbi, { 0x70000000 }
-  },
-/* bbin $rs($bitnum),$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
-    & ifmt_bbi, { 0x78000000 }
-  },
-/* bbv $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x74000000 }
-  },
-/* bbvn $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x7c000000 }
-  },
-/* beq $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x10000000 }
-  },
-/* beql $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x50000000 }
-  },
-/* bgez $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4010000 }
-  },
-/* bgezal $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4110000 }
-  },
-/* bgezall $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4130000 }
-  },
-/* bgezl $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4030000 }
-  },
-/* bltz $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4000000 }
-  },
-/* bltzl $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4020000 }
-  },
-/* bltzal $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4100000 }
-  },
-/* bltzall $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4120000 }
-  },
-/* bmb0 $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x60000000 }
-  },
-/* bmb1 $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x64000000 }
-  },
-/* bmb2 $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x68000000 }
-  },
-/* bmb3 $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x6c000000 }
-  },
-/* bne $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x14000000 }
-  },
-/* bnel $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x54000000 }
-  },
-/* jalr $rd,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
-    & ifmt_jalr, { 0x9 }
-  },
-/* jr $rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), 0 } },
-    & ifmt_jr, { 0x8 }
-  },
-/* lb $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0x80000000 }
-  },
-/* lbu $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0x90000000 }
-  },
-/* lh $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0x84000000 }
-  },
-/* lhu $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0x94000000 }
-  },
-/* lui $rt,$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (HI16), 0 } },
-    & ifmt_lui, { 0x3c000000 }
-  },
-/* lw $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0x8c000000 }
-  },
-/* sb $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0xa0000000 }
-  },
-/* sh $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0xa4000000 }
-  },
-/* sw $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0xac000000 }
-  },
-/* break */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_break, { 0xd }
-  },
-/* syscall */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_syscall, { 0xc }
-  },
-/* andoui $rt,$rs,$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui, { 0xfc000000 }
-  },
-/* andoui ${rt-rs},$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui2, { 0xfc000000 }
-  },
-/* orui ${rt-rs},$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui2, { 0xbc000000 }
-  },
-/* orui $rt,$rs,$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui, { 0xbc000000 }
-  },
-/* bgtz $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x1c000000 }
-  },
-/* bgtzl $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x5c000000 }
-  },
-/* blez $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x18000000 }
-  },
-/* blezl $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x58000000 }
-  },
-/* mrgb $rd,$rs,$rt,$mask */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (MASK), 0 } },
-    & ifmt_mrgb, { 0x2d }
-  },
-/* mrgb ${rd-rs},$rt,$mask */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), ',', OP (MASK), 0 } },
-    & ifmt_mrgb2, { 0x2d }
-  },
-/* bctxt $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4060000 }
-  },
-/* bc0f $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x41000000 }
-  },
-/* bc0fl $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x41020000 }
-  },
-/* bc3f $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x4d000000 }
-  },
-/* bc3fl $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x4d020000 }
-  },
-/* bc0t $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x41010000 }
-  },
-/* bc0tl $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x41030000 }
-  },
-/* bc3t $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x4d010000 }
-  },
-/* bc3tl $offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (OFFSET), 0 } },
-    & ifmt_bc0f, { 0x4d030000 }
-  },
-/* cfc0 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x40400000 }
-  },
-/* cfc1 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x44400000 }
-  },
-/* cfc2 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x48400000 }
-  },
-/* cfc3 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x4c400000 }
-  },
-/* chkhdr $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4d200000 }
-  },
-/* ctc0 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x40c00000 }
-  },
-/* ctc1 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x44c00000 }
-  },
-/* ctc2 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x48c00000 }
-  },
-/* ctc3 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x4cc00000 }
-  },
-/* jcr $rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), 0 } },
-    & ifmt_jr, { 0xa }
-  },
-/* luc32 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200003 }
-  },
-/* luc32l $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200007 }
-  },
-/* luc64 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x4820000b }
-  },
-/* luc64l $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x4820000f }
-  },
-/* luk $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200008 }
-  },
-/* lulck $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_lulck, { 0x48200004 }
-  },
-/* lum32 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200002 }
-  },
-/* lum32l $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200006 }
-  },
-/* lum64 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x4820000a }
-  },
-/* lum64l $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x4820000e }
-  },
-/* lur $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200001 }
-  },
-/* lurl $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200005 }
-  },
-/* luulck $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_lulck, { 0x48200000 }
-  },
-/* mfc0 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x40000000 }
-  },
-/* mfc1 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x44000000 }
-  },
-/* mfc2 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x48000000 }
-  },
-/* mfc3 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x4c000000 }
-  },
-/* mtc0 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x40800000 }
-  },
-/* mtc1 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x44800000 }
-  },
-/* mtc2 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x48800000 }
-  },
-/* mtc3 $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_cfc0, { 0x4c800000 }
-  },
-/* pkrl $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200007 }
-  },
-/* pkrlr1 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4fa00000 }
-  },
-/* pkrlr30 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4fe00000 }
-  },
-/* rb $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200004 }
-  },
-/* rbr1 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4f000000 }
-  },
-/* rbr30 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4f400000 }
-  },
-/* rfe */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_rfe, { 0x42000010 }
-  },
-/* rx $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200006 }
-  },
-/* rxr1 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4f800000 }
-  },
-/* rxr30 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4fc00000 }
-  },
-/* sleep */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_syscall, { 0xe }
-  },
-/* srrd $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_lulck, { 0x48200010 }
-  },
-/* srrdl $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_lulck, { 0x48200014 }
-  },
-/* srulck $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_lulck, { 0x48200016 }
-  },
-/* srwr $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200011 }
-  },
-/* srwru $rt,$rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RD), 0 } },
-    & ifmt_chkhdr, { 0x48200015 }
-  },
-/* trapqfl */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_break, { 0x4c200008 }
-  },
-/* trapqne */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_break, { 0x4c200009 }
-  },
-/* traprel $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_lulck, { 0x4c20000a }
-  },
-/* wb $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200000 }
-  },
-/* wbu $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200001 }
-  },
-/* wbr1 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4e000000 }
-  },
-/* wbr1u $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4e200000 }
-  },
-/* wbr30 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4e400000 }
-  },
-/* wbr30u $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4e600000 }
-  },
-/* wx $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200002 }
-  },
-/* wxu $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c200003 }
-  },
-/* wxr1 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4e800000 }
-  },
-/* wxr1u $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4ea00000 }
-  },
-/* wxr30 $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4ec00000 }
-  },
-/* wxr30u $rt,$index,$count */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
-    & ifmt_pkrlr1, { 0x4ee00000 }
-  },
-/* ldw $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0xc0000000 }
-  },
-/* sdw $rt,$lo16($base) */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), '(', OP (BASE), ')', 0 } },
-    & ifmt_lb, { 0xe0000000 }
-  },
-/* j $jmptarg */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (JMPTARG), 0 } },
-    & ifmt_j, { 0x8000000 }
-  },
-/* jal $jmptarg */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (JMPTARG), 0 } },
-    & ifmt_j, { 0xc000000 }
-  },
-/* bmb $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0xb4000000 }
-  },
-/* andoui $rt,$rs,$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui, { 0xbc000000 }
-  },
-/* andoui ${rt-rs},$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui2, { 0xbc000000 }
-  },
-/* orui $rt,$rs,$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui, { 0x3c000000 }
-  },
-/* orui ${rt-rs},$hi16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT_RS), ',', OP (HI16), 0 } },
-    & ifmt_andoui2, { 0x3c000000 }
-  },
-/* mrgb $rd,$rs,$rt,$maskq10 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (MASKQ10), 0 } },
-    & ifmt_mrgbq10, { 0x2d }
-  },
-/* mrgb ${rd-rs},$rt,$maskq10 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD_RS), ',', OP (RT), ',', OP (MASKQ10), 0 } },
-    & ifmt_mrgbq102, { 0x2d }
-  },
-/* j $jmptarg */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (JMPTARG), 0 } },
-    & ifmt_jq10, { 0x8000000 }
-  },
-/* jal $rt,$jmptarg */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (JMPTARG), 0 } },
-    & ifmt_jalq10, { 0xc000000 }
-  },
-/* jal $jmptarg */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (JMPTARG), 0 } },
-    & ifmt_jq10, { 0xc1f0000 }
-  },
-/* bbil $rs($bitnum),$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
-    & ifmt_bbi, { 0xf0000000 }
-  },
-/* bbinl $rs($bitnum),$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), '(', OP (BITNUM), ')', ',', OP (OFFSET), 0 } },
-    & ifmt_bbi, { 0xf8000000 }
-  },
-/* bbvl $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0xf4000000 }
-  },
-/* bbvnl $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0xfc000000 }
-  },
-/* bgtzal $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4150000 }
-  },
-/* bgtzall $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4170000 }
-  },
-/* blezal $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4140000 }
-  },
-/* blezall $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4160000 }
-  },
-/* bgtz $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4050000 }
-  },
-/* bgtzl $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4070000 }
-  },
-/* blez $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4040000 }
-  },
-/* blezl $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4060000 }
-  },
-/* bmb $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x18000000 }
-  },
-/* bmbl $rs,$rt,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (OFFSET), 0 } },
-    & ifmt_bbv, { 0x58000000 }
-  },
-/* bri $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4080000 }
-  },
-/* brv $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x4090000 }
-  },
-/* bctx $rs,$offset */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (OFFSET), 0 } },
-    & ifmt_bgez, { 0x40c0000 }
-  },
-/* yield */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_break, { 0xe }
-  },
-/* crc32 $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000014 }
-  },
-/* crc32b $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000015 }
-  },
-/* cnt1s $rd,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
-    & ifmt_add, { 0x2e }
-  },
-/* avail $rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), 0 } },
-    & ifmt_avail, { 0x4c000024 }
-  },
-/* free $rd,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
-    & ifmt_jalr, { 0x4c000025 }
-  },
-/* tstod $rd,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
-    & ifmt_jalr, { 0x4c000027 }
-  },
-/* cmphdr $rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), 0 } },
-    & ifmt_avail, { 0x4c00002c }
-  },
-/* mcid $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c000020 }
-  },
-/* dba $rd */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), 0 } },
-    & ifmt_avail, { 0x4c000022 }
-  },
-/* dbd $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000021 }
-  },
-/* dpwt $rd,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
-    & ifmt_jalr, { 0x4c000023 }
-  },
-/* chkhdr $rd,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } },
-    & ifmt_jalr, { 0x4c000026 }
-  },
-/* rba $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000008 }
-  },
-/* rbal $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000009 }
-  },
-/* rbar $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c00000a }
-  },
-/* wba $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000010 }
-  },
-/* wbau $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000011 }
-  },
-/* wbac $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000012 }
-  },
-/* rbi $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x4c000200 }
-  },
-/* rbil $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x4c000300 }
-  },
-/* rbir $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x4c000100 }
-  },
-/* wbi $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x4c000600 }
-  },
-/* wbic $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x4c000500 }
-  },
-/* wbiu $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x4c000700 }
-  },
-/* pkrli $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x48000000 }
-  },
-/* pkrlih $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x48000200 }
-  },
-/* pkrliu $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x48000100 }
-  },
-/* pkrlic $rd,$rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_rbi, { 0x48000300 }
-  },
-/* pkrla $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000028 }
-  },
-/* pkrlau $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000029 }
-  },
-/* pkrlah $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c00002a }
-  },
-/* pkrlac $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c00002b }
-  },
-/* lock $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c000001 }
-  },
-/* unlk $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c000003 }
-  },
-/* swrd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c000004 }
-  },
-/* swrdl $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c000005 }
-  },
-/* swwr $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000006 }
-  },
-/* swwru $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c000007 }
-  },
-/* dwrd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c00000c }
-  },
-/* dwrdl $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c00000d }
-  },
-/* cam36 $rd,$rt,${cam-z},${cam-y} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), ',', OP (CAM_Y), 0 } },
-    & ifmt_cam36, { 0x4c000400 }
-  },
-/* cam72 $rd,$rt,${cam-y},${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Y), ',', OP (CAM_Z), 0 } },
-    & ifmt_cam36, { 0x4c000440 }
-  },
-/* cam144 $rd,$rt,${cam-y},${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Y), ',', OP (CAM_Z), 0 } },
-    & ifmt_cam36, { 0x4c000480 }
-  },
-/* cam288 $rd,$rt,${cam-y},${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Y), ',', OP (CAM_Z), 0 } },
-    & ifmt_cam36, { 0x4c0004c0 }
-  },
-/* cm32and $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000ab }
-  },
-/* cm32andn $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000a3 }
-  },
-/* cm32or $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000aa }
-  },
-/* cm32ra $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c0000b0 }
-  },
-/* cm32rd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c0000a1 }
-  },
-/* cm32ri $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c0000a4 }
-  },
-/* cm32rs $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_add, { 0x4c0000a0 }
-  },
-/* cm32sa $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000b8 }
-  },
-/* cm32sd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c0000a9 }
-  },
-/* cm32si $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c0000ac }
-  },
-/* cm32ss $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000a8 }
-  },
-/* cm32xor $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000a2 }
-  },
-/* cm64clr $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c000085 }
-  },
-/* cm64ra $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c000090 }
-  },
-/* cm64rd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c000081 }
-  },
-/* cm64ri $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c000084 }
-  },
-/* cm64ria2 $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c000094 }
-  },
-/* cm64rs $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c000080 }
-  },
-/* cm64sa $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c000098 }
-  },
-/* cm64sd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c000089 }
-  },
-/* cm64si $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_cm32rd, { 0x4c00008c }
-  },
-/* cm64sia2 $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c00009c }
-  },
-/* cm64ss $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c000088 }
-  },
-/* cm128ria2 $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c000095 }
-  },
-/* cm128ria3 $rd,$rs,$rt,${cm-3z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
-    & ifmt_cm128ria3, { 0x4c000090 }
-  },
-/* cm128ria4 $rd,$rs,$rt,${cm-4z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
-    & ifmt_cm128ria4, { 0x4c0000b0 }
-  },
-/* cm128sia2 $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c00009d }
-  },
-/* cm128sia3 $rd,$rs,$rt,${cm-3z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
-    & ifmt_cm128ria3, { 0x4c000098 }
-  },
-/* cm128sia4 $rd,$rs,$rt,${cm-4z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
-    & ifmt_cm128ria4, { 0x4c0000b8 }
-  },
-/* cm128vsa $rd,$rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_cm32and, { 0x4c0000a6 }
-  },
-/* cfc $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_chkhdr, { 0x4c000000 }
-  },
-/* ctc $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_ctc, { 0x4c000002 }
-  },
-};
-
-#undef A
-#undef OPERAND
-#undef MNEM
-#undef OP
-
-/* Formats for ALIAS macro-insns.  */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define F(f) & iq2000_cgen_ifld_table[IQ2000_##f]
-#else
-#define F(f) & iq2000_cgen_ifld_table[IQ2000_/**/f]
-#endif
-static const CGEN_IFMT ifmt_nop = {
-  32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_li = {
-  32, 32, 0xfc1f0000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_move = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lb_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lbu_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lh_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_lw_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_add = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_addu = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_and = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_j = {
-  32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_or = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_sll = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_slt = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_sltu = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_sra = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_srl = {
-  32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_not = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_subi = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_sub = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_subu = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sb_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sh_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sw_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_xor = {
-  32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_ldw_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_sdw_base_0 = {
-  32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_IMM) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_avail = {
-  32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cam36 = {
-  32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cam72 = {
-  32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cam144 = {
-  32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cam288 = {
-  32, 32, 0xffe007c7, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP_10) }, { F (F_CAM_Z) }, { F (F_CAM_Y) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32read = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64read = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32mlog = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32and = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32andn = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32or = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32ra = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32rd = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32ri = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32rs = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32sa = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32sd = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32si = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32ss = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm32xor = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64clr = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64ra = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64rd = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64ri = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64ria2 = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64rs = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64sa = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64sd = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64si = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64sia2 = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm64ss = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm128ria2 = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm128ria3 = {
-  32, 32, 0xfc00fffc, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_4FUNC) }, { F (F_CM_3Z) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm128ria4 = {
-  32, 32, 0xfc00fff8, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_3FUNC) }, { F (F_CM_4Z) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm128sia2 = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm128sia3 = {
-  32, 32, 0xfc00fffc, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_4FUNC) }, { F (F_CM_3Z) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cm128sia4 = {
-  32, 32, 0xfc00fff8, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_CP_GRP) }, { F (F_CM_3FUNC) }, { F (F_CM_4Z) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_cmphdr = {
-  32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_dbd = {
-  32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m2_dbd = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_dpwt = {
-  32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_free = {
-  32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_lock = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrla = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrlac = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrlah = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrlau = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrli = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrlic = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrlih = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_pkrliu = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_rba = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_rbal = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_rbar = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_rbi = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_rbil = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_rbir = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_swwr = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_swwru = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_tstod = {
-  32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_unlk = {
-  32, 32, 0xffe0ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_wba = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_wbac = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_wbau = {
-  32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_SHAMT) }, { F (F_FUNC) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_wbi = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_wbic = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_m_wbiu = {
-  32, 32, 0xfc00ff00, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_RD) }, { F (F_CP_OP) }, { F (F_BYTECOUNT) }, { 0 } }
-};
-
-#undef F
-
-/* Each non-simple macro entry points to an array of expansion possibilities.  */
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define A(a) (1 << CGEN_INSN_##a)
-#else
-#define A(a) (1 << CGEN_INSN_/**/a)
-#endif
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define OPERAND(op) IQ2000_OPERAND_##op
-#else
-#define OPERAND(op) IQ2000_OPERAND_/**/op
-#endif
-#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
-#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
-
-/* The macro instruction table.  */
-
-static const CGEN_IBASE iq2000_cgen_macro_insn_table[] =
-{
-/* nop */
-  {
-    -1, "nop", "nop", 32,
-    { 0|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* li $rs,$imm */
-  {
-    -1, "li", "li", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* move $rd,$rt */
-  {
-    -1, "move", "move", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* lb $rt,$lo16 */
-  {
-    -1, "lb-base-0", "lb", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* lbu $rt,$lo16 */
-  {
-    -1, "lbu-base-0", "lbu", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* lh $rt,$lo16 */
-  {
-    -1, "lh-base-0", "lh", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* lw $rt,$lo16 */
-  {
-    -1, "lw-base-0", "lw", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* add $rt,$rs,$lo16 */
-  {
-    -1, "m-add", "add", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* addu $rt,$rs,$lo16 */
-  {
-    -1, "m-addu", "addu", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* and $rt,$rs,$lo16 */
-  {
-    -1, "m-and", "and", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* j $rs */
-  {
-    -1, "m-j", "j", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* or $rt,$rs,$lo16 */
-  {
-    -1, "m-or", "or", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sll $rd,$rt,$rs */
-  {
-    -1, "m-sll", "sll", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* slt $rt,$rs,$imm */
-  {
-    -1, "m-slt", "slt", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sltu $rt,$rs,$imm */
-  {
-    -1, "m-sltu", "sltu", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sra $rd,$rt,$rs */
-  {
-    -1, "m-sra", "sra", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* srl $rd,$rt,$rs */
-  {
-    -1, "m-srl", "srl", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* not $rd,$rt */
-  {
-    -1, "not", "not", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* subi $rt,$rs,$mlo16 */
-  {
-    -1, "subi", "subi", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sub $rt,$rs,$mlo16 */
-  {
-    -1, "m-sub", "sub", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* subu $rt,$rs,$mlo16 */
-  {
-    -1, "m-subu", "subu", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sb $rt,$lo16 */
-  {
-    -1, "sb-base-0", "sb", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sh $rt,$lo16 */
-  {
-    -1, "sh-base-0", "sh", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* sw $rt,$lo16 */
-  {
-    -1, "sw-base-0", "sw", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* xor $rt,$rs,$lo16 */
-  {
-    -1, "m-xor", "xor", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_BASE) } }
-  },
-/* ldw $rt,$lo16 */
-  {
-    -1, "ldw-base-0", "ldw", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(USES_RT)|A(LOAD_DELAY)|A(EVEN_REG_NUM)|A(ALIAS), { (1<<MACH_IQ2000) } }
-  },
-/* sdw $rt,$lo16 */
-  {
-    -1, "sdw-base-0", "sdw", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(EVEN_REG_NUM)|A(ALIAS), { (1<<MACH_IQ2000) } }
-  },
-/* avail */
-  {
-    -1, "m-avail", "avail", 32,
-    { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cam36 $rd,$rt,${cam-z} */
-  {
-    -1, "m-cam36", "cam36", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cam72 $rd,$rt,${cam-z} */
-  {
-    -1, "m-cam72", "cam72", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cam144 $rd,$rt,${cam-z} */
-  {
-    -1, "m-cam144", "cam144", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cam288 $rd,$rt,${cam-z} */
-  {
-    -1, "m-cam288", "cam288", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32read $rd,$rt */
-  {
-    -1, "m-cm32read", "cm32read", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64read $rd,$rt */
-  {
-    -1, "m-cm64read", "cm64read", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32mlog $rs,$rt */
-  {
-    -1, "m-cm32mlog", "cm32mlog", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32and $rs,$rt */
-  {
-    -1, "m-cm32and", "cm32and", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32andn $rs,$rt */
-  {
-    -1, "m-cm32andn", "cm32andn", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32or $rs,$rt */
-  {
-    -1, "m-cm32or", "cm32or", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32ra $rs,$rt */
-  {
-    -1, "m-cm32ra", "cm32ra", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32rd $rt */
-  {
-    -1, "m-cm32rd", "cm32rd", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32ri $rt */
-  {
-    -1, "m-cm32ri", "cm32ri", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32rs $rs,$rt */
-  {
-    -1, "m-cm32rs", "cm32rs", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32sa $rs,$rt */
-  {
-    -1, "m-cm32sa", "cm32sa", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32sd $rt */
-  {
-    -1, "m-cm32sd", "cm32sd", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32si $rt */
-  {
-    -1, "m-cm32si", "cm32si", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32ss $rs,$rt */
-  {
-    -1, "m-cm32ss", "cm32ss", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm32xor $rs,$rt */
-  {
-    -1, "m-cm32xor", "cm32xor", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64clr $rt */
-  {
-    -1, "m-cm64clr", "cm64clr", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64ra $rs,$rt */
-  {
-    -1, "m-cm64ra", "cm64ra", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64rd $rt */
-  {
-    -1, "m-cm64rd", "cm64rd", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64ri $rt */
-  {
-    -1, "m-cm64ri", "cm64ri", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64ria2 $rs,$rt */
-  {
-    -1, "m-cm64ria2", "cm64ria2", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64rs $rs,$rt */
-  {
-    -1, "m-cm64rs", "cm64rs", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64sa $rs,$rt */
-  {
-    -1, "m-cm64sa", "cm64sa", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64sd $rt */
-  {
-    -1, "m-cm64sd", "cm64sd", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64si $rt */
-  {
-    -1, "m-cm64si", "cm64si", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64sia2 $rs,$rt */
-  {
-    -1, "m-cm64sia2", "cm64sia2", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm64ss $rs,$rt */
-  {
-    -1, "m-cm64ss", "cm64ss", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm128ria2 $rs,$rt */
-  {
-    -1, "m-cm128ria2", "cm128ria2", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm128ria3 $rs,$rt,${cm-3z} */
-  {
-    -1, "m-cm128ria3", "cm128ria3", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm128ria4 $rs,$rt,${cm-4z} */
-  {
-    -1, "m-cm128ria4", "cm128ria4", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm128sia2 $rs,$rt */
-  {
-    -1, "m-cm128sia2", "cm128sia2", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm128sia3 $rs,$rt,${cm-3z} */
-  {
-    -1, "m-cm128sia3", "cm128sia3", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cm128sia4 $rs,$rt,${cm-4z} */
-  {
-    -1, "m-cm128sia4", "cm128sia4", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* cmphdr */
-  {
-    -1, "m-cmphdr", "cmphdr", 32,
-    { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* dbd $rd,$rt */
-  {
-    -1, "m-dbd", "dbd", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* dbd $rt */
-  {
-    -1, "m2-dbd", "dbd", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* dpwt $rs */
-  {
-    -1, "m-dpwt", "dpwt", 32,
-    { 0|A(NO_DIS)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* free $rs */
-  {
-    -1, "m-free", "free", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* lock $rt */
-  {
-    -1, "m-lock", "lock", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrla $rs,$rt */
-  {
-    -1, "m-pkrla", "pkrla", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlac $rs,$rt */
-  {
-    -1, "m-pkrlac", "pkrlac", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlah $rs,$rt */
-  {
-    -1, "m-pkrlah", "pkrlah", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlau $rs,$rt */
-  {
-    -1, "m-pkrlau", "pkrlau", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrli $rs,$rt,$bytecount */
-  {
-    -1, "m-pkrli", "pkrli", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlic $rs,$rt,$bytecount */
-  {
-    -1, "m-pkrlic", "pkrlic", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrlih $rs,$rt,$bytecount */
-  {
-    -1, "m-pkrlih", "pkrlih", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* pkrliu $rs,$rt,$bytecount */
-  {
-    -1, "m-pkrliu", "pkrliu", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* rba $rs,$rt */
-  {
-    -1, "m-rba", "rba", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* rbal $rs,$rt */
-  {
-    -1, "m-rbal", "rbal", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* rbar $rs,$rt */
-  {
-    -1, "m-rbar", "rbar", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* rbi $rs,$rt,$bytecount */
-  {
-    -1, "m-rbi", "rbi", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* rbil $rs,$rt,$bytecount */
-  {
-    -1, "m-rbil", "rbil", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* rbir $rs,$rt,$bytecount */
-  {
-    -1, "m-rbir", "rbir", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* swwr $rs,$rt */
-  {
-    -1, "m-swwr", "swwr", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* swwru $rs,$rt */
-  {
-    -1, "m-swwru", "swwru", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* tstod $rs */
-  {
-    -1, "m-tstod", "tstod", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* unlk $rt */
-  {
-    -1, "m-unlk", "unlk", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* wba $rs,$rt */
-  {
-    -1, "m-wba", "wba", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* wbac $rs,$rt */
-  {
-    -1, "m-wbac", "wbac", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* wbau $rs,$rt */
-  {
-    -1, "m-wbau", "wbau", 32,
-    { 0|A(NO_DIS)|A(USES_RD)|A(USES_RT)|A(USES_RS)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* wbi $rs,$rt,$bytecount */
-  {
-    -1, "m-wbi", "wbi", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* wbic $rs,$rt,$bytecount */
-  {
-    -1, "m-wbic", "wbic", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-/* wbiu $rs,$rt,$bytecount */
-  {
-    -1, "m-wbiu", "wbiu", 32,
-    { 0|A(NO_DIS)|A(USES_RT)|A(USES_RS)|A(USES_RD)|A(ALIAS), { (1<<MACH_IQ10) } }
-  },
-};
-
-/* The macro instruction opcode table.  */
-
-static const CGEN_OPCODE iq2000_cgen_macro_insn_opcode_table[] =
-{
-/* nop */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_nop, { 0x0 }
-  },
-/* li $rs,$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (IMM), 0 } },
-    & ifmt_li, { 0x34000000 }
-  },
-/* move $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_move, { 0x25 }
-  },
-/* lb $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_lb_base_0, { 0x80000000 }
-  },
-/* lbu $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_lbu_base_0, { 0x90000000 }
-  },
-/* lh $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_lh_base_0, { 0x84000000 }
-  },
-/* lw $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_lw_base_0, { 0x8c000000 }
-  },
-/* add $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_m_add, { 0x20000000 }
-  },
-/* addu $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_m_addu, { 0x24000000 }
-  },
-/* and $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_m_and, { 0x30000000 }
-  },
-/* j $rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), 0 } },
-    & ifmt_m_j, { 0x8 }
-  },
-/* or $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_m_or, { 0x34000000 }
-  },
-/* sll $rd,$rt,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
-    & ifmt_m_sll, { 0x4 }
-  },
-/* slt $rt,$rs,$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
-    & ifmt_m_slt, { 0x28000000 }
-  },
-/* sltu $rt,$rs,$imm */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (IMM), 0 } },
-    & ifmt_m_sltu, { 0x2c000000 }
-  },
-/* sra $rd,$rt,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
-    & ifmt_m_sra, { 0x7 }
-  },
-/* srl $rd,$rt,$rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (RS), 0 } },
-    & ifmt_m_srl, { 0x6 }
-  },
-/* not $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_not, { 0x27 }
-  },
-/* subi $rt,$rs,$mlo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (MLO16), 0 } },
-    & ifmt_subi, { 0x24000000 }
-  },
-/* sub $rt,$rs,$mlo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (MLO16), 0 } },
-    & ifmt_m_sub, { 0x24000000 }
-  },
-/* subu $rt,$rs,$mlo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (MLO16), 0 } },
-    & ifmt_m_subu, { 0x24000000 }
-  },
-/* sb $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_sb_base_0, { 0xa0000000 }
-  },
-/* sh $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_sh_base_0, { 0xa4000000 }
-  },
-/* sw $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_sw_base_0, { 0xac000000 }
-  },
-/* xor $rt,$rs,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (RS), ',', OP (LO16), 0 } },
-    & ifmt_m_xor, { 0x38000000 }
-  },
-/* ldw $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_ldw_base_0, { 0xc0000000 }
-  },
-/* sdw $rt,$lo16 */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), ',', OP (LO16), 0 } },
-    & ifmt_sdw_base_0, { 0xe0000000 }
-  },
-/* avail */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_m_avail, { 0x4c000024 }
-  },
-/* cam36 $rd,$rt,${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
-    & ifmt_m_cam36, { 0x4c000400 }
-  },
-/* cam72 $rd,$rt,${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
-    & ifmt_m_cam72, { 0x4c000440 }
-  },
-/* cam144 $rd,$rt,${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
-    & ifmt_m_cam144, { 0x4c000480 }
-  },
-/* cam288 $rd,$rt,${cam-z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), ',', OP (CAM_Z), 0 } },
-    & ifmt_m_cam288, { 0x4c0004c0 }
-  },
-/* cm32read $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_m_cm32read, { 0x4c0000b0 }
-  },
-/* cm64read $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_m_cm64read, { 0x4c000090 }
-  },
-/* cm32mlog $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32mlog, { 0x4c0000aa }
-  },
-/* cm32and $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32and, { 0x4c0000ab }
-  },
-/* cm32andn $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32andn, { 0x4c0000a3 }
-  },
-/* cm32or $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32or, { 0x4c0000aa }
-  },
-/* cm32ra $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32ra, { 0x4c0000b0 }
-  },
-/* cm32rd $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm32rd, { 0x4c0000a1 }
-  },
-/* cm32ri $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm32ri, { 0x4c0000a4 }
-  },
-/* cm32rs $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32rs, { 0x4c0000a0 }
-  },
-/* cm32sa $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32sa, { 0x4c0000b8 }
-  },
-/* cm32sd $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm32sd, { 0x4c0000a9 }
-  },
-/* cm32si $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm32si, { 0x4c0000ac }
-  },
-/* cm32ss $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32ss, { 0x4c0000a8 }
-  },
-/* cm32xor $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm32xor, { 0x4c0000a2 }
-  },
-/* cm64clr $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm64clr, { 0x4c000085 }
-  },
-/* cm64ra $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm64ra, { 0x4c000090 }
-  },
-/* cm64rd $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm64rd, { 0x4c000081 }
-  },
-/* cm64ri $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm64ri, { 0x4c000084 }
-  },
-/* cm64ria2 $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm64ria2, { 0x4c000094 }
-  },
-/* cm64rs $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm64rs, { 0x4c000080 }
-  },
-/* cm64sa $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm64sa, { 0x4c000098 }
-  },
-/* cm64sd $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm64sd, { 0x4c000089 }
-  },
-/* cm64si $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_cm64si, { 0x4c00008c }
-  },
-/* cm64sia2 $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm64sia2, { 0x4c00009c }
-  },
-/* cm64ss $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm64ss, { 0x4c000088 }
-  },
-/* cm128ria2 $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm128ria2, { 0x4c000095 }
-  },
-/* cm128ria3 $rs,$rt,${cm-3z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
-    & ifmt_m_cm128ria3, { 0x4c000090 }
-  },
-/* cm128ria4 $rs,$rt,${cm-4z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
-    & ifmt_m_cm128ria4, { 0x4c0000b0 }
-  },
-/* cm128sia2 $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_cm128sia2, { 0x4c00009d }
-  },
-/* cm128sia3 $rs,$rt,${cm-3z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_3Z), 0 } },
-    & ifmt_m_cm128sia3, { 0x4c000098 }
-  },
-/* cm128sia4 $rs,$rt,${cm-4z} */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (CM_4Z), 0 } },
-    & ifmt_m_cm128sia4, { 0x4c0000b8 }
-  },
-/* cmphdr */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, 0 } },
-    & ifmt_m_cmphdr, { 0x4c00002c }
-  },
-/* dbd $rd,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
-    & ifmt_m_dbd, { 0x4c000021 }
-  },
-/* dbd $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m2_dbd, { 0x4c000021 }
-  },
-/* dpwt $rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), 0 } },
-    & ifmt_m_dpwt, { 0x4c000023 }
-  },
-/* free $rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), 0 } },
-    & ifmt_m_free, { 0x4c000025 }
-  },
-/* lock $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_lock, { 0x4c000001 }
-  },
-/* pkrla $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_pkrla, { 0x4c000028 }
-  },
-/* pkrlac $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_pkrlac, { 0x4c00002b }
-  },
-/* pkrlah $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_pkrlah, { 0x4c00002a }
-  },
-/* pkrlau $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_pkrlau, { 0x4c000029 }
-  },
-/* pkrli $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_pkrli, { 0x48000000 }
-  },
-/* pkrlic $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_pkrlic, { 0x48000300 }
-  },
-/* pkrlih $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_pkrlih, { 0x48000200 }
-  },
-/* pkrliu $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_pkrliu, { 0x48000100 }
-  },
-/* rba $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_rba, { 0x4c000008 }
-  },
-/* rbal $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_rbal, { 0x4c000009 }
-  },
-/* rbar $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_rbar, { 0x4c00000a }
-  },
-/* rbi $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_rbi, { 0x4c000200 }
-  },
-/* rbil $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_rbil, { 0x4c000300 }
-  },
-/* rbir $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_rbir, { 0x4c000100 }
-  },
-/* swwr $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_swwr, { 0x4c000006 }
-  },
-/* swwru $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_swwru, { 0x4c000007 }
-  },
-/* tstod $rs */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), 0 } },
-    & ifmt_m_tstod, { 0x4c000027 }
-  },
-/* unlk $rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RT), 0 } },
-    & ifmt_m_unlk, { 0x4c000003 }
-  },
-/* wba $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_wba, { 0x4c000010 }
-  },
-/* wbac $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_wbac, { 0x4c000012 }
-  },
-/* wbau $rs,$rt */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), 0 } },
-    & ifmt_m_wbau, { 0x4c000011 }
-  },
-/* wbi $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_wbi, { 0x4c000600 }
-  },
-/* wbic $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_wbic, { 0x4c000500 }
-  },
-/* wbiu $rs,$rt,$bytecount */
-  {
-    { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RS), ',', OP (RT), ',', OP (BYTECOUNT), 0 } },
-    & ifmt_m_wbiu, { 0x4c000700 }
-  },
-};
-
-#undef A
-#undef OPERAND
-#undef MNEM
-#undef OP
-
-#ifndef CGEN_ASM_HASH_P
-#define CGEN_ASM_HASH_P(insn) 1
-#endif
-
-#ifndef CGEN_DIS_HASH_P
-#define CGEN_DIS_HASH_P(insn) 1
-#endif
-
-/* Return non-zero if INSN is to be added to the hash table.
-   Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file.  */
-
-static int
-asm_hash_insn_p (insn)
-     const CGEN_INSN *insn ATTRIBUTE_UNUSED;
-{
-  return CGEN_ASM_HASH_P (insn);
-}
-
-static int
-dis_hash_insn_p (insn)
-     const CGEN_INSN *insn;
-{
-  /* If building the hash table and the NO-DIS attribute is present,
-     ignore.  */
-  if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
-    return 0;
-  return CGEN_DIS_HASH_P (insn);
-}
-
-#ifndef CGEN_ASM_HASH
-#define CGEN_ASM_HASH_SIZE 127
-#ifdef CGEN_MNEMONIC_OPERANDS
-#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
-#else
-#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
-#endif
-#endif
-
-/* It doesn't make much sense to provide a default here,
-   but while this is under development we do.
-   BUFFER is a pointer to the bytes of the insn, target order.
-   VALUE is the first base_insn_bitsize bits as an int in host order.  */
-
-#ifndef CGEN_DIS_HASH
-#define CGEN_DIS_HASH_SIZE 256
-#define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
-#endif
-
-/* The result is the hash value of the insn.
-   Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file.  */
-
-static unsigned int
-asm_hash_insn (mnem)
-     const char * mnem;
-{
-  return CGEN_ASM_HASH (mnem);
-}
-
-/* BUF is a pointer to the bytes of the insn, target order.
-   VALUE is the first base_insn_bitsize bits as an int in host order.  */
-
-static unsigned int
-dis_hash_insn (buf, value)
-     const char * buf ATTRIBUTE_UNUSED;
-     CGEN_INSN_INT value ATTRIBUTE_UNUSED;
-{
-  return CGEN_DIS_HASH (buf, value);
-}
-
-static void set_fields_bitsize PARAMS ((CGEN_FIELDS *, int));
-
-/* Set the recorded length of the insn in the CGEN_FIELDS struct.  */
-
-static void
-set_fields_bitsize (fields, size)
-     CGEN_FIELDS *fields;
-     int size;
-{
-  CGEN_FIELDS_BITSIZE (fields) = size;
-}
-
-/* Function to call before using the operand instance table.
-   This plugs the opcode entries and macro instructions into the cpu table.  */
-
-void
-iq2000_cgen_init_opcode_table (cd)
-     CGEN_CPU_DESC cd;
-{
-  int i;
-  int num_macros = (sizeof (iq2000_cgen_macro_insn_table) /
-		    sizeof (iq2000_cgen_macro_insn_table[0]));
-  const CGEN_IBASE *ib = & iq2000_cgen_macro_insn_table[0];
-  const CGEN_OPCODE *oc = & iq2000_cgen_macro_insn_opcode_table[0];
-  CGEN_INSN *insns = (CGEN_INSN *) xmalloc (num_macros * sizeof (CGEN_INSN));
-  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
-  for (i = 0; i < num_macros; ++i)
-    {
-      insns[i].base = &ib[i];
-      insns[i].opcode = &oc[i];
-      iq2000_cgen_build_insn_regex (& insns[i]);
-    }
-  cd->macro_insn_table.init_entries = insns;
-  cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
-  cd->macro_insn_table.num_init_entries = num_macros;
-
-  oc = & iq2000_cgen_insn_opcode_table[0];
-  insns = (CGEN_INSN *) cd->insn_table.init_entries;
-  for (i = 0; i < MAX_INSNS; ++i)
-    {
-      insns[i].opcode = &oc[i];
-      iq2000_cgen_build_insn_regex (& insns[i]);
-    }
-
-  cd->sizeof_fields = sizeof (CGEN_FIELDS);
-  cd->set_fields_bitsize = set_fields_bitsize;
-
-  cd->asm_hash_p = asm_hash_insn_p;
-  cd->asm_hash = asm_hash_insn;
-  cd->asm_hash_size = CGEN_ASM_HASH_SIZE;
-
-  cd->dis_hash_p = dis_hash_insn_p;
-  cd->dis_hash = dis_hash_insn;
-  cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
-}
diff --git a/opcodes/iq2000-opc.h b/opcodes/iq2000-opc.h
deleted file mode 100644
index 4dca525..0000000
--- a/opcodes/iq2000-opc.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* Instruction opcode header for iq2000.
-
-THIS FILE IS MACHINE GENERATED WITH CGEN.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of the GNU Binutils and/or GDB, the GNU debugger.
-
-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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef IQ2000_OPC_H
-#define IQ2000_OPC_H
-
-/* -- opc.h */
-
-/* Allows reason codes to be output when assembler errors occur.  */
-#define CGEN_VERBOSE_ASSEMBLER_ERRORS
-
-/* Override disassembly hashing - there are variable bits in the top
-   byte of these instructions.  */
-#define CGEN_DIS_HASH_SIZE 8
-#define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 6) % CGEN_DIS_HASH_SIZE)
-
-/* following activates check beyond hashing since some iq2000 and iq10
-   instructions have same mnemonics but different functionality. */
-#define CGEN_VALIDATE_INSN_SUPPORTED
-
-extern int iq2000_cgen_insn_supported (CGEN_CPU_DESC cd, CGEN_INSN *insn);
-
-/* -- asm.c */
-/* Enum declaration for iq2000 instruction types.  */
-typedef enum cgen_insn_type {
-  IQ2000_INSN_INVALID, IQ2000_INSN_ADD2, IQ2000_INSN_ADD, IQ2000_INSN_ADDI2
- , IQ2000_INSN_ADDI, IQ2000_INSN_ADDIU2, IQ2000_INSN_ADDIU, IQ2000_INSN_ADDU2
- , IQ2000_INSN_ADDU, IQ2000_INSN_ADO162, IQ2000_INSN_ADO16, IQ2000_INSN_AND2
- , IQ2000_INSN_AND, IQ2000_INSN_ANDI2, IQ2000_INSN_ANDI, IQ2000_INSN_ANDOI2
- , IQ2000_INSN_ANDOI, IQ2000_INSN_NOR2, IQ2000_INSN_NOR, IQ2000_INSN_OR2
- , IQ2000_INSN_OR, IQ2000_INSN_ORI2, IQ2000_INSN_ORI, IQ2000_INSN_RAM
- , IQ2000_INSN_SLL, IQ2000_INSN_SLLV2, IQ2000_INSN_SLLV, IQ2000_INSN_SLMV2
- , IQ2000_INSN_SLMV, IQ2000_INSN_SLT2, IQ2000_INSN_SLT, IQ2000_INSN_SLTI2
- , IQ2000_INSN_SLTI, IQ2000_INSN_SLTIU2, IQ2000_INSN_SLTIU, IQ2000_INSN_SLTU2
- , IQ2000_INSN_SLTU, IQ2000_INSN_SRA2, IQ2000_INSN_SRA, IQ2000_INSN_SRAV2
- , IQ2000_INSN_SRAV, IQ2000_INSN_SRL, IQ2000_INSN_SRLV2, IQ2000_INSN_SRLV
- , IQ2000_INSN_SRMV2, IQ2000_INSN_SRMV, IQ2000_INSN_SUB2, IQ2000_INSN_SUB
- , IQ2000_INSN_SUBU2, IQ2000_INSN_SUBU, IQ2000_INSN_XOR2, IQ2000_INSN_XOR
- , IQ2000_INSN_XORI2, IQ2000_INSN_XORI, IQ2000_INSN_BBI, IQ2000_INSN_BBIN
- , IQ2000_INSN_BBV, IQ2000_INSN_BBVN, IQ2000_INSN_BEQ, IQ2000_INSN_BEQL
- , IQ2000_INSN_BGEZ, IQ2000_INSN_BGEZAL, IQ2000_INSN_BGEZALL, IQ2000_INSN_BGEZL
- , IQ2000_INSN_BLTZ, IQ2000_INSN_BLTZL, IQ2000_INSN_BLTZAL, IQ2000_INSN_BLTZALL
- , IQ2000_INSN_BMB0, IQ2000_INSN_BMB1, IQ2000_INSN_BMB2, IQ2000_INSN_BMB3
- , IQ2000_INSN_BNE, IQ2000_INSN_BNEL, IQ2000_INSN_JALR, IQ2000_INSN_JR
- , IQ2000_INSN_LB, IQ2000_INSN_LBU, IQ2000_INSN_LH, IQ2000_INSN_LHU
- , IQ2000_INSN_LUI, IQ2000_INSN_LW, IQ2000_INSN_SB, IQ2000_INSN_SH
- , IQ2000_INSN_SW, IQ2000_INSN_BREAK, IQ2000_INSN_SYSCALL, IQ2000_INSN_ANDOUI
- , IQ2000_INSN_ANDOUI2, IQ2000_INSN_ORUI2, IQ2000_INSN_ORUI, IQ2000_INSN_BGTZ
- , IQ2000_INSN_BGTZL, IQ2000_INSN_BLEZ, IQ2000_INSN_BLEZL, IQ2000_INSN_MRGB
- , IQ2000_INSN_MRGB2, IQ2000_INSN_BCTXT, IQ2000_INSN_BC0F, IQ2000_INSN_BC0FL
- , IQ2000_INSN_BC3F, IQ2000_INSN_BC3FL, IQ2000_INSN_BC0T, IQ2000_INSN_BC0TL
- , IQ2000_INSN_BC3T, IQ2000_INSN_BC3TL, IQ2000_INSN_CFC0, IQ2000_INSN_CFC1
- , IQ2000_INSN_CFC2, IQ2000_INSN_CFC3, IQ2000_INSN_CHKHDR, IQ2000_INSN_CTC0
- , IQ2000_INSN_CTC1, IQ2000_INSN_CTC2, IQ2000_INSN_CTC3, IQ2000_INSN_JCR
- , IQ2000_INSN_LUC32, IQ2000_INSN_LUC32L, IQ2000_INSN_LUC64, IQ2000_INSN_LUC64L
- , IQ2000_INSN_LUK, IQ2000_INSN_LULCK, IQ2000_INSN_LUM32, IQ2000_INSN_LUM32L
- , IQ2000_INSN_LUM64, IQ2000_INSN_LUM64L, IQ2000_INSN_LUR, IQ2000_INSN_LURL
- , IQ2000_INSN_LUULCK, IQ2000_INSN_MFC0, IQ2000_INSN_MFC1, IQ2000_INSN_MFC2
- , IQ2000_INSN_MFC3, IQ2000_INSN_MTC0, IQ2000_INSN_MTC1, IQ2000_INSN_MTC2
- , IQ2000_INSN_MTC3, IQ2000_INSN_PKRL, IQ2000_INSN_PKRLR1, IQ2000_INSN_PKRLR30
- , IQ2000_INSN_RB, IQ2000_INSN_RBR1, IQ2000_INSN_RBR30, IQ2000_INSN_RFE
- , IQ2000_INSN_RX, IQ2000_INSN_RXR1, IQ2000_INSN_RXR30, IQ2000_INSN_SLEEP
- , IQ2000_INSN_SRRD, IQ2000_INSN_SRRDL, IQ2000_INSN_SRULCK, IQ2000_INSN_SRWR
- , IQ2000_INSN_SRWRU, IQ2000_INSN_TRAPQFL, IQ2000_INSN_TRAPQNE, IQ2000_INSN_TRAPREL
- , IQ2000_INSN_WB, IQ2000_INSN_WBU, IQ2000_INSN_WBR1, IQ2000_INSN_WBR1U
- , IQ2000_INSN_WBR30, IQ2000_INSN_WBR30U, IQ2000_INSN_WX, IQ2000_INSN_WXU
- , IQ2000_INSN_WXR1, IQ2000_INSN_WXR1U, IQ2000_INSN_WXR30, IQ2000_INSN_WXR30U
- , IQ2000_INSN_LDW, IQ2000_INSN_SDW, IQ2000_INSN_J, IQ2000_INSN_JAL
- , IQ2000_INSN_BMB, IQ2000_INSN_ANDOUI_Q10, IQ2000_INSN_ANDOUI2_Q10, IQ2000_INSN_ORUI_Q10
- , IQ2000_INSN_ORUI2_Q10, IQ2000_INSN_MRGBQ10, IQ2000_INSN_MRGBQ102, IQ2000_INSN_JQ10
- , IQ2000_INSN_JALQ10, IQ2000_INSN_JALQ10_2, IQ2000_INSN_BBIL, IQ2000_INSN_BBINL
- , IQ2000_INSN_BBVL, IQ2000_INSN_BBVNL, IQ2000_INSN_BGTZAL, IQ2000_INSN_BGTZALL
- , IQ2000_INSN_BLEZAL, IQ2000_INSN_BLEZALL, IQ2000_INSN_BGTZ_Q10, IQ2000_INSN_BGTZL_Q10
- , IQ2000_INSN_BLEZ_Q10, IQ2000_INSN_BLEZL_Q10, IQ2000_INSN_BMB_Q10, IQ2000_INSN_BMBL
- , IQ2000_INSN_BRI, IQ2000_INSN_BRV, IQ2000_INSN_BCTX, IQ2000_INSN_YIELD
- , IQ2000_INSN_CRC32, IQ2000_INSN_CRC32B, IQ2000_INSN_CNT1S, IQ2000_INSN_AVAIL
- , IQ2000_INSN_FREE, IQ2000_INSN_TSTOD, IQ2000_INSN_CMPHDR, IQ2000_INSN_MCID
- , IQ2000_INSN_DBA, IQ2000_INSN_DBD, IQ2000_INSN_DPWT, IQ2000_INSN_CHKHDRQ10
- , IQ2000_INSN_RBA, IQ2000_INSN_RBAL, IQ2000_INSN_RBAR, IQ2000_INSN_WBA
- , IQ2000_INSN_WBAU, IQ2000_INSN_WBAC, IQ2000_INSN_RBI, IQ2000_INSN_RBIL
- , IQ2000_INSN_RBIR, IQ2000_INSN_WBI, IQ2000_INSN_WBIC, IQ2000_INSN_WBIU
- , IQ2000_INSN_PKRLI, IQ2000_INSN_PKRLIH, IQ2000_INSN_PKRLIU, IQ2000_INSN_PKRLIC
- , IQ2000_INSN_PKRLA, IQ2000_INSN_PKRLAU, IQ2000_INSN_PKRLAH, IQ2000_INSN_PKRLAC
- , IQ2000_INSN_LOCK, IQ2000_INSN_UNLK, IQ2000_INSN_SWRD, IQ2000_INSN_SWRDL
- , IQ2000_INSN_SWWR, IQ2000_INSN_SWWRU, IQ2000_INSN_DWRD, IQ2000_INSN_DWRDL
- , IQ2000_INSN_CAM36, IQ2000_INSN_CAM72, IQ2000_INSN_CAM144, IQ2000_INSN_CAM288
- , IQ2000_INSN_CM32AND, IQ2000_INSN_CM32ANDN, IQ2000_INSN_CM32OR, IQ2000_INSN_CM32RA
- , IQ2000_INSN_CM32RD, IQ2000_INSN_CM32RI, IQ2000_INSN_CM32RS, IQ2000_INSN_CM32SA
- , IQ2000_INSN_CM32SD, IQ2000_INSN_CM32SI, IQ2000_INSN_CM32SS, IQ2000_INSN_CM32XOR
- , IQ2000_INSN_CM64CLR, IQ2000_INSN_CM64RA, IQ2000_INSN_CM64RD, IQ2000_INSN_CM64RI
- , IQ2000_INSN_CM64RIA2, IQ2000_INSN_CM64RS, IQ2000_INSN_CM64SA, IQ2000_INSN_CM64SD
- , IQ2000_INSN_CM64SI, IQ2000_INSN_CM64SIA2, IQ2000_INSN_CM64SS, IQ2000_INSN_CM128RIA2
- , IQ2000_INSN_CM128RIA3, IQ2000_INSN_CM128RIA4, IQ2000_INSN_CM128SIA2, IQ2000_INSN_CM128SIA3
- , IQ2000_INSN_CM128SIA4, IQ2000_INSN_CM128VSA, IQ2000_INSN_CFC, IQ2000_INSN_CTC
-} CGEN_INSN_TYPE;
-
-/* Index of `invalid' insn place holder.  */
-#define CGEN_INSN_INVALID IQ2000_INSN_INVALID
-
-/* Total number of insns in table.  */
-#define MAX_INSNS ((int) IQ2000_INSN_CTC + 1)
-
-/* This struct records data prior to insertion or after extraction.  */
-struct cgen_fields
-{
-  int length;
-  long f_nil;
-  long f_anyof;
-  long f_opcode;
-  long f_rs;
-  long f_rt;
-  long f_rd;
-  long f_shamt;
-  long f_cp_op;
-  long f_cp_op_10;
-  long f_cp_grp;
-  long f_func;
-  long f_imm;
-  long f_rd_rs;
-  long f_rd_rt;
-  long f_rt_rs;
-  long f_jtarg;
-  long f_jtargq10;
-  long f_offset;
-  long f_count;
-  long f_bytecount;
-  long f_index;
-  long f_mask;
-  long f_maskq10;
-  long f_maskl;
-  long f_excode;
-  long f_rsrvd;
-  long f_10_11;
-  long f_24_19;
-  long f_5;
-  long f_10;
-  long f_25;
-  long f_cam_z;
-  long f_cam_y;
-  long f_cm_3func;
-  long f_cm_4func;
-  long f_cm_3z;
-  long f_cm_4z;
-};
-
-#define CGEN_INIT_PARSE(od) \
-{\
-}
-#define CGEN_INIT_INSERT(od) \
-{\
-}
-#define CGEN_INIT_EXTRACT(od) \
-{\
-}
-#define CGEN_INIT_PRINT(od) \
-{\
-}
-
-
-#endif /* IQ2000_OPC_H */
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 176ffeb..d8862f7 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -1,6 +1,6 @@
 /* Print mips instructions for GDB, the GNU debugger, or for objdump.
    Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp).
 
@@ -22,7 +22,6 @@
 
 #include "sysdep.h"
 #include "dis-asm.h"
-#include "libiberty.h"
 #include "opcode/mips.h"
 #include "opintl.h"
 
@@ -40,18 +39,14 @@
 /* Mips instructions are at maximum this many bytes long.  */
 #define INSNLEN 4
 
-static void set_default_mips_dis_options
-  PARAMS ((struct disassemble_info *));
-static void parse_mips_dis_option
-  PARAMS ((const char *, unsigned int));
-static void parse_mips_dis_options
-  PARAMS ((const char *));
 static int _print_insn_mips
   PARAMS ((bfd_vma, struct disassemble_info *, enum bfd_endian));
 static int print_insn_mips
   PARAMS ((bfd_vma, unsigned long int, struct disassemble_info *));
-static void print_insn_args
+static void print_insn_arg
   PARAMS ((const char *, unsigned long, bfd_vma, struct disassemble_info *));
+static void mips_isa_type
+  PARAMS ((int, int *, int *));
 static int print_insn_mips16
   PARAMS ((bfd_vma, struct disassemble_info *));
 static int is_newabi
@@ -62,948 +57,417 @@
 
 /* FIXME: These should be shared with gdb somehow.  */
 
-struct mips_cp0sel_name {
-	unsigned int cp0reg;
-	unsigned int sel;
-	const char * const name;
-};
-
 /* The mips16 register names.  */
 static const char * const mips16_reg_names[] = {
   "s0", "s1", "v0", "v1", "a0", "a1", "a2", "a3"
 };
 
-static const char * const mips_gpr_names_numeric[32] = {
-  "$0",   "$1",   "$2",   "$3",   "$4",   "$5",   "$6",   "$7",
-  "$8",   "$9",   "$10",  "$11",  "$12",  "$13",  "$14",  "$15",
-  "$16",  "$17",  "$18",  "$19",  "$20",  "$21",  "$22",  "$23",
-  "$24",  "$25",  "$26",  "$27",  "$28",  "$29",  "$30",  "$31"
+static const char * const mips32_reg_names[] = {
+  "zero", "at",	  "v0",	 "v1",	 "a0",	  "a1",	   "a2",   "a3",
+  "t0",	  "t1",	  "t2",	 "t3",	 "t4",	  "t5",	   "t6",   "t7",
+  "s0",	  "s1",	  "s2",	 "s3",	 "s4",	  "s5",	   "s6",   "s7",
+  "t8",	  "t9",	  "k0",	 "k1",	 "gp",	  "sp",	   "s8",   "ra",
+  "sr",	  "lo",	  "hi",	 "bad",	 "cause", "pc",
+  "fv0",  "$f1",  "fv1", "$f3",  "ft0",   "$f5",   "ft1",  "$f7",
+  "ft2",  "$f9",  "ft3", "$f11", "fa0",   "$f13",  "fa1",  "$f15",
+  "ft4",  "f17",  "ft5", "f19",  "fs0",   "f21",   "fs1",  "f23",
+  "fs2",  "$f25", "fs3", "$f27", "fs4",   "$f29",  "fs5",  "$f31",
+  "fsr",  "fir",  "fp",  "inx",  "rand",  "tlblo", "ctxt", "tlbhi",
+  "epc",  "prid"
 };
 
-static const char * const mips_gpr_names_oldabi[32] = {
-  "zero", "at",   "v0",   "v1",   "a0",   "a1",   "a2",   "a3",
-  "t0",   "t1",   "t2",   "t3",   "t4",   "t5",   "t6",   "t7",
-  "s0",   "s1",   "s2",   "s3",   "s4",   "s5",   "s6",   "s7",
-  "t8",   "t9",   "k0",   "k1",   "gp",   "sp",   "s8",   "ra"
+static const char * const mips64_reg_names[] = {
+  "zero", "at",	  "v0",	  "v1",	  "a0",	   "a1",    "a2",   "a3",
+  "a4",	  "a5",	  "a6",   "a7",	  "t0",	   "t1",    "t2",   "t3",
+  "s0",	  "s1",	  "s2",	  "s3",	  "s4",	   "s5",    "s6",   "s7",
+  "t8",	  "t9",	  "k0",	  "k1",	  "gp",	   "sp",    "s8",   "ra",
+  "sr",	  "lo",	  "hi",	  "bad",  "cause", "pc",
+  "fv0",  "$f1",  "fv1",  "$f3",  "ft0",   "ft1",   "ft2",  "ft3",
+  "ft4",  "ft5",  "ft6",  "ft7",  "fa0",   "fa1",   "fa2",  "fa3",
+  "fa4",  "fa5",  "fa6",  "fa7",  "ft8",   "ft9",   "ft10", "ft11",
+  "fs0",  "fs1",  "fs2",  "fs3",  "fs4",   "fs5",   "fs6",  "fs7",
+  "fsr",  "fir",  "fp",   "inx",  "rand",  "tlblo", "ctxt", "tlbhi",
+  "epc",  "prid"
 };
 
-static const char * const mips_gpr_names_newabi[32] = {
-  "zero", "at",   "v0",   "v1",   "a0",   "a1",   "a2",   "a3",
-  "a4",   "a5",   "a6",   "a7",   "t0",   "t1",   "t2",   "t3",
-  "s0",   "s1",   "s2",   "s3",   "s4",   "s5",   "s6",   "s7",
-  "t8",   "t9",   "k0",   "k1",   "gp",   "sp",   "s8",   "ra"
-};
-
-static const char * const mips_fpr_names_numeric[32] = {
-  "$f0",  "$f1",  "$f2",  "$f3",  "$f4",  "$f5",  "$f6",  "$f7",
-  "$f8",  "$f9",  "$f10", "$f11", "$f12", "$f13", "$f14", "$f15",
-  "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",
-  "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "$f31"
-};
-
-static const char * const mips_fpr_names_32[32] = {
-  "fv0",  "fv0f", "fv1",  "fv1f", "ft0",  "ft0f", "ft1",  "ft1f",
-  "ft2",  "ft2f", "ft3",  "ft3f", "fa0",  "fa0f", "fa1",  "fa1f",
-  "ft4",  "ft4f", "ft5",  "ft5f", "fs0",  "fs0f", "fs1",  "fs1f",
-  "fs2",  "fs2f", "fs3",  "fs3f", "fs4",  "fs4f", "fs5",  "fs5f"
-};
-
-static const char * const mips_fpr_names_n32[32] = {
-  "fv0",  "ft14", "fv1",  "ft15", "ft0",  "ft1",  "ft2",  "ft3",
-  "ft4",  "ft5",  "ft6",  "ft7",  "fa0",  "fa1",  "fa2",  "fa3",
-  "fa4",  "fa5",  "fa6",  "fa7",  "fs0",  "ft8",  "fs1",  "ft9",
-  "fs2",  "ft10", "fs3",  "ft11", "fs4",  "ft12", "fs5",  "ft13"
-};
-
-static const char * const mips_fpr_names_64[32] = {
-  "fv0",  "ft12", "fv1",  "ft13", "ft0",  "ft1",  "ft2",  "ft3",
-  "ft4",  "ft5",  "ft6",  "ft7",  "fa0",  "fa1",  "fa2",  "fa3",
-  "fa4",  "fa5",  "fa6",  "fa7",  "ft8",  "ft9",  "ft10", "ft11",
-  "fs0",  "fs1",  "fs2",  "fs3",  "fs4",  "fs5",  "fs6",  "fs7"
-};
-
-static const char * const mips_cp0_names_numeric[32] = {
-  "$0",   "$1",   "$2",   "$3",   "$4",   "$5",   "$6",   "$7",
-  "$8",   "$9",   "$10",  "$11",  "$12",  "$13",  "$14",  "$15",
-  "$16",  "$17",  "$18",  "$19",  "$20",  "$21",  "$22",  "$23",
-  "$24",  "$25",  "$26",  "$27",  "$28",  "$29",  "$30",  "$31"
-};
-
-static const char * const mips_cp0_names_mips3264[32] = {
-  "c0_index",     "c0_random",    "c0_entrylo0",  "c0_entrylo1",
-  "c0_context",   "c0_pagemask",  "c0_wired",     "$7",
-  "c0_badvaddr",  "c0_count",     "c0_entryhi",   "c0_compare",
-  "c0_status",    "c0_cause",     "c0_epc",       "c0_prid",
-  "c0_config",    "c0_lladdr",    "c0_watchlo",   "c0_watchhi",
-  "c0_xcontext",  "$21",          "$22",          "c0_debug",
-  "c0_depc",      "c0_perfcnt",   "c0_errctl",    "c0_cacheerr",
-  "c0_taglo",     "c0_taghi",     "c0_errorepc",  "c0_desave",
-};
-
-static const struct mips_cp0sel_name mips_cp0sel_names_mips3264[] = {
-  { 16, 1, "c0_config1"		},
-  { 16, 2, "c0_config2"		},
-  { 16, 3, "c0_config3"		},
-  { 18, 1, "c0_watchlo,1"	},
-  { 18, 2, "c0_watchlo,2"	},
-  { 18, 3, "c0_watchlo,3"	},
-  { 18, 4, "c0_watchlo,4"	},
-  { 18, 5, "c0_watchlo,5"	},
-  { 18, 6, "c0_watchlo,6"	},
-  { 18, 7, "c0_watchlo,7"	},
-  { 19, 1, "c0_watchhi,1"	},
-  { 19, 2, "c0_watchhi,2"	},
-  { 19, 3, "c0_watchhi,3"	},
-  { 19, 4, "c0_watchhi,4"	},
-  { 19, 5, "c0_watchhi,5"	},
-  { 19, 6, "c0_watchhi,6"	},
-  { 19, 7, "c0_watchhi,7"	},
-  { 25, 1, "c0_perfcnt,1"	},
-  { 25, 2, "c0_perfcnt,2"	},
-  { 25, 3, "c0_perfcnt,3"	},
-  { 25, 4, "c0_perfcnt,4"	},
-  { 25, 5, "c0_perfcnt,5"	},
-  { 25, 6, "c0_perfcnt,6"	},
-  { 25, 7, "c0_perfcnt,7"	},
-  { 27, 1, "c0_cacheerr,1"	},
-  { 27, 2, "c0_cacheerr,2"	},
-  { 27, 3, "c0_cacheerr,3"	},
-  { 28, 1, "c0_datalo"		},
-  { 29, 1, "c0_datahi"		}
-};
-
-static const char * const mips_cp0_names_mips3264r2[32] = {
-  "c0_index",     "c0_random",    "c0_entrylo0",  "c0_entrylo1",
-  "c0_context",   "c0_pagemask",  "c0_wired",     "c0_hwrena",
-  "c0_badvaddr",  "c0_count",     "c0_entryhi",   "c0_compare",
-  "c0_status",    "c0_cause",     "c0_epc",       "c0_prid",
-  "c0_config",    "c0_lladdr",    "c0_watchlo",   "c0_watchhi",
-  "c0_xcontext",  "$21",          "$22",          "c0_debug",
-  "c0_depc",      "c0_perfcnt",   "c0_errctl",    "c0_cacheerr",
-  "c0_taglo",     "c0_taghi",     "c0_errorepc",  "c0_desave",
-};
-
-static const struct mips_cp0sel_name mips_cp0sel_names_mips3264r2[] = {
-  {  4, 1, "c0_contextconfig"	},
-  {  5, 1, "c0_pagegrain"	},
-  { 12, 1, "c0_intctl"		},
-  { 12, 2, "c0_srsctl"		},
-  { 12, 3, "c0_srsmap"		},
-  { 15, 1, "c0_ebase"		},
-  { 16, 1, "c0_config1"		},
-  { 16, 2, "c0_config2"		},
-  { 16, 3, "c0_config3"		},
-  { 18, 1, "c0_watchlo,1"	},
-  { 18, 2, "c0_watchlo,2"	},
-  { 18, 3, "c0_watchlo,3"	},
-  { 18, 4, "c0_watchlo,4"	},
-  { 18, 5, "c0_watchlo,5"	},
-  { 18, 6, "c0_watchlo,6"	},
-  { 18, 7, "c0_watchlo,7"	},
-  { 19, 1, "c0_watchhi,1"	},
-  { 19, 2, "c0_watchhi,2"	},
-  { 19, 3, "c0_watchhi,3"	},
-  { 19, 4, "c0_watchhi,4"	},
-  { 19, 5, "c0_watchhi,5"	},
-  { 19, 6, "c0_watchhi,6"	},
-  { 19, 7, "c0_watchhi,7"	},
-  { 23, 1, "c0_tracecontrol"	},
-  { 23, 2, "c0_tracecontrol2"	},
-  { 23, 3, "c0_usertracedata"	},
-  { 23, 4, "c0_tracebpc"	},
-  { 25, 1, "c0_perfcnt,1"	},
-  { 25, 2, "c0_perfcnt,2"	},
-  { 25, 3, "c0_perfcnt,3"	},
-  { 25, 4, "c0_perfcnt,4"	},
-  { 25, 5, "c0_perfcnt,5"	},
-  { 25, 6, "c0_perfcnt,6"	},
-  { 25, 7, "c0_perfcnt,7"	},
-  { 27, 1, "c0_cacheerr,1"	},
-  { 27, 2, "c0_cacheerr,2"	},
-  { 27, 3, "c0_cacheerr,3"	},
-  { 28, 1, "c0_datalo"		},
-  { 28, 2, "c0_taglo1"		},
-  { 28, 3, "c0_datalo1"		},
-  { 28, 4, "c0_taglo2"		},
-  { 28, 5, "c0_datalo2"		},
-  { 28, 6, "c0_taglo3"		},
-  { 28, 7, "c0_datalo3"		},
-  { 29, 1, "c0_datahi"		},
-  { 29, 2, "c0_taghi1"		},
-  { 29, 3, "c0_datahi1"		},
-  { 29, 4, "c0_taghi2"		},
-  { 29, 5, "c0_datahi2"		},
-  { 29, 6, "c0_taghi3"		},
-  { 29, 7, "c0_datahi3"		},
-};
-
-/* SB-1: MIPS64 (mips_cp0_names_mips3264) with minor mods.  */
-static const char * const mips_cp0_names_sb1[32] = {
-  "c0_index",     "c0_random",    "c0_entrylo0",  "c0_entrylo1",
-  "c0_context",   "c0_pagemask",  "c0_wired",     "$7",
-  "c0_badvaddr",  "c0_count",     "c0_entryhi",   "c0_compare",
-  "c0_status",    "c0_cause",     "c0_epc",       "c0_prid",
-  "c0_config",    "c0_lladdr",    "c0_watchlo",   "c0_watchhi",
-  "c0_xcontext",  "$21",          "$22",          "c0_debug",
-  "c0_depc",      "c0_perfcnt",   "c0_errctl",    "c0_cacheerr_i",
-  "c0_taglo_i",   "c0_taghi_i",   "c0_errorepc",  "c0_desave",
-};
-
-static const struct mips_cp0sel_name mips_cp0sel_names_sb1[] = {
-  { 16, 1, "c0_config1"		},
-  { 18, 1, "c0_watchlo,1"	},
-  { 19, 1, "c0_watchhi,1"	},
-  { 22, 0, "c0_perftrace"	},
-  { 23, 3, "c0_edebug"		},
-  { 25, 1, "c0_perfcnt,1"	},
-  { 25, 2, "c0_perfcnt,2"	},
-  { 25, 3, "c0_perfcnt,3"	},
-  { 25, 4, "c0_perfcnt,4"	},
-  { 25, 5, "c0_perfcnt,5"	},
-  { 25, 6, "c0_perfcnt,6"	},
-  { 25, 7, "c0_perfcnt,7"	},
-  { 26, 1, "c0_buserr_pa"	},
-  { 27, 1, "c0_cacheerr_d"	},
-  { 27, 3, "c0_cacheerr_d_pa"	},
-  { 28, 1, "c0_datalo_i"	},
-  { 28, 2, "c0_taglo_d"		},
-  { 28, 3, "c0_datalo_d"	},
-  { 29, 1, "c0_datahi_i"	},
-  { 29, 2, "c0_taghi_d"		},
-  { 29, 3, "c0_datahi_d"	},
-};
-
-static const char * const mips_hwr_names_numeric[32] = {
-  "$0",   "$1",   "$2",   "$3",   "$4",   "$5",   "$6",   "$7",
-  "$8",   "$9",   "$10",  "$11",  "$12",  "$13",  "$14",  "$15",
-  "$16",  "$17",  "$18",  "$19",  "$20",  "$21",  "$22",  "$23",
-  "$24",  "$25",  "$26",  "$27",  "$28",  "$29",  "$30",  "$31"
-};
-
-static const char * const mips_hwr_names_mips3264r2[32] = {
-  "hwr_cpunum",   "hwr_synci_step", "hwr_cc",     "hwr_ccres",
-  "$4",          "$5",            "$6",           "$7",
-  "$8",   "$9",   "$10",  "$11",  "$12",  "$13",  "$14",  "$15",
-  "$16",  "$17",  "$18",  "$19",  "$20",  "$21",  "$22",  "$23",
-  "$24",  "$25",  "$26",  "$27",  "$28",  "$29",  "$30",  "$31"
-};
-
-struct mips_abi_choice {
-  const char *name;
-  const char * const *gpr_names;
-  const char * const *fpr_names;
-};
-
-struct mips_abi_choice mips_abi_choices[] = {
-  { "numeric", mips_gpr_names_numeric, mips_fpr_names_numeric },
-  { "32", mips_gpr_names_oldabi, mips_fpr_names_32 },
-  { "n32", mips_gpr_names_newabi, mips_fpr_names_n32 },
-  { "64", mips_gpr_names_newabi, mips_fpr_names_64 },
-};
-
-struct mips_arch_choice {
-  const char *name;
-  int bfd_mach_valid;
-  unsigned long bfd_mach;
-  int processor;
-  int isa;
-  const char * const *cp0_names;
-  const struct mips_cp0sel_name *cp0sel_names;
-  unsigned int cp0sel_names_len;
-  const char * const *hwr_names;
-};
-
-const struct mips_arch_choice mips_arch_choices[] = {
-  { "numeric",	0, 0, 0, 0,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-
-  { "r3000",	1, bfd_mach_mips3000, CPU_R3000, ISA_MIPS1,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r3900",	1, bfd_mach_mips3900, CPU_R3900, ISA_MIPS1,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r4000",	1, bfd_mach_mips4000, CPU_R4000, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r4010",	1, bfd_mach_mips4010, CPU_R4010, ISA_MIPS2,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "vr4100",	1, bfd_mach_mips4100, CPU_VR4100, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "vr4111",	1, bfd_mach_mips4111, CPU_R4111, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "vr4120",	1, bfd_mach_mips4120, CPU_VR4120, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r4300",	1, bfd_mach_mips4300, CPU_R4300, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r4400",	1, bfd_mach_mips4400, CPU_R4400, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r4600",	1, bfd_mach_mips4600, CPU_R4600, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r4650",	1, bfd_mach_mips4650, CPU_R4650, ISA_MIPS3,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r5000",	1, bfd_mach_mips5000, CPU_R5000, ISA_MIPS4,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "vr5400",	1, bfd_mach_mips5400, CPU_VR5400, ISA_MIPS4,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "vr5500",	1, bfd_mach_mips5500, CPU_VR5500, ISA_MIPS4,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r6000",	1, bfd_mach_mips6000, CPU_R6000, ISA_MIPS2,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r8000",	1, bfd_mach_mips8000, CPU_R8000, ISA_MIPS4,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r10000",	1, bfd_mach_mips10000, CPU_R10000, ISA_MIPS4,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "r12000",	1, bfd_mach_mips12000, CPU_R12000, ISA_MIPS4,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-  { "mips5",	1, bfd_mach_mips5, CPU_MIPS5, ISA_MIPS5,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-
-  /* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
-     Note that MIPS-3D and MDMX are not applicable to MIPS32.  (See
-     _MIPS32 Architecture For Programmers Volume I: Introduction to the
-     MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
-     page 1.  */
-  { "mips32",	1, bfd_mach_mipsisa32, CPU_MIPS32,
-    ISA_MIPS32 | INSN_MIPS16,
-    mips_cp0_names_mips3264,
-    mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
-    mips_hwr_names_numeric },
-
-  { "mips32r2",	1, bfd_mach_mipsisa32r2, CPU_MIPS32R2,
-    ISA_MIPS32R2 | INSN_MIPS16,
-    mips_cp0_names_mips3264r2,
-    mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
-    mips_hwr_names_mips3264r2 },
-
-  /* For stock MIPS64, disassemble all applicable MIPS-specified ASEs.  */
-  { "mips64",	1, bfd_mach_mipsisa64, CPU_MIPS64,
-    ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX,
-    mips_cp0_names_mips3264,
-    mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
-    mips_hwr_names_numeric },
-
-  { "sb1",	1, bfd_mach_mips_sb1, CPU_SB1,
-    ISA_MIPS64 | INSN_MIPS3D | INSN_SB1,
-    mips_cp0_names_sb1,
-    mips_cp0sel_names_sb1, ARRAY_SIZE (mips_cp0sel_names_sb1),
-    mips_hwr_names_numeric },
-
-  /* This entry, mips16, is here only for ISA/processor selection; do
-     not print its name.  */
-  { "",		1, bfd_mach_mips16, CPU_MIPS16, ISA_MIPS3 | INSN_MIPS16,
-    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
-};
-
-/* ISA and processor type to disassemble for, and register names to use.
-   set_default_mips_dis_options and parse_mips_dis_options fill in these
-   values.  */
-static int mips_processor;
-static int mips_isa;
-static const char * const *mips_gpr_names;
-static const char * const *mips_fpr_names;
-static const char * const *mips_cp0_names;
-static const struct mips_cp0sel_name *mips_cp0sel_names;
-static int mips_cp0sel_names_len;
-static const char * const *mips_hwr_names;
-
-static const struct mips_abi_choice *choose_abi_by_name
-  PARAMS ((const char *, unsigned int));
-static const struct mips_arch_choice *choose_arch_by_name
-  PARAMS ((const char *, unsigned int));
-static const struct mips_arch_choice *choose_arch_by_number
-  PARAMS ((unsigned long));
-static const struct mips_cp0sel_name *lookup_mips_cp0sel_name
-  PARAMS ((const struct mips_cp0sel_name *, unsigned int, unsigned int,
-	   unsigned int));
-
-static const struct mips_abi_choice *
-choose_abi_by_name (name, namelen)
-     const char *name;
-     unsigned int namelen;
-{
-  const struct mips_abi_choice *c;
-  unsigned int i;
-
-  for (i = 0, c = NULL; i < ARRAY_SIZE (mips_abi_choices) && c == NULL; i++)
-    {
-      if (strncmp (mips_abi_choices[i].name, name, namelen) == 0
-	  && strlen (mips_abi_choices[i].name) == namelen)
-	c = &mips_abi_choices[i];
-    }
-  return c;
-}
-
-static const struct mips_arch_choice *
-choose_arch_by_name (name, namelen)
-     const char *name;
-     unsigned int namelen;
-{
-  const struct mips_arch_choice *c = NULL;
-  unsigned int i;
-
-  for (i = 0, c = NULL; i < ARRAY_SIZE (mips_arch_choices) && c == NULL; i++)
-    {
-      if (strncmp (mips_arch_choices[i].name, name, namelen) == 0
-	  && strlen (mips_arch_choices[i].name) == namelen)
-	c = &mips_arch_choices[i];
-    }
-  return c;
-}
-
-static const struct mips_arch_choice *
-choose_arch_by_number (mach)
-     unsigned long mach;
-{
-  static unsigned long hint_bfd_mach;
-  static const struct mips_arch_choice *hint_arch_choice;
-  const struct mips_arch_choice *c;
-  unsigned int i;
-
-  /* We optimize this because even if the user specifies no
-     flags, this will be done for every instruction!  */
-  if (hint_bfd_mach == mach
-      && hint_arch_choice != NULL
-      && hint_arch_choice->bfd_mach == hint_bfd_mach)
-    return hint_arch_choice;
-
-  for (i = 0, c = NULL; i < ARRAY_SIZE (mips_arch_choices) && c == NULL; i++)
-    {
-      if (mips_arch_choices[i].bfd_mach_valid
-	  && mips_arch_choices[i].bfd_mach == mach)
-	{
-	  c = &mips_arch_choices[i];
-	  hint_bfd_mach = mach;
-	  hint_arch_choice = c;
-	}
-    }
-  return c;
-}
-
-void
-set_default_mips_dis_options (info)
-     struct disassemble_info *info;
-{
-  const struct mips_arch_choice *chosen_arch;
-
-  /* Defaults: mipsIII/r3000 (?!), (o)32-style ("oldabi") GPR names,
-     and numeric FPR, CP0 register, and HWR names.  */
-  mips_isa = ISA_MIPS3;
-  mips_processor =  CPU_R3000;
-  mips_gpr_names = mips_gpr_names_oldabi;
-  mips_fpr_names = mips_fpr_names_numeric;
-  mips_cp0_names = mips_cp0_names_numeric;
-  mips_cp0sel_names = NULL;
-  mips_cp0sel_names_len = 0;
-  mips_hwr_names = mips_hwr_names_numeric;
-
-  /* If an ELF "newabi" binary, use the n32/(n)64 GPR names.  */
-  if (info->flavour == bfd_target_elf_flavour && info->symbols != NULL)
-    {
-      Elf_Internal_Ehdr *header;
-
-      header = elf_elfheader (bfd_asymbol_bfd (*(info->symbols)));
-      if (is_newabi (header))
-	mips_gpr_names = mips_gpr_names_newabi;
-    }
-
-  /* Set ISA, architecture, and cp0 register names as best we can.  */
-#if ! SYMTAB_AVAILABLE
-  /* This is running out on a target machine, not in a host tool.
-     FIXME: Where does mips_target_info come from?  */
-  target_processor = mips_target_info.processor;
-  mips_isa = mips_target_info.isa;
-#else
-  chosen_arch = choose_arch_by_number (info->mach);
-  if (chosen_arch != NULL)
-    {
-      mips_processor = chosen_arch->processor;
-      mips_isa = chosen_arch->isa;
-      mips_cp0_names = chosen_arch->cp0_names;
-      mips_cp0sel_names = chosen_arch->cp0sel_names;
-      mips_cp0sel_names_len = chosen_arch->cp0sel_names_len;
-      mips_hwr_names = chosen_arch->hwr_names;
-    }
-#endif
-}
-
-void
-parse_mips_dis_option (option, len)
-     const char *option;
-     unsigned int len;
-{
-  unsigned int i, optionlen, vallen;
-  const char *val;
-  const struct mips_abi_choice *chosen_abi;
-  const struct mips_arch_choice *chosen_arch;
-
-  /* Look for the = that delimits the end of the option name.  */
-  for (i = 0; i < len; i++)
-    {
-      if (option[i] == '=')
-	break;
-    }
-  if (i == 0)		/* Invalid option: no name before '='.  */
-    return;
-  if (i == len)		/* Invalid option: no '='.  */
-    return;
-  if (i == (len - 1))	/* Invalid option: no value after '='.  */
-    return;
-
-  optionlen = i;
-  val = option + (optionlen + 1);
-  vallen = len - (optionlen + 1);
-
-  if (strncmp("gpr-names", option, optionlen) == 0
-      && strlen("gpr-names") == optionlen)
-    {
-      chosen_abi = choose_abi_by_name (val, vallen);
-      if (chosen_abi != NULL)
-	mips_gpr_names = chosen_abi->gpr_names;
-      return;
-    }
-
-  if (strncmp("fpr-names", option, optionlen) == 0
-      && strlen("fpr-names") == optionlen)
-    {
-      chosen_abi = choose_abi_by_name (val, vallen);
-      if (chosen_abi != NULL)
-	mips_fpr_names = chosen_abi->fpr_names;
-      return;
-    }
-
-  if (strncmp("cp0-names", option, optionlen) == 0
-      && strlen("cp0-names") == optionlen)
-    {
-      chosen_arch = choose_arch_by_name (val, vallen);
-      if (chosen_arch != NULL)
-	{
-	  mips_cp0_names = chosen_arch->cp0_names;
-	  mips_cp0sel_names = chosen_arch->cp0sel_names;
-	  mips_cp0sel_names_len = chosen_arch->cp0sel_names_len;
-	}
-      return;
-    }
-
-  if (strncmp("hwr-names", option, optionlen) == 0
-      && strlen("hwr-names") == optionlen)
-    {
-      chosen_arch = choose_arch_by_name (val, vallen);
-      if (chosen_arch != NULL)
-	mips_hwr_names = chosen_arch->hwr_names;
-      return;
-    }
-
-  if (strncmp("reg-names", option, optionlen) == 0
-      && strlen("reg-names") == optionlen)
-    {
-      /* We check both ABI and ARCH here unconditionally, so
-	 that "numeric" will do the desirable thing: select
-	 numeric register names for all registers.  Other than
-	 that, a given name probably won't match both.  */
-      chosen_abi = choose_abi_by_name (val, vallen);
-      if (chosen_abi != NULL)
-	{
-	  mips_gpr_names = chosen_abi->gpr_names;
-	  mips_fpr_names = chosen_abi->fpr_names;
-	}
-      chosen_arch = choose_arch_by_name (val, vallen);
-      if (chosen_arch != NULL)
-	{
-	  mips_cp0_names = chosen_arch->cp0_names;
-	  mips_cp0sel_names = chosen_arch->cp0sel_names;
-	  mips_cp0sel_names_len = chosen_arch->cp0sel_names_len;
-	  mips_hwr_names = chosen_arch->hwr_names;
-	}
-      return;
-    }
-
-  /* Invalid option.  */
-}
-
-void
-parse_mips_dis_options (options)
-     const char *options;
-{
-  const char *option_end;
-
-  if (options == NULL)
-    return;
-
-  while (*options != '\0')
-    {
-      /* Skip empty options.  */
-      if (*options == ',')
-	{
-	  options++;
-	  continue;
-	}
-
-      /* We know that *options is neither NUL or a comma.  */
-      option_end = options + 1;
-      while (*option_end != ',' && *option_end != '\0')
-	option_end++;
-
-      parse_mips_dis_option (options, option_end - options);
-
-      /* Go on to the next one.  If option_end points to a comma, it
-	 will be skipped above.  */
-      options = option_end;
-    }
-}
-
-static const struct mips_cp0sel_name *
-lookup_mips_cp0sel_name(names, len, cp0reg, sel)
-	const struct mips_cp0sel_name *names;
-	unsigned int len, cp0reg, sel;
-{
-  unsigned int i;
-
-  for (i = 0; i < len; i++)
-    if (names[i].cp0reg == cp0reg && names[i].sel == sel)
-      return &names[i];
-  return NULL;
-}
+/* Scalar register names. _print_insn_mips() decides which register name
+   table to use.  */
+static const char * const *reg_names = NULL;
 
 /* Print insn arguments for 32/64-bit code.  */
 
 static void
-print_insn_args (d, l, pc, info)
+print_insn_arg (d, l, pc, info)
      const char *d;
      register unsigned long int l;
      bfd_vma pc;
      struct disassemble_info *info;
 {
-  int op, delta;
-  unsigned int lsb, msb, msbd;
+  int delta;
 
-  lsb = 0;
-
-  for (; *d != '\0'; d++)
+  switch (*d)
     {
-      switch (*d)
-	{
-	case ',':
-	case '(':
-	case ')':
-	case '[':
-	case ']':
-	  (*info->fprintf_func) (info->stream, "%c", *d);
-	  break;
+    case ',':
+    case '(':
+    case ')':
+    case '[':
+    case ']':
+      (*info->fprintf_func) (info->stream, "%c", *d);
+      break;
 
-	case '+':
-	  /* Extension character; switch for second char.  */
-	  d++;
-	  switch (*d)
-	    {
-	    case '\0':
-	      /* xgettext:c-format */
-	      (*info->fprintf_func) (info->stream,
-				     _("# internal error, incomplete extension sequence (+)"));
-	      return;
+    case 's':
+    case 'b':
+    case 'r':
+    case 'v':
+      (*info->fprintf_func) (info->stream, "%s",
+			     reg_names[(l >> OP_SH_RS) & OP_MASK_RS]);
+      break;
 
-	    case 'A':
-	      lsb = (l >> OP_SH_SHAMT) & OP_MASK_SHAMT;
-	      (*info->fprintf_func) (info->stream, "0x%x", lsb);
-	      break;
-	
-	    case 'B':
-	      msb = (l >> OP_SH_INSMSB) & OP_MASK_INSMSB;
-	      (*info->fprintf_func) (info->stream, "0x%x", msb - lsb + 1);
-	      break;
+    case 't':
+    case 'w':
+      (*info->fprintf_func) (info->stream, "%s",
+			     reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+      break;
 
-	    case 'C':
-	      msbd = (l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD;
-	      (*info->fprintf_func) (info->stream, "0x%x", msbd + 1);
-	      break;
+    case 'i':
+    case 'u':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_IMMEDIATE) & OP_MASK_IMMEDIATE);
+      break;
 
-	    case 'D':
-	      {
-		const struct mips_cp0sel_name *n;
-		unsigned int cp0reg, sel;
+    case 'j': /* Same as i, but sign-extended.  */
+    case 'o':
+      delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
+      if (delta & 0x8000)
+	delta |= ~0xffff;
+      (*info->fprintf_func) (info->stream, "%d",
+			     delta);
+      break;
 
-		cp0reg = (l >> OP_SH_RD) & OP_MASK_RD;
-		sel = (l >> OP_SH_SEL) & OP_MASK_SEL;
+    case 'h':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (unsigned int) ((l >> OP_SH_PREFX)
+					     & OP_MASK_PREFX));
+      break;
 
-		/* CP0 register including 'sel' code for mtcN (et al.), to be
-		   printed textually if known.  If not known, print both
-		   CP0 register name and sel numerically since CP0 register
-		   with sel 0 may have a name unrelated to register being
-		   printed.  */
-		n = lookup_mips_cp0sel_name(mips_cp0sel_names,
-					    mips_cp0sel_names_len, cp0reg, sel);
-		if (n != NULL)
-		  (*info->fprintf_func) (info->stream, "%s", n->name);
-		else
-		  (*info->fprintf_func) (info->stream, "$%d,%d", cp0reg, sel);
-		break;
-	      }
+    case 'k':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (unsigned int) ((l >> OP_SH_CACHE)
+					     & OP_MASK_CACHE));
+      break;
 
-	    default:
-	      /* xgettext:c-format */
-	      (*info->fprintf_func) (info->stream,
-				     _("# internal error, undefined extension sequence (+%c)"),
-				     *d);
-	      return;
-	    }
-	  break;
+    case 'a':
+      info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff)
+		      | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2));
+      (*info->print_address_func) (info->target, info);
+      break;
 
-	case 's':
-	case 'b':
-	case 'r':
-	case 'v':
+    case 'p':
+      /* Sign extend the displacement.  */
+      delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
+      if (delta & 0x8000)
+	delta |= ~0xffff;
+      info->target = (delta << 2) + pc + INSNLEN;
+      (*info->print_address_func) (info->target, info);
+      break;
+
+    case 'd':
+      (*info->fprintf_func) (info->stream, "%s",
+			     reg_names[(l >> OP_SH_RD) & OP_MASK_RD]);
+      break;
+
+    case 'U':
+      {
+	/* First check for both rd and rt being equal.  */
+	unsigned int reg = (l >> OP_SH_RD) & OP_MASK_RD;
+	if (reg == ((l >> OP_SH_RT) & OP_MASK_RT))
 	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_gpr_names[(l >> OP_SH_RS) & OP_MASK_RS]);
-	  break;
-
-	case 't':
-	case 'w':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_gpr_names[(l >> OP_SH_RT) & OP_MASK_RT]);
-	  break;
-
-	case 'i':
-	case 'u':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_IMMEDIATE) & OP_MASK_IMMEDIATE);
-	  break;
-
-	case 'j': /* Same as i, but sign-extended.  */
-	case 'o':
-	  delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
-	  if (delta & 0x8000)
-	    delta |= ~0xffff;
-	  (*info->fprintf_func) (info->stream, "%d",
-				 delta);
-	  break;
-
-	case 'h':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (unsigned int) ((l >> OP_SH_PREFX)
-						 & OP_MASK_PREFX));
-	  break;
-
-	case 'k':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (unsigned int) ((l >> OP_SH_CACHE)
-						 & OP_MASK_CACHE));
-	  break;
-
-	case 'a':
-	  info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff)
-			  | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2));
-	  (*info->print_address_func) (info->target, info);
-	  break;
-
-	case 'p':
-	  /* Sign extend the displacement.  */
-	  delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
-	  if (delta & 0x8000)
-	    delta |= ~0xffff;
-	  info->target = (delta << 2) + pc + INSNLEN;
-	  (*info->print_address_func) (info->target, info);
-	  break;
-
-	case 'd':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_gpr_names[(l >> OP_SH_RD) & OP_MASK_RD]);
-	  break;
-
-	case 'U':
+				 reg_names[reg]);
+	else
 	  {
-	    /* First check for both rd and rt being equal.  */
-	    unsigned int reg = (l >> OP_SH_RD) & OP_MASK_RD;
-	    if (reg == ((l >> OP_SH_RT) & OP_MASK_RT))
+	    /* If one is zero use the other.  */
+	    if (reg == 0)
 	      (*info->fprintf_func) (info->stream, "%s",
-				     mips_gpr_names[reg]);
-	    else
-	      {
-		/* If one is zero use the other.  */
-		if (reg == 0)
-		  (*info->fprintf_func) (info->stream, "%s",
-					 mips_gpr_names[(l >> OP_SH_RT) & OP_MASK_RT]);
-		else if (((l >> OP_SH_RT) & OP_MASK_RT) == 0)
-		  (*info->fprintf_func) (info->stream, "%s",
-					 mips_gpr_names[reg]);
-		else /* Bogus, result depends on processor.  */
-		  (*info->fprintf_func) (info->stream, "%s or %s",
-					 mips_gpr_names[reg],
-					 mips_gpr_names[(l >> OP_SH_RT) & OP_MASK_RT]);
-	      }
+				     reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+	    else if (((l >> OP_SH_RT) & OP_MASK_RT) == 0)
+	      (*info->fprintf_func) (info->stream, "%s",
+				     reg_names[reg]);
+	    else /* Bogus, result depends on processor.  */
+	      (*info->fprintf_func) (info->stream, "%s or %s",
+				     reg_names[reg],
+				     reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
 	  }
-	  break;
+      }
+      break;
 
-	case 'z':
-	  (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[0]);
-	  break;
+    case 'z':
+      (*info->fprintf_func) (info->stream, "%s", reg_names[0]);
+      break;
 
-	case '<':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_SHAMT) & OP_MASK_SHAMT);
-	  break;
+    case '<':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_SHAMT) & OP_MASK_SHAMT);
+      break;
 
-	case 'c':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_CODE) & OP_MASK_CODE);
-	  break;
+    case 'c':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_CODE) & OP_MASK_CODE);
+      break;
 
-	case 'q':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_CODE2) & OP_MASK_CODE2);
-	  break;
+    case 'q':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_CODE2) & OP_MASK_CODE2);
+      break;
 
-	case 'C':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_COPZ) & OP_MASK_COPZ);
-	  break;
+    case 'C':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_COPZ) & OP_MASK_COPZ);
+      break;
 
-	case 'B':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_CODE20) & OP_MASK_CODE20);
-	  break;
+    case 'B':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_CODE20) & OP_MASK_CODE20);
+      break;
 
-	case 'J':
-	  (*info->fprintf_func) (info->stream, "0x%x",
-				 (l >> OP_SH_CODE19) & OP_MASK_CODE19);
-	  break;
+    case 'J':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_CODE19) & OP_MASK_CODE19);
+      break;
 
-	case 'S':
-	case 'V':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_fpr_names[(l >> OP_SH_FS) & OP_MASK_FS]);
-	  break;
+    case 'S':
+    case 'V':
+      (*info->fprintf_func) (info->stream, "$f%d",
+			     (l >> OP_SH_FS) & OP_MASK_FS);
+      break;
 
-	case 'T':
-	case 'W':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_fpr_names[(l >> OP_SH_FT) & OP_MASK_FT]);
-	  break;
+    case 'T':
+    case 'W':
+      (*info->fprintf_func) (info->stream, "$f%d",
+			     (l >> OP_SH_FT) & OP_MASK_FT);
+      break;
 
-	case 'D':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_fpr_names[(l >> OP_SH_FD) & OP_MASK_FD]);
-	  break;
+    case 'D':
+      (*info->fprintf_func) (info->stream, "$f%d",
+			     (l >> OP_SH_FD) & OP_MASK_FD);
+      break;
 
-	case 'R':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_fpr_names[(l >> OP_SH_FR) & OP_MASK_FR]);
-	  break;
+    case 'R':
+      (*info->fprintf_func) (info->stream, "$f%d",
+			     (l >> OP_SH_FR) & OP_MASK_FR);
+      break;
 
-	case 'E':
-	  /* Coprocessor register for lwcN instructions, et al.
+    case 'E':
+      (*info->fprintf_func) (info->stream, "$%d",
+			     (l >> OP_SH_RT) & OP_MASK_RT);
+      break;
 
-	     Note that there is no load/store cp0 instructions, and
-	     that FPU (cp1) instructions disassemble this field using
-	     'T' format.  Therefore, until we gain understanding of
-	     cp2 register names, we can simply print the register
-	     numbers.  */
-	  (*info->fprintf_func) (info->stream, "$%d",
-				 (l >> OP_SH_RT) & OP_MASK_RT);
-	  break;
+    case 'G':
+      (*info->fprintf_func) (info->stream, "$%d",
+			     (l >> OP_SH_RD) & OP_MASK_RD);
+      break;
 
-	case 'G':
-	  /* Coprocessor register for mtcN instructions, et al.  Note
-	     that FPU (cp1) instructions disassemble this field using
-	     'S' format.  Therefore, we only need to worry about cp0,
-	     cp2, and cp3.  */
-	  op = (l >> OP_SH_OP) & OP_MASK_OP;
-	  if (op == OP_OP_COP0)
-	    (*info->fprintf_func) (info->stream, "%s",
-				   mips_cp0_names[(l >> OP_SH_RD) & OP_MASK_RD]);
-	  else
-	    (*info->fprintf_func) (info->stream, "$%d",
-				   (l >> OP_SH_RD) & OP_MASK_RD);
-	  break;
+    case 'N':
+      (*info->fprintf_func) (info->stream, "$fcc%d",
+			     (l >> OP_SH_BCC) & OP_MASK_BCC);
+      break;
 
-	case 'K':
-	  (*info->fprintf_func) (info->stream, "%s",
-				 mips_hwr_names[(l >> OP_SH_RD) & OP_MASK_RD]);
-	  break;
+    case 'M':
+      (*info->fprintf_func) (info->stream, "$fcc%d",
+			     (l >> OP_SH_CCC) & OP_MASK_CCC);
+      break;
 
-	case 'N':
-	  (*info->fprintf_func) (info->stream, "$fcc%d",
-				 (l >> OP_SH_BCC) & OP_MASK_BCC);
-	  break;
+    case 'P':
+      (*info->fprintf_func) (info->stream, "%d",
+			     (l >> OP_SH_PERFREG) & OP_MASK_PERFREG);
+      break;
 
-	case 'M':
-	  (*info->fprintf_func) (info->stream, "$fcc%d",
-				 (l >> OP_SH_CCC) & OP_MASK_CCC);
-	  break;
+    case 'e':
+      (*info->fprintf_func) (info->stream, "%d",
+			     (l >> OP_SH_VECBYTE) & OP_MASK_VECBYTE);
+      break;
 
-	case 'P':
-	  (*info->fprintf_func) (info->stream, "%d",
-				 (l >> OP_SH_PERFREG) & OP_MASK_PERFREG);
-	  break;
+    case '%':
+      (*info->fprintf_func) (info->stream, "%d",
+			     (l >> OP_SH_VECALIGN) & OP_MASK_VECALIGN);
+      break;
 
-	case 'e':
-	  (*info->fprintf_func) (info->stream, "%d",
-				 (l >> OP_SH_VECBYTE) & OP_MASK_VECBYTE);
-	  break;
+    case 'H':
+      (*info->fprintf_func) (info->stream, "%d",
+			     (l >> OP_SH_SEL) & OP_MASK_SEL);
+      break;
 
-	case '%':
-	  (*info->fprintf_func) (info->stream, "%d",
-				 (l >> OP_SH_VECALIGN) & OP_MASK_VECALIGN);
-	  break;
+    case 'O':
+      (*info->fprintf_func) (info->stream, "%d",
+			     (l >> OP_SH_ALN) & OP_MASK_ALN);
+      break;
 
-	case 'H':
-	  (*info->fprintf_func) (info->stream, "%d",
-				 (l >> OP_SH_SEL) & OP_MASK_SEL);
-	  break;
-
-	case 'O':
-	  (*info->fprintf_func) (info->stream, "%d",
-				 (l >> OP_SH_ALN) & OP_MASK_ALN);
-	  break;
-
-	case 'Q':
+    case 'Q':
+      {
+	unsigned int vsel = (l >> OP_SH_VSEL) & OP_MASK_VSEL;
+	if ((vsel & 0x10) == 0)
 	  {
-	    unsigned int vsel = (l >> OP_SH_VSEL) & OP_MASK_VSEL;
-	    if ((vsel & 0x10) == 0)
-	      {
-		int fmt;
-		vsel &= 0x0f;
-		for (fmt = 0; fmt < 3; fmt++, vsel >>= 1)
-		  if ((vsel & 1) == 0)
-		    break;
-		(*info->fprintf_func) (info->stream, "$v%d[%d]",
-				       (l >> OP_SH_FT) & OP_MASK_FT,
-				       vsel >> 1);
-	      }
-	    else if ((vsel & 0x08) == 0)
-	      {
-		(*info->fprintf_func) (info->stream, "$v%d",
-				       (l >> OP_SH_FT) & OP_MASK_FT);
-	      }
-	    else
-	      {
-		(*info->fprintf_func) (info->stream, "0x%x",
-				       (l >> OP_SH_FT) & OP_MASK_FT);
-	      }
+	    int fmt;
+	    vsel &= 0x0f;
+	    for (fmt = 0; fmt < 3; fmt++, vsel >>= 1)
+	      if ((vsel & 1) == 0)
+		break;
+	    (*info->fprintf_func) (info->stream, "$v%d[%d]",
+				   (l >> OP_SH_FT) & OP_MASK_FT,
+				   vsel >> 1);
 	  }
-	  break;
+	else if ((vsel & 0x08) == 0)
+	  {
+	    (*info->fprintf_func) (info->stream, "$v%d",
+				   (l >> OP_SH_FT) & OP_MASK_FT);
+	  }
+	else
+	  {
+	    (*info->fprintf_func) (info->stream, "0x%x",
+				   (l >> OP_SH_FT) & OP_MASK_FT);
+	  }
+      }
+      break;
 
-	case 'X':
-	  (*info->fprintf_func) (info->stream, "$v%d",
-				 (l >> OP_SH_FD) & OP_MASK_FD);
-	  break;
+    case 'X':
+      (*info->fprintf_func) (info->stream, "$v%d",
+			     (l >> OP_SH_FD) & OP_MASK_FD);
+      break;
 
-	case 'Y':
-	  (*info->fprintf_func) (info->stream, "$v%d",
-				 (l >> OP_SH_FS) & OP_MASK_FS);
-	  break;
+    case 'Y':
+      (*info->fprintf_func) (info->stream, "$v%d",
+			     (l >> OP_SH_FS) & OP_MASK_FS);
+      break;
 
-	case 'Z':
-	  (*info->fprintf_func) (info->stream, "$v%d",
-				 (l >> OP_SH_FT) & OP_MASK_FT);
-	  break;
+    case 'Z':
+      (*info->fprintf_func) (info->stream, "$v%d",
+			     (l >> OP_SH_FT) & OP_MASK_FT);
+      break;
 
-	default:
-	  /* xgettext:c-format */
-	  (*info->fprintf_func) (info->stream,
-				 _("# internal error, undefined modifier(%c)"),
-				 *d);
-	  return;
-	}
+    default:
+      /* xgettext:c-format */
+      (*info->fprintf_func) (info->stream,
+			     _("# internal error, undefined modifier(%c)"),
+			     *d);
+      break;
     }
 }
 
+/* Figure out the MIPS ISA and CPU based on the machine number.  */
+
+static void
+mips_isa_type (mach, isa, cputype)
+     int mach;
+     int *isa;
+     int *cputype;
+{
+  switch (mach)
+    {
+    case bfd_mach_mips3000:
+      *cputype = CPU_R3000;
+      *isa = ISA_MIPS1;
+      break;
+    case bfd_mach_mips3900:
+      *cputype = CPU_R3900;
+      *isa = ISA_MIPS1;
+      break;
+    case bfd_mach_mips4000:
+      *cputype = CPU_R4000;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4010:
+      *cputype = CPU_R4010;
+      *isa = ISA_MIPS2;
+      break;
+    case bfd_mach_mips4100:
+      *cputype = CPU_VR4100;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4111:
+      *cputype = CPU_R4111;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4120:
+      *cputype = CPU_VR4120;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4300:
+      *cputype = CPU_R4300;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4400:
+      *cputype = CPU_R4400;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4600:
+      *cputype = CPU_R4600;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips4650:
+      *cputype = CPU_R4650;
+      *isa = ISA_MIPS3;
+      break;
+    case bfd_mach_mips5000:
+      *cputype = CPU_R5000;
+      *isa = ISA_MIPS4;
+      break;
+    case bfd_mach_mips5400:
+      *cputype = CPU_VR5400;
+      *isa = ISA_MIPS4;
+      break;
+    case bfd_mach_mips5500:
+      *cputype = CPU_VR5500;
+      *isa = ISA_MIPS4;
+      break;
+    case bfd_mach_mips6000:
+      *cputype = CPU_R6000;
+      *isa = ISA_MIPS2;
+      break;
+    case bfd_mach_mips8000:
+      *cputype = CPU_R8000;
+      *isa = ISA_MIPS4;
+      break;
+    case bfd_mach_mips10000:
+      *cputype = CPU_R10000;
+      *isa = ISA_MIPS4;
+      break;
+    case bfd_mach_mips12000:
+      *cputype = CPU_R12000;
+      *isa = ISA_MIPS4;
+      break;
+    case bfd_mach_mips16:
+      *cputype = CPU_MIPS16;
+      *isa = ISA_MIPS3 | INSN_MIPS16;
+      break;
+    case bfd_mach_mips5:
+      *cputype = CPU_MIPS5;
+      *isa = ISA_MIPS5;
+      break;
+    case bfd_mach_mips_sb1:
+      *cputype = CPU_SB1;
+      *isa = ISA_MIPS64 | INSN_MIPS3D | INSN_SB1;
+      break;
+    case bfd_mach_mipsisa32:
+      *cputype = CPU_MIPS32;
+      /* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
+	 Note that MIPS-3D and MDMX are not applicable to MIPS32.  (See
+	 _MIPS32 Architecture For Programmers Volume I: Introduction to the
+	 MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
+	 page 1.  */
+      *isa = ISA_MIPS32 | INSN_MIPS16;
+      break;
+    case bfd_mach_mipsisa64:
+      *cputype = CPU_MIPS64;
+      /* For stock MIPS64, disassemble all applicable MIPS-specified ASEs.  */
+      *isa = ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX;
+      break;
+
+    default:
+      *cputype = CPU_R3000;
+      *isa = ISA_MIPS3;
+      break;
+    }
+}
+
 /* Check if the object uses NewABI conventions.  */
 
 static int
@@ -1033,6 +497,7 @@
      struct disassemble_info *info;
 {
   register const struct mips_opcode *op;
+  int target_processor, mips_isa;
   static bfd_boolean init = 0;
   static const struct mips_opcode *mips_hash[OP_MASK_OP + 1];
 
@@ -1058,6 +523,15 @@
       init = 1;
     }
 
+#if ! SYMTAB_AVAILABLE
+  /* This is running out on a target machine, not in a host tool.
+     FIXME: Where does mips_target_info come from?  */
+  target_processor = mips_target_info.processor;
+  mips_isa = mips_target_info.isa;
+#else
+  mips_isa_type (info->mach, &mips_isa, &target_processor);
+#endif
+
   info->bytes_per_chunk = INSNLEN;
   info->display_endian = info->endian;
   info->insn_info_valid = 1;
@@ -1077,7 +551,7 @@
 	      register const char *d;
 
 	      /* We always allow to disassemble the jalx instruction.  */
-	      if (! OPCODE_IS_MEMBER (op, mips_isa, mips_processor)
+	      if (! OPCODE_IS_MEMBER (op, mips_isa, target_processor)
 		  && strcmp (op->name, "jalx"))
 		continue;
 
@@ -1109,7 +583,8 @@
 	      if (d != NULL && *d != '\0')
 		{
 		  (*info->fprintf_func) (info->stream, "\t");
-		  print_insn_args (d, word, memaddr, info);
+		  for (; *d != '\0'; d++)
+		    print_insn_arg (d, word, memaddr, info);
 		}
 
 	      return INSNLEN;
@@ -1138,9 +613,6 @@
   bfd_byte buffer[INSNLEN];
   int status;
 
-  set_default_mips_dis_options (info);
-  parse_mips_dis_options (info->disassembler_options);
-
 #if 1
   /* FIXME: If odd address, this is CLEARLY a mips 16 instruction.  */
   /* Only a few tools will work this way.  */
@@ -1157,6 +629,18 @@
     return print_insn_mips16 (memaddr, info);
 #endif
 
+  /* Use mips64_reg_names for new ABI.  */
+  reg_names = mips32_reg_names;
+
+  if (info->flavour == bfd_target_elf_flavour && info->symbols != NULL)
+    {
+      Elf_Internal_Ehdr *header;
+
+      header = elf_elfheader (bfd_asymbol_bfd (*(info->symbols)));
+      if (is_newabi (header))
+	reg_names = mips64_reg_names;
+    }
+
   status = (*info->read_memory_func) (memaddr, buffer, INSNLEN, info);
   if (status == 0)
     {
@@ -1395,11 +879,11 @@
       break;
 
     case '0':
-      (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[0]);
+      (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[0]);
       break;
 
     case 'S':
-      (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[29]);
+      (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[29]);
       break;
 
     case 'P':
@@ -1407,18 +891,18 @@
       break;
 
     case 'R':
-      (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[31]);
+      (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[31]);
       break;
 
     case 'X':
       (*info->fprintf_func) (info->stream, "%s",
-			     mips_gpr_names[((l >> MIPS16OP_SH_REGR32)
-					    & MIPS16OP_MASK_REGR32)]);
+			     mips32_reg_names[((l >> MIPS16OP_SH_REGR32)
+					       & MIPS16OP_MASK_REGR32)]);
       break;
 
     case 'Y':
       (*info->fprintf_func) (info->stream, "%s",
-			     mips_gpr_names[MIPS16OP_EXTRACT_REG32R (l)]);
+			     mips32_reg_names[MIPS16OP_EXTRACT_REG32R (l)]);
       break;
 
     case '<':
@@ -1701,10 +1185,10 @@
 
 	if (amask > 0 && amask < 5)
 	  {
-	    (*info->fprintf_func) (info->stream, "%s", mips_gpr_names[4]);
+	    (*info->fprintf_func) (info->stream, "%s", mips32_reg_names[4]);
 	    if (amask > 1)
 	      (*info->fprintf_func) (info->stream, "-%s",
-				     mips_gpr_names[amask + 3]);
+				     mips32_reg_names[amask + 3]);
 	    need_comma = 1;
 	  }
 
@@ -1719,10 +1203,10 @@
 	  {
 	    (*info->fprintf_func) (info->stream, "%s%s",
 				   need_comma ? "," : "",
-				   mips_gpr_names[16]);
+				   mips32_reg_names[16]);
 	    if (smask > 1)
 	      (*info->fprintf_func) (info->stream, "-%s",
-				     mips_gpr_names[smask + 15]);
+				     mips32_reg_names[smask + 15]);
 	    need_comma = 1;
 	  }
 
@@ -1730,7 +1214,7 @@
 	  {
 	    (*info->fprintf_func) (info->stream, "%s%s",
 				   need_comma ? "," : "",
-				   mips_gpr_names[31]);
+				   mips32_reg_names[31]);
 	    need_comma = 1;
 	  }
 
@@ -1753,57 +1237,3 @@
       abort ();
     }
 }
-
-void
-print_mips_disassembler_options (stream)
-     FILE *stream;
-{
-  int i;
-
-  fprintf (stream, _("\n\
-The following MIPS specific disassembler options are supported for use\n\
-with the -M switch (multiple options should be separated by commas):\n"));
-
-  fprintf (stream, _("\n\
-  gpr-names=ABI            Print GPR names according to  specified ABI.\n\
-                           Default: based on binary being disassembled.\n"));
-
-  fprintf (stream, _("\n\
-  fpr-names=ABI            Print FPR names according to specified ABI.\n\
-                           Default: numeric.\n"));
-
-  fprintf (stream, _("\n\
-  cp0-names=ARCH           Print CP0 register names according to\n\
-                           specified architecture.\n\
-                           Default: based on binary being disassembled.\n"));
-
-  fprintf (stream, _("\n\
-  hwr-names=ARCH           Print HWR names according to specified \n\
-			   architecture.\n\
-                           Default: based on binary being disassembled.\n"));
-
-  fprintf (stream, _("\n\
-  reg-names=ABI            Print GPR and FPR names according to\n\
-                           specified ABI.\n"));
-
-  fprintf (stream, _("\n\
-  reg-names=ARCH           Print CP0 register and HWR names according to\n\
-                           specified architecture.\n"));
-
-  fprintf (stream, _("\n\
-  For the options above, the following values are supported for \"ABI\":\n\
-   "));
-  for (i = 0; mips_abi_choices[i].name != NULL; i++)
-    fprintf (stream, " %s", mips_abi_choices[i].name);
-  fprintf (stream, _("\n"));
-
-  fprintf (stream, _("\n\
-  For the options above, The following values are supported for \"ARCH\":\n\
-   "));
-  for (i = 0; mips_arch_choices[i].name != NULL; i++)
-    if (*mips_arch_choices[i].name != '\0')
-      fprintf (stream, " %s", mips_arch_choices[i].name);
-  fprintf (stream, _("\n"));
-
-  fprintf (stream, _("\n"));
-}
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 228357a..61a2ebd 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -4,8 +4,7 @@
    Contributed by Ralph Campbell and OSF
    Commented and modified by Ian Lance Taylor, Cygnus Support
    Extended for MIPS32 support by Anders Norlander, and by SiByte, Inc.
-   MIPS-3D, MDMX, and MIPS32 Release 2 support added by Broadcom
-   Corporation (SiByte).
+   MIPS-3D and MDMX support added by Broadcom Corporation (SiByte).
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -86,7 +85,6 @@
 #define I5	INSN_ISA5
 #define I32	INSN_ISA32
 #define I64     INSN_ISA64
-#define I33	INSN_ISA32R2
 
 /* MIPS64 MIPS-3D ASE support.  */
 #define I16     INSN_MIPS16
@@ -139,9 +137,8 @@
 /* name,    args,	match,	    mask,	pinfo,          	membership */
 {"pref",    "k,o(b)",   0xcc000000, 0xfc000000, RD_b,           	I4|I32|G3	},
 {"prefx",   "h,t(b)",	0x4c00000f, 0xfc0007ff, RD_b|RD_t,		I4	},
-{"nop",     "",         0x00000000, 0xffffffff, 0,              	I1      }, /* sll */
-{"ssnop",   "",         0x00000040, 0xffffffff, 0,              	I32|N55	}, /* sll */
-{"ehb",     "",         0x000000c0, 0xffffffff, 0,              	I33	}, /* sll */
+{"nop",     "",         0x00000000, 0xffffffff, 0,              	I1      },
+{"ssnop",   "",         0x00000040, 0xffffffff, 0,              	I32|N55	},
 {"li",      "t,j",      0x24000000, 0xffe00000, WR_t,			I1	}, /* addiu */
 {"li",	    "t,i",	0x34000000, 0xffe00000, WR_t,			I1	}, /* ori */
 {"li",      "t,I",	0,    (int) M_LI,	INSN_MACRO,		I1	},
@@ -489,8 +486,6 @@
 {"ddivu",   "z,s,t",    0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO,      I3      },
 {"ddivu",   "d,v,t",	0,    (int) M_DDIVU_3,	INSN_MACRO,		I3	},
 {"ddivu",   "d,v,I",	0,    (int) M_DDIVU_3I,	INSN_MACRO,		I3	},
-{"di",      "",		0x41606000, 0xffffffff,	WR_t|WR_C0,		I33	},
-{"di",      "t",	0x41606000, 0xffe0ffff,	WR_t|WR_C0,		I33	},
 /* The MIPS assembler treats the div opcode with two operands as
    though the first operand appeared twice (the first operand is both
    a source and a destination).  To get the div machine instruction,
@@ -521,10 +516,8 @@
 {"dmaccus", "d,s,t",	0x00000469, 0xfc0007ff,	RD_s|RD_t|WR_LO|WR_d,	N412	},
 {"dmadd16", "s,t",      0x00000029, 0xfc00ffff, RD_s|RD_t|MOD_LO,       N411    },
 {"dmfc0",   "t,G",	0x40200000, 0xffe007ff, LCD|WR_t|RD_C0,		I3	},
-{"dmfc0",   "t,+D",     0x40200000, 0xffe007f8, LCD|WR_t|RD_C0, 	I64     },
 {"dmfc0",   "t,G,H",    0x40200000, 0xffe007f8, LCD|WR_t|RD_C0, 	I64     },
 {"dmtc0",   "t,G",	0x40a00000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC,	I3	},
-{"dmtc0",   "t,+D",     0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I64     },
 {"dmtc0",   "t,G,H",    0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I64     },
 {"dmfc1",   "t,S",	0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,	I3	},
 {"dmfc1",   "t,G",      0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I3      },
@@ -581,10 +574,7 @@
 {"dsub",    "d,v,I",	0,    (int) M_DSUB_I,	INSN_MACRO,		I3	},
 {"dsubu",   "d,v,t",	0x0000002f, 0xfc0007ff,	WR_d|RD_s|RD_t,		I3	},
 {"dsubu",   "d,v,I",	0,    (int) M_DSUBU_I,	INSN_MACRO,		I3	},
-{"ei",      "",		0x41606020, 0xffffffff,	WR_t|WR_C0,		I33	},
-{"ei",      "t",	0x41606020, 0xffe0ffff,	WR_t|WR_C0,		I33	},
 {"eret",    "",         0x42000018, 0xffffffff, 0,      		I3|I32	},
-{"ext",     "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s,    		I33	},
 {"floor.l.d", "D,S",	0x4620000b, 0xffff003f, WR_D|RD_S|FP_D,		I3	},
 {"floor.l.s", "D,S",	0x4600000b, 0xffff003f, WR_D|RD_S|FP_S,		I3	},
 {"floor.w.d", "D,S",	0x4620000f, 0xffff003f, WR_D|RD_S|FP_D,		I2	},
@@ -593,9 +583,7 @@
 {"flushd",  "",		0xbc020000, 0xffffffff, 0, 			L1	},
 {"flushid", "",		0xbc030000, 0xffffffff, 0, 			L1	},
 {"hibernate","",        0x42000023, 0xffffffff,	0, 			V1	},
-{"ins",     "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s,    		I33	},
 {"jr",      "s",	0x00000008, 0xfc1fffff,	UBD|RD_s,		I1	},
-{"jr.hb",   "s",	0x00000408, 0xfc1fffff,	UBD|RD_s,		I33	},
 {"j",       "s",	0x00000008, 0xfc1fffff,	UBD|RD_s,		I1	}, /* jr */
 /* SVR4 PIC code requires special handling for j, so it must be a
    macro.  */
@@ -606,8 +594,6 @@
 {"j",       "a",	0x08000000, 0xfc000000,	UBD,			I1	},
 {"jalr",    "s",	0x0000f809, 0xfc1fffff,	UBD|RD_s|WR_d,		I1	},
 {"jalr",    "d,s",	0x00000009, 0xfc1f07ff,	UBD|RD_s|WR_d,		I1	},
-{"jalr.hb", "s",	0x0000fc09, 0xfc1fffff,	UBD|RD_s|WR_d,		I33	},
-{"jalr.hb", "d,s",	0x00000409, 0xfc1f07ff,	UBD|RD_s|WR_d,		I33	},
 /* SVR4 PIC code requires special handling for jal, so it must be a
    macro.  */
 {"jal",     "d,s",	0,     (int) M_JAL_2,	INSN_MACRO,		I1	},
@@ -716,15 +702,11 @@
 {"mfpc",    "t,P",	0x4000c801, 0xffe0ffc1,	LCD|WR_t|RD_C0,		M1|N5	},
 {"mfps",    "t,P",	0x4000c800, 0xffe0ffc1,	LCD|WR_t|RD_C0,		M1|N5	},
 {"mfc0",    "t,G",	0x40000000, 0xffe007ff,	LCD|WR_t|RD_C0,		I1	},
-{"mfc0",    "t,+D",     0x40000000, 0xffe007f8, LCD|WR_t|RD_C0, 	I32     },
 {"mfc0",    "t,G,H",    0x40000000, 0xffe007f8, LCD|WR_t|RD_C0, 	I32     },
 {"mfc1",    "t,S",	0x44000000, 0xffe007ff,	LCD|WR_t|RD_S|FP_S,	I1	},
 {"mfc1",    "t,G",	0x44000000, 0xffe007ff,	LCD|WR_t|RD_S|FP_S,	I1	},
-{"mfhc1",   "t,S",	0x44600000, 0xffe007ff,	LCD|WR_t|RD_S|FP_S,	I33	},
-{"mfhc1",   "t,G",	0x44600000, 0xffe007ff,	LCD|WR_t|RD_S|FP_S,	I33	},
 {"mfc2",    "t,G",	0x48000000, 0xffe007ff,	LCD|WR_t|RD_C2,		I1	},
 {"mfc2",    "t,G,H",    0x48000000, 0xffe007f8, LCD|WR_t|RD_C2, 	I32     },
-{"mfhc2",   "t,i",	0x48600000, 0xffe00000,	LCD|WR_t|RD_C2,		I33	},
 {"mfc3",    "t,G",	0x4c000000, 0xffe007ff,	LCD|WR_t|RD_C3,		I1	},
 {"mfc3",    "t,G,H",    0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, 	I32     },
 {"mfdr",    "t,G",	0x7000003d, 0xffe007ff,	LCD|WR_t|RD_C0,		N5      },
@@ -780,15 +762,11 @@
 {"mtpc",    "t,P",	0x4080c801, 0xffe0ffc1,	COD|RD_t|WR_C0,		M1|N5	},
 {"mtps",    "t,P",	0x4080c800, 0xffe0ffc1,	COD|RD_t|WR_C0,		M1|N5	},
 {"mtc0",    "t,G",	0x40800000, 0xffe007ff,	COD|RD_t|WR_C0|WR_CC,	I1	},
-{"mtc0",    "t,+D",     0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I32     },
 {"mtc0",    "t,G,H",    0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I32     },
 {"mtc1",    "t,S",	0x44800000, 0xffe007ff,	COD|RD_t|WR_S|FP_S,	I1	},
 {"mtc1",    "t,G",	0x44800000, 0xffe007ff,	COD|RD_t|WR_S|FP_S,	I1	},
-{"mthc1",   "t,S",	0x44e00000, 0xffe007ff,	COD|RD_t|WR_S|FP_S,	I33	},
-{"mthc1",   "t,G",	0x44e00000, 0xffe007ff,	COD|RD_t|WR_S|FP_S,	I33	},
 {"mtc2",    "t,G",	0x48800000, 0xffe007ff,	COD|RD_t|WR_C2|WR_CC,	I1	},
 {"mtc2",    "t,G,H",    0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC,   I32     },
-{"mthc2",   "t,i",	0x48e00000, 0xffe00000,	COD|RD_t|WR_C2|WR_CC,	I33	},
 {"mtc3",    "t,G",	0x4c800000, 0xffe007ff,	COD|RD_t|WR_C3|WR_CC,	I1	},
 {"mtc3",    "t,G,H",    0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC,   I32     },
 {"mtdr",    "t,G",	0x7080003d, 0xffe007ff,	COD|RD_t|WR_C0,		N5	},
@@ -912,8 +890,6 @@
 {"remu",    "z,s,t",    0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HILO,      I1	},
 {"remu",    "d,v,t",	0,    (int) M_REMU_3,	INSN_MACRO,		I1	},
 {"remu",    "d,v,I",	0,    (int) M_REMU_3I,	INSN_MACRO,		I1	},
-{"rdhwr",   "t,K",	0x7c00003b, 0xffe007ff, WR_t,			I33	},
-{"rdpgpr",  "d,w",	0x41400000, 0xffe007ff, WR_d,			I33	},
 {"rfe",     "",		0x42000010, 0xffffffff,	0,			I1|T3	},
 {"rnas.qh", "X,Q",	0x78200025, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
 {"rnau.ob", "X,Q",	0x78000021, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX|SB1	},
@@ -925,13 +901,8 @@
 {"rol",     "d,v,I",	0,    (int) M_ROL_I,	INSN_MACRO,		I1	},
 {"ror",     "d,v,t",	0,    (int) M_ROR,	INSN_MACRO,		I1	},
 {"ror",     "d,v,I",	0,    (int) M_ROR_I,	INSN_MACRO,		I1	},
-{"ror",	    "d,w,<",	0x00200002, 0xffe0003f,	WR_d|RD_t,		N5|I33	},
-{"rorv",    "d,t,s",	0x00000046, 0xfc0007ff,	RD_t|RD_s|WR_d,		N5|I33	},
-{"rotl",    "d,v,t",	0,    (int) M_ROL,	INSN_MACRO,		I33	},
-{"rotl",    "d,v,I",	0,    (int) M_ROL_I,	INSN_MACRO,		I33	},
-{"rotr",    "d,v,t",	0,    (int) M_ROR,	INSN_MACRO,		I33	},
-{"rotr",    "d,v,I",	0,    (int) M_ROR_I,	INSN_MACRO,		I33	},
-{"rotrv",   "d,t,s",	0x00000046, 0xfc0007ff,	RD_t|RD_s|WR_d,		I33	},
+{"ror",	    "d,w,<",	0x00200002, 0xffe0003f,	WR_d|RD_t,		N5	},
+{"rorv",    "d,t,s",	0x00000046, 0xfc0007ff,	RD_t|RD_s|WR_d,		N5	},
 {"round.l.d", "D,S",	0x46200008, 0xffff003f, WR_D|RD_S|FP_D,		I3	},
 {"round.l.s", "D,S",	0x46000008, 0xffff003f, WR_D|RD_S|FP_S,		I3	},
 {"round.w.d", "D,S",	0x4620000c, 0xffff003f, WR_D|RD_S|FP_D,		I2	},
@@ -979,8 +950,6 @@
 {"sdr",     "t,o(b)",	0xb4000000, 0xfc000000,	SM|RD_t|RD_b,		I3	},
 {"sdr",     "t,A(b)",	0,    (int) M_SDR_AB,	INSN_MACRO,		I3	},
 {"sdxc1",   "S,t(b)",   0x4c000009, 0xfc0007ff, SM|RD_S|RD_t|RD_b,	I4	},
-{"seb",     "d,w",	0x7c000420, 0xffe007ff,	WR_d|RD_t,		I33	},
-{"seh",     "d,w",	0x7c000620, 0xffe007ff,	WR_d|RD_t,		I33	},
 {"selsl",   "d,v,t",	0x00000005, 0xfc0007ff,	WR_d|RD_s|RD_t,		L1	},
 {"selsr",   "d,v,t",	0x00000001, 0xfc0007ff,	WR_d|RD_s|RD_t,		L1	},
 {"seq",     "d,v,t",	0,    (int) M_SEQ,	INSN_MACRO,		I1	},
@@ -1088,7 +1057,6 @@
 {"sync",    "",		0x0000000f, 0xffffffff,	INSN_SYNC,		I2|G1	},
 {"sync.p",  "",		0x0000040f, 0xffffffff,	INSN_SYNC,		I2	},
 {"sync.l",  "",		0x0000000f, 0xffffffff,	INSN_SYNC,		I2	},
-{"synci",   "o(b)",	0x041f0000, 0xfc1f0000,	SM|RD_b,		I33	},
 {"syscall", "",		0x0000000c, 0xffffffff,	TRAP,			I1	},
 {"syscall", "B",	0x0000000c, 0xfc00003f,	TRAP,			I1	},
 {"teqi",    "s,j",	0x040c0000, 0xfc1f0000, RD_s|TRAP,		I2	},
@@ -1157,8 +1125,6 @@
 {"wait",    "J",        0x42000020, 0xfe00003f, TRAP,   		I32|N55	},
 {"waiti",   "",		0x42000020, 0xffffffff,	TRAP,			L1	},
 {"wb", 	    "o(b)",	0xbc040000, 0xfc1f0000, SM|RD_b,		L1	},
-{"wrpgpr",  "d,w",	0x41c00000, 0xffe007ff, RD_t,			I33	},
-{"wsbh",    "d,w",	0x7c0000a0, 0xffe007ff,	WR_d|RD_t,		I33	},
 {"xor",     "d,v,t",	0x00000026, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"xor",     "t,r,I",	0,    (int) M_XOR_I,	INSN_MACRO,		I1	},
 {"xor.ob",  "X,Y,Q",	0x7800000d, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
diff --git a/opcodes/msp430-dis.c b/opcodes/msp430-dis.c
deleted file mode 100644
index 767ffa4..0000000
--- a/opcodes/msp430-dis.c
+++ /dev/null
@@ -1,805 +0,0 @@
-/* Disassemble MSP430 instructions.
-   Copyright (C) 2002 Free Software Foundation, Inc.
-   
-   Contributed by Dmitry Diky <diwil@mail.ru>
-        
-   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.  */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include "dis-asm.h"
-#include "opintl.h"
-#include "libiberty.h"
-
-#define DASM_SECTION
-#include "opcode/msp430.h"
-#undef DASM_SECTION
-
-
-static unsigned short msp430dis_opcode
-  PARAMS ((bfd_vma, disassemble_info *));
-int print_insn_msp430
-  PARAMS ((bfd_vma, disassemble_info *));
-int msp430_nooperands
-  PARAMS ((struct msp430_opcode_s *, bfd_vma, unsigned short, char *, int *));
-int msp430_singleoperand
-  PARAMS ((disassemble_info *, struct msp430_opcode_s *, bfd_vma, unsigned short,
-	   char *, char *, int *));
-int msp430_doubleoperand
-  PARAMS ((disassemble_info *, struct msp430_opcode_s *, bfd_vma, unsigned short,
-	   char *, char *, char *, char *, int *));
-int msp430_branchinstr
-  PARAMS ((disassemble_info *, struct msp430_opcode_s *, bfd_vma, unsigned short,
-	   char *, char *, int *));
-
-#define PS(x)   (0xffff & (x))
-
-static unsigned short
-msp430dis_opcode (addr, info)
-     bfd_vma addr;
-     disassemble_info *info;
-{
-  bfd_byte buffer[2];
-  int status;
-
-  status = info->read_memory_func (addr, buffer, 2, info);
-  if (status != 0)
-    {
-      info->memory_error_func (status, addr, info);
-      return -1;
-    }
-  return bfd_getl16 (buffer);
-}
-
-int
-print_insn_msp430 (addr, info)
-     bfd_vma addr;
-     disassemble_info *info;
-{
-  void *stream = info->stream;
-  fprintf_ftype prin = info->fprintf_func;
-  struct msp430_opcode_s *opcode;
-  char op1[32], op2[32], comm1[64], comm2[64];
-  int cmd_len = 0;
-  unsigned short insn;
-  int cycles = 0;
-  char *bc = "";
-  char dinfo[32];		/* Debug purposes.  */
-
-  insn = msp430dis_opcode (addr, info);
-  sprintf (dinfo, "0x%04x", insn);
-
-  if (((int) addr & 0xffff) > 0xffdf)
-    {
-      (*prin) (stream, "interrupt service routine at 0x%04x", 0xffff & insn);
-      return 2;
-    }
-
-  *comm1 = 0;
-  *comm2 = 0;
-
-  for (opcode = msp430_opcodes; opcode->name; opcode++)
-    {
-      if ((insn & opcode->bin_mask) == opcode->bin_opcode
-	  && opcode->bin_opcode != 0x9300)
-	{
-	  *op1 = 0;
-	  *op2 = 0;
-	  *comm1 = 0;
-	  *comm2 = 0;
-
-	  /* r0 as destination. Ad should be zero.  */
-	  if (opcode->insn_opnumb == 3 && (insn & 0x000f) == 0
-	      && (0x0080 & insn) == 0)
-	    {
-	      cmd_len =
-		msp430_branchinstr (info, opcode, addr, insn, op1, comm1,
-				    &cycles);
-	      if (cmd_len)
-		break;
-	    }
-
-	  switch (opcode->insn_opnumb)
-	    {
-	    case 0:
-	      cmd_len = msp430_nooperands (opcode, addr, insn, comm1, &cycles);
-	      break;
-	    case 2:
-	      cmd_len =
-		msp430_doubleoperand (info, opcode, addr, insn, op1, op2,
-				      comm1, comm2, &cycles);
-	      if (insn & BYTE_OPERATION)
-		bc = ".b";
-	      break;
-	    case 1:
-	      cmd_len =
-		msp430_singleoperand (info, opcode, addr, insn, op1, comm1,
-				      &cycles);
-	      if (insn & BYTE_OPERATION && opcode->fmt != 3)
-		bc = ".b";
-	      break;
-	    default:
-	      break;
-	    }
-	}
-
-      if (cmd_len)
-	break;
-    }
-
-  dinfo[5] = 0;
-
-  if (cmd_len < 1)
-    {
-      /* Unknown opcode, or invalid combination of operands.  */
-      (*prin) (stream, ".word	0x%04x;	????", PS (insn));
-      return 2;
-    }
-
-  (*prin) (stream, "%s%s", opcode->name, bc);
-
-  if (*op1)
-    (*prin) (stream, "\t%s", op1);
-  if (*op2)
-    (*prin) (stream, ",");
-
-  if (strlen (op1) < 7)
-    (*prin) (stream, "\t");
-  if (!strlen (op1))
-    (*prin) (stream, "\t");
-
-  if (*op2)
-    (*prin) (stream, "%s", op2);
-  if (strlen (op2) < 8)
-    (*prin) (stream, "\t");
-
-  if (*comm1 || *comm2)
-    (*prin) (stream, ";");
-  else if (cycles)
-    {
-      if (*op2)
-	(*prin) (stream, ";");
-      else
-	{
-	  if (strlen (op1) < 7)
-	    (*prin) (stream, ";");
-	  else
-	    (*prin) (stream, "\t;");
-	}
-    }
-  if (*comm1)
-    (*prin) (stream, "%s", comm1);
-  if (*comm1 && *comm2)
-    (*prin) (stream, ",");
-  if (*comm2)
-    (*prin) (stream, " %s", comm2);
-  return cmd_len;
-}
-
-int
-msp430_nooperands (opcode, addr, insn, comm, cycles)
-     struct msp430_opcode_s *opcode;
-     bfd_vma addr ATTRIBUTE_UNUSED;
-     unsigned short insn ATTRIBUTE_UNUSED;
-     char *comm;
-     int *cycles;
-{
-  /* Pop with constant.  */
-  if (insn == 0x43b2)
-    return 0;
-  if (insn == opcode->bin_opcode)
-    return 2;
-
-  if (opcode->fmt == 0)
-    {
-      if ((insn & 0x0f00) != 3 || (insn & 0x0f00) != 2)
-	return 0;
-
-      strcpy (comm, "emulated...");
-      *cycles = 1;
-    }
-  else
-    {
-      strcpy (comm, "return from interupt");
-      *cycles = 5;
-    }
-
-  return 2;
-}
-
-
-int
-msp430_singleoperand (info, opcode, addr, insn, op, comm, cycles)
-     disassemble_info *info;
-     struct msp430_opcode_s *opcode;
-     bfd_vma addr;
-     unsigned short insn;
-     char *op;
-     char *comm;
-     int *cycles;
-{
-  int regs = 0, regd = 0;
-  int ad = 0, as = 0;
-  int where = 0;
-  int cmd_len = 2;
-  short dst = 0;
-
-  regd = insn & 0x0f;
-  regs = (insn & 0x0f00) >> 8;
-  as = (insn & 0x0030) >> 4;
-  ad = (insn & 0x0080) >> 7;
-
-  switch (opcode->fmt)
-    {
-    case 0:			/* Emulated work with dst register.  */
-      if (regs != 2 && regs != 3 && regs != 1)
-	return 0;
-
-      /* Check if not clr insn.  */
-      if (opcode->bin_opcode == 0x4300 && (ad || as))
-	return 0;
-
-      /* Check if really inc, incd insns.  */
-      if ((opcode->bin_opcode & 0xff00) == 0x5300 && as == 3)
-	return 0;
-
-      if (ad == 0)
-	{
-	  *cycles = 1;
-
-	  /* Register.  */
-	  if (regd == 0)
-	    {
-	      *cycles += 1;
-	      sprintf (op, "r0");
-	    }
-	  else if (regd == 1)
-	    sprintf (op, "r1");
-
-	  else if (regd == 2)
-	    sprintf (op, "r2");
-
-	  else
-	    sprintf (op, "r%d", regd);
-	}
-      else			/* ad == 1 msp430dis_opcode.  */
-	{
-	  if (regd == 0)
-	    {
-	      /* PC relative.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      *cycles = 4;
-	      sprintf (op, "0x%04x", dst);
-	      sprintf (comm, "PC rel. abs addr 0x%04x",
-		       PS ((short) (addr + 2) + dst));
-	    }
-	  else if (regd == 2)
-	    {
-	      /* Absolute.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      *cycles = 4;
-	      sprintf (op, "&0x%04x", PS (dst));
-	    }
-	  else
-	    {
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      *cycles = 4;
-	      sprintf (op, "%d(r%d)", dst, regd);
-	    }
-	}
-      break;
-
-    case 2:	/* rrc, push, call, swpb, rra, sxt, push, call, reti etc...  */
-
-      if (as == 0)
-	{
-	  if (regd == 3)
-	    {
-	      /* Constsnts.  */
-	      sprintf (op, "#0");
-	      sprintf (comm, "r3 As==00");
-	    }
-	  else
-	    {
-	      /* Register.  */
-	      sprintf (op, "r%d", regd);
-	    }
-	  *cycles = 1;
-	}
-      else if (as == 2)
-	{
-	  *cycles = 1;
-	  if (regd == 2)
-	    {
-	      sprintf (op, "#4");
-	      sprintf (comm, "r2 As==10");
-	    }
-	  else if (regd == 3)
-	    {
-	      sprintf (op, "#2");
-	      sprintf (comm, "r3 As==10");
-	    }
-	  else
-	    {
-	      *cycles = 3;
-	      /* Indexed register mode @Rn.  */
-	      sprintf (op, "@r%d", regd);
-	    }
-	}
-      else if (as == 3)
-	{
-	  *cycles = 1;
-	  if (regd == 2)
-	    {
-	      sprintf (op, "#8");
-	      sprintf (comm, "r2 As==11");
-	    }
-	  else if (regd == 3)
-	    {
-	      sprintf (op, "#-1");
-	      sprintf (comm, "r3 As==11");
-	    }
-	  else if (regd == 0)
-	    {
-	      *cycles = 3;
-	      /* absolute. @pc+ */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      sprintf (op, "#%d", dst);
-	      sprintf (comm, "#0x%04x", PS (dst));
-	    }
-	  else
-	    {
-	      *cycles = 3;
-	      sprintf (op, "@r%d+", regd);
-	    }
-	}
-      else if (as == 1)
-	{
-	  *cycles = 4;
-	  if (regd == 0)
-	    {
-	      /* PC relative.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      sprintf (op, "0x%04x", PS (dst));
-	      sprintf (comm, "PC rel. 0x%04x",
-		       PS ((short) addr + 2 + dst));
-	    }
-	  else if (regd == 2)
-	    {
-	      /* Absolute.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      sprintf (op, "&0x%04x", PS (dst));
-	    }
-	  else if (regd == 3)
-	    {
-	      *cycles = 1;
-	      sprintf (op, "#1");
-	      sprintf (comm, "r3 As==01");
-	    }
-	  else
-	    {
-	      /* Indexd.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 2;
-	      sprintf (op, "%d(r%d)", dst, regd);
-	    }
-	}
-      break;
-
-    case 3:			/* Jumps.  */
-      where = insn & 0x03ff;
-      if (where & 0x200)
-	where |= ~0x03ff;
-      if (where > 512 || where < -511)
-	return 0;
-
-      where *= 2;
-      sprintf (op, "$%+-8d", where + 2);
-      sprintf (comm, "abs 0x%x", PS ((short) (addr) + 2 + where));
-      *cycles = 2;
-      return 2;
-      break;
-    default:
-      cmd_len = 0;
-    }
-
-  return cmd_len;
-}
-
-int
-msp430_doubleoperand (info, opcode, addr, insn, op1, op2, comm1, comm2, cycles)
-     disassemble_info *info;
-     struct msp430_opcode_s *opcode;
-     bfd_vma addr;
-     unsigned short insn;
-     char *op1, *op2;
-     char *comm1, *comm2;
-     int *cycles;
-{
-  int regs = 0, regd = 0;
-  int ad = 0, as = 0;
-  int cmd_len = 2;
-  short dst = 0;
-
-  regd = insn & 0x0f;
-  regs = (insn & 0x0f00) >> 8;
-  as = (insn & 0x0030) >> 4;
-  ad = (insn & 0x0080) >> 7;
-
-  if (opcode->fmt == 0)
-    {
-      /* Special case: rla and rlc are the only 2 emulated instructions that
-	 fall into two operand instructions.  */
-      /* With dst, there are only:
-	 Rm       	Register,
-         x(Rm)     	Indexed,
-         0xXXXX    	Relative,
-         &0xXXXX    	Absolute 
-         emulated_ins   dst
-         basic_ins      dst, dst.  */
-
-      if (regd != regs || as != ad)
-	return 0;		/* May be 'data' section.  */
-
-      if (ad == 0)
-	{
-	  /* Register mode.  */
-	  if (regd == 3)
-	    {
-	      strcpy (comm1, "Illegal as emulation instr");
-	      return -1;
-	    }
-
-	  sprintf (op1, "r%d", regd);
-	  *cycles = 1;
-	}
-      else			/* ad == 1 */
-	{
-	  if (regd == 0)
-	    {
-	      /* PC relative, Symbolic.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 4;
-	      *cycles = 6;
-	      sprintf (op1, "0x%04x", PS (dst));
-	      sprintf (comm1, "PC rel. 0x%04x",
-		       PS ((short) addr + 2 + dst));
-
-	    }
-	  else if (regd == 2)
-	    {
-	      /* Absolute.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 4;
-	      *cycles = 6;
-	      sprintf (op1, "&0x%04x", PS (dst));
-	    }
-	  else
-	    {
-	      /* Indexed.  */
-	      dst = msp430dis_opcode (addr + 2, info);
-	      cmd_len += 4;
-	      *cycles = 6;
-	      sprintf (op1, "%d(r%d)", dst, regd);
-	    }
-	}
-
-      *op2 = 0;
-      *comm2 = 0;
-      return cmd_len;
-    }
-
-  /* Two operands exactly.  */
-  if (ad == 0 && regd == 3)
-    {
-      /* R2/R3 are illegal as dest: may be data section.  */
-      strcpy (comm1, "Illegal as 2-op instr");
-      return -1;
-    }
-
-  /* Source.  */
-  if (as == 0)
-    {
-      *cycles = 1;
-      if (regs == 3)
-	{
-	  /* Constsnts.  */
-	  sprintf (op1, "#0");
-	  sprintf (comm1, "r3 As==00");
-	}
-      else
-	{
-	  /* Register.  */
-	  sprintf (op1, "r%d", regs);
-	}
-    }
-  else if (as == 2)
-    {
-      *cycles = 1;
-
-      if (regs == 2)
-	{
-	  sprintf (op1, "#4");
-	  sprintf (comm1, "r2 As==10");
-	}
-      else if (regs == 3)
-	{
-	  sprintf (op1, "#2");
-	  sprintf (comm1, "r3 As==10");
-	}
-      else
-	{
-	  *cycles = 2;
-
-	  /* Indexed register mode @Rn.  */
-	  sprintf (op1, "@r%d", regs);
-	}
-      if (!regs)
-	*cycles = 3;
-    }
-  else if (as == 3)
-    {
-      if (regs == 2)
-	{
-	  sprintf (op1, "#8");
-	  sprintf (comm1, "r2 As==11");
-	  *cycles = 1;
-	}
-      else if (regs == 3)
-	{
-	  sprintf (op1, "#-1");
-	  sprintf (comm1, "r3 As==11");
-	  *cycles = 1;
-	}
-      else if (regs == 0)
-	{
-	  *cycles = 3;
-	  /* Absolute. @pc+  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "#%d", dst);
-	  sprintf (comm1, "#0x%04x", PS (dst));
-	}
-      else
-	{
-	  *cycles = 2;
-	  sprintf (op1, "@r%d+", regs);
-	}
-    }
-  else if (as == 1)
-    {
-      if (regs == 0)
-	{
-	  *cycles = 4;
-	  /* PC relative.  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "0x%04x", PS (dst));
-	  sprintf (comm1, "PC rel. 0x%04x",
-		   PS ((short) addr + 2 + dst));
-	}
-      else if (regs == 2)
-	{
-	  *cycles = 2;
-	  /* Absolute.  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "&0x%04x", PS (dst));
-	  sprintf (comm1, "0x%04x", PS (dst));
-	}
-      else if (regs == 3)
-	{
-	  *cycles = 1;
-	  sprintf (op1, "#1");
-	  sprintf (comm1, "r3 As==01");
-	}
-      else
-	{
-	  *cycles = 3;
-	  /* Indexed.  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "%d(r%d)", dst, regs);
-	}
-    }
-
-  /* Destination. Special care needed on addr + XXXX.  */
-
-  if (ad == 0)
-    {
-      /* Register.  */
-      if (regd == 0)
-	{
-	  *cycles += 1;
-	  sprintf (op2, "r0");
-	}
-      else if (regd == 1)
-	sprintf (op2, "r1");
-
-      else if (regd == 2)
-	sprintf (op2, "r2");
-
-      else
-	sprintf (op2, "r%d", regd);
-    }
-  else				/* ad == 1.  */
-    {
-      * cycles += 3;
-
-      if (regd == 0)
-	{
-	  /* PC relative.  */
-	  *cycles += 1;
-	  dst = msp430dis_opcode (addr + cmd_len, info);
-	  sprintf (op2, "0x%04x", PS (dst));
-	  sprintf (comm2, "PC rel. 0x%04x",
-		   PS ((short) addr + cmd_len + dst));
-	  cmd_len += 2;
-	}
-      else if (regd == 2)
-	{
-	  /* Absolute.  */
-	  dst = msp430dis_opcode (addr + cmd_len, info);
-	  cmd_len += 2;
-	  sprintf (op2, "&0x%04x", PS (dst));
-	}
-      else
-	{
-	  dst = msp430dis_opcode (addr + cmd_len, info);
-	  cmd_len += 2;
-	  sprintf (op2, "%d(r%d)", dst, regd);
-	}
-    }
-
-  return cmd_len;
-}
-
-
-int
-msp430_branchinstr (info, opcode, addr, insn, op1, comm1, cycles)
-     disassemble_info *info;
-     struct msp430_opcode_s *opcode ATTRIBUTE_UNUSED;
-     bfd_vma addr ATTRIBUTE_UNUSED;
-     unsigned short insn;
-     char *op1;
-     char *comm1;
-     int *cycles;
-{
-  int regs = 0, regd = 0;
-  int ad = 0, as = 0;
-  int cmd_len = 2;
-  short dst = 0;
-
-  regd = insn & 0x0f;
-  regs = (insn & 0x0f00) >> 8;
-  as = (insn & 0x0030) >> 4;
-  ad = (insn & 0x0080) >> 7;
-
-  if (regd != 0)	/* Destination register is not a PC.  */
-    return 0;
-
-  /* dst is a source register.  */
-  if (as == 0)
-    {
-      /* Constants.  */
-      if (regs == 3)
-	{
-	  *cycles = 1;
-	  sprintf (op1, "#0");
-	  sprintf (comm1, "r3 As==00");
-	}
-      else
-	{
-	  /* Register.  */
-	  *cycles = 1;
-	  sprintf (op1, "r%d", regs);
-	}
-    }
-  else if (as == 2)
-    {
-      if (regs == 2)
-	{
-	  *cycles = 2;
-	  sprintf (op1, "#4");
-	  sprintf (comm1, "r2 As==10");
-	}
-      else if (regs == 3)
-	{
-	  *cycles = 1;
-	  sprintf (op1, "#2");
-	  sprintf (comm1, "r3 As==10");
-	}
-      else
-	{
-	  /* Indexed register mode @Rn.  */
-	  *cycles = 2;
-	  sprintf (op1, "@r%d", regs);
-	}
-    }
-  else if (as == 3)
-    {
-      if (regs == 2)
-	{
-	  *cycles = 1;
-	  sprintf (op1, "#8");
-	  sprintf (comm1, "r2 As==11");
-	}
-      else if (regs == 3)
-	{
-	  *cycles = 1;
-	  sprintf (op1, "#-1");
-	  sprintf (comm1, "r3 As==11");
-	}
-      else if (regs == 0)
-	{
-	  /* Absolute. @pc+  */
-	  *cycles = 3;
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "#0x%04x", PS (dst));
-	}
-      else
-	{
-	  *cycles = 2;
-	  sprintf (op1, "@r%d+", regs);
-	}
-    }
-  else if (as == 1)
-    {
-      * cycles = 3;
-
-      if (regs == 0)
-	{
-	  /* PC relative.  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  (*cycles)++;
-	  sprintf (op1, "0x%04x", PS (dst));
-	  sprintf (comm1, "PC rel. 0x%04x",
-		   PS ((short) addr + 2 + dst));
-	}
-      else if (regs == 2)
-	{
-	  /* Absolute.  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "&0x%04x", PS (dst));
-	}
-      else if (regs == 3)
-	{
-	  (*cycles)--;
-	  sprintf (op1, "#1");
-	  sprintf (comm1, "r3 As==01");
-	}
-      else
-	{
-	  /* Indexd.  */
-	  dst = msp430dis_opcode (addr + 2, info);
-	  cmd_len += 2;
-	  sprintf (op1, "%d(r%d)", dst, regs);
-	}
-    }
-
-  return cmd_len;
-}
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 1b62f87..75f34c8 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4552,8 +4552,8 @@
 
 { "extlwi",  4,   PPCCOM,	"rlwinm %0,%1,%3,0,(%2)-1" },
 { "extlwi.", 4,   PPCCOM,	"rlwinm. %0,%1,%3,0,(%2)-1" },
-{ "extrwi",  4,   PPCCOM,	"rlwinm %0,%1,((%2)+(%3))&((%2)+(%3)<>32),32-(%2),31" },
-{ "extrwi.", 4,   PPCCOM,	"rlwinm. %0,%1,((%2)+(%3))&((%2)+(%3)<>32),32-(%2),31" },
+{ "extrwi",  4,   PPCCOM,	"rlwinm %0,%1,(%2)+(%3),32-(%2),31" },
+{ "extrwi.", 4,   PPCCOM,	"rlwinm. %0,%1,(%2)+(%3),32-(%2),31" },
 { "inslwi",  4,   PPCCOM,	"rlwimi %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1" },
 { "inslwi.", 4,   PPCCOM,	"rlwimi. %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1"},
 { "insrwi",  4,   PPCCOM,	"rlwimi %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1" },
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 1c2df78..022d139 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,8 +1,3 @@
-2003-01-08  Chris Demetriou  <cgd@broadcom.com>
-
-	* config.guess: Update to 2003-01-03 version.
-	* config.sub: Update to 2003-01-03 version.
-
 2002-12-16  Christopher Faylor  <cgf@redhat.com>
 
 	* configure.in: Remove --enable-shared option.  It shouldn't be used
diff --git a/readline/support/config.guess b/readline/support/config.guess
index ca12b79..c5438de 100755
--- a/readline/support/config.guess
+++ b/readline/support/config.guess
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2003-01-03'
+timestamp='2002-08-23'
 
 # 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
@@ -98,31 +98,30 @@
 # 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.
+# This shell variable is my proudest work .. or something. --bje
 
-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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
 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
+	  if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
+	rm -f $files ;
 	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 ;'
+esac ;
+unset files'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -179,18 +178,7 @@
 		;;
 	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
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -235,9 +223,6 @@
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    *:MicroBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
-	exit 0 ;;
     alpha:OSF1:*:*)
 	if test $UNAME_RELEASE = "V4.0"; then
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -272,7 +257,7 @@
 	jsr \$26,exit
 	.end main
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 	if test "$?" = 0 ; then
 		case `$dummy` in
 			0-0)
@@ -301,6 +286,7 @@
 				;;
 		esac
 	fi
+	rm -f $dummy.s $dummy && rmdir $tmpdir
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
@@ -451,18 +437,16 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
+	$CC_FOR_BUILD $dummy.c -o $dummy \
 	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
 	exit 0 ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit 0 ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+    Night_Hawk:*:*:PowerMAX_OS)
 	echo powerpc-harris-powermax
 	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
@@ -537,7 +521,8 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+		rm -f $dummy.c $dummy && rmdir $tmpdir
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -635,21 +620,11 @@
                   exit (0);
               }
 EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
+		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+		    rm -f $dummy.c $dummy && rmdir $tmpdir
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
     ia64:HP-UX:*:*)
@@ -683,7 +658,8 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -741,15 +717,15 @@
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
-    *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
-	exit 0 ;;
     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/\///'`
@@ -777,6 +753,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c && rmdir $tmpdir
 	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
 	exit 0 ;;
     i*:CYGWIN*:*)
@@ -789,16 +766,13 @@
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit 0 ;;
     x86:Interix*:3*)
-	echo i586-pc-interix3
-	exit 0 ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
+	echo i386-pc-interix3
 	exit 0 ;;
     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
+	echo i386-pc-interix
 	exit 0 ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
@@ -841,26 +815,8 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    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 | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	rm -f $dummy.c && rmdir $tmpdir
+	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
@@ -955,6 +911,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c && rmdir $tmpdir
 	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
@@ -972,23 +929,6 @@
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit 0 ;;
-    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 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
     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
@@ -1023,6 +963,9 @@
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
 	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -1049,12 +992,9 @@
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
 	exit 0 ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*: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)
+    3[34]??:*: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)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1071,6 +1011,9 @@
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
@@ -1165,7 +1108,7 @@
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
     *:NonStop-UX:*:*)
@@ -1188,6 +1131,11 @@
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
 	exit 0 ;;
+    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 0 ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
 	exit 0 ;;
@@ -1206,6 +1154,12 @@
     *:ITS:*:*)
 	echo pdp10-unknown-its
 	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1326,7 +1280,8 @@
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+rm -f $dummy.c $dummy && rmdir $tmpdir
 
 # Apollos put the system type in the environment.
 
diff --git a/readline/support/config.sub b/readline/support/config.sub
index 04baf3d..b0222f7 100755
--- a/readline/support/config.sub
+++ b/readline/support/config.sub
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2003-01-03'
+timestamp='2002-08-22'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@
 # 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -229,7 +229,7 @@
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| clipper \
+	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
 	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -245,13 +245,11 @@
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
 	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
-	| msp430 \
 	| ns16k | ns32k \
 	| openrisc | or32 \
 	| pdp10 | pdp11 | pj | pjl \
@@ -296,7 +294,7 @@
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* \
 	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
+	| c[123]* | c30-* | [cjt]90-* | c54x-* \
 	| clipper-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
@@ -317,13 +315,11 @@
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
 	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| mipstx39 | mipstx39el \
+	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -333,7 +329,7 @@
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
 	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
+	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -720,10 +716,6 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -909,6 +901,10 @@
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	t3d)
+		basic_machine=alpha-cray
+		os=-unicos
+		;;
 	t3e)
 		basic_machine=alphaev5-cray
 		os=-unicos
@@ -917,10 +913,6 @@
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-        tic4x | c4x*)
-		basic_machine=tic4x-unknown
-		os=-coff
-		;;
 	tic54x | c54x*)
 		basic_machine=tic54x-unknown
 		os=-coff
@@ -981,6 +973,10 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	windows32)
+		basic_machine=i386-pc
+		os=-windows32-msvcrt
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1051,6 +1047,10 @@
 	pmac | pmac-mpw)
 		basic_machine=powerpc-apple
 		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
 	*-unknown)
 		# Make sure to match an already-canonicalized machine name.
 		;;
@@ -1113,12 +1113,11 @@
 	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -interix* | -uwin* | -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* | -microbsd*)
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1130,10 +1129,8 @@
 			;;
 		esac
 		;;
-	-nto-qnx*)
-		;;
 	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		os=-nto-qnx
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 46a2cc8..37ded33 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,7 +1,3 @@
-2003-01-08  Kazu Hirata  <kazu@cs.umass.edu>
-
-	* run.c (usage): Fix typos.
-
 2002-11-27  Richard Sandiford  <rsandifo@redhat.com>
 
 	* sim-fpu.c (sim_fpu_inv): Use sim_fpu_div.
diff --git a/sim/common/run.c b/sim/common/run.c
index 4131dd7..ca3194b 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -326,8 +326,8 @@
   fprintf (stderr, "-c size         Set simulator cache size to `size'.\n");
 #endif
 #ifdef SIM_H8300
-  fprintf (stderr, "-h              Executable is for H8/300H.\n");
-  fprintf (stderr, "-S              Executable is for H8S.\n");
+  fprintf (stderr, "-h              Executable is for h8/300h.\n");
+  fprintf (stderr, "-S              Executable is for h8/300s.\n");
 #endif
   fprintf (stderr, "-m size         Set memory size of simulator, in bytes.\n");
 #ifdef SIM_HAVE_ENVIRONMENT
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 2a91af9..657a69f 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,8 +1,3 @@
-2002-12-26  Kazu Hirata  <kazu@cs.umass.edu>
-
-	* compile.c: Fix formatting.
-	* inst.h: Likewise.
-
 2002-07-29  Andrey Volkov  <avolkov@transas.com>
 
  	* compile.c: Include "gdb/sim-h8300.h"
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 3d9e3c8..8e4b55d 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -83,9 +83,8 @@
 #define HIGH_BYTE(x) (((x) >> 8) & 0xff)
 #define P(X,Y) ((X << 8) | Y)
 
-#define BUILDSR()					\
-  cpu.ccr = ((I << 7) | (UI << 6) | (H << 5) | (U << 4)	\
-	     | (N << 3) | (Z << 2) | (V << 1) | C);
+#define BUILDSR()   cpu.ccr = (I << 7) | (UI << 6)| (H<<5) | (U<<4) | \
+                              (N << 3) | (Z << 2) | (V<<1) | C;
 
 #define BUILDEXR()	    \
   if (h8300smode) cpu.exr = (trace<<7) | intMask;
@@ -100,19 +99,17 @@
   ui = ((cpu.ccr >> 6) & 1);\
   intMaskBit = (cpu.ccr >> 7) & 1;
 
-#define GETEXR()				\
-  if (h8300smode)				\
-    {						\
-      trace = (cpu.exr >> 7) & 1;		\
-      intMask = cpu.exr & 7;			\
-    }
+#define GETEXR()	    \
+  if (h8300smode) { \
+    trace = (cpu.exr >> 7) & 1;\
+    intMask = cpu.exr & 7; }
 
 #ifdef __CHAR_IS_SIGNED__
 #define SEXTCHAR(x) ((char) (x))
 #endif
 
 #ifndef SEXTCHAR
-#define SEXTCHAR(x) ((x & 0x80) ? (x | ~0xff) : x & 0xff)
+#define SEXTCHAR(x) ((x & 0x80) ? (x | ~0xff): x & 0xff)
 #endif
 
 #define UEXTCHAR(x) ((x) & 0xff)
@@ -1025,15 +1022,15 @@
 
 
 #define ALUOP(STORE, NAME, HOW) \
-    case O (NAME, SB): HOW; if (STORE) goto alu8;  else goto just_flags_alu8;  \
-    case O (NAME, SW): HOW; if (STORE) goto alu16; else goto just_flags_alu16; \
-    case O (NAME, SL): HOW; if (STORE) goto alu32; else goto just_flags_alu32;
+    case O (NAME,SB):  HOW; if (STORE)goto alu8;else goto just_flags_alu8;  \
+    case O (NAME, SW): HOW; if (STORE)goto alu16;else goto just_flags_alu16; \
+    case O (NAME,SL):  HOW; if (STORE)goto alu32;else goto just_flags_alu32;
 
 
-#define LOGOP(NAME, HOW)			\
-    case O (NAME, SB): HOW; goto log8;		\
-    case O (NAME, SW): HOW; goto log16;		\
-    case O (NAME, SL): HOW; goto log32;
+#define LOGOP(NAME, HOW) \
+    case O (NAME,SB): HOW; goto log8;\
+    case O (NAME, SW): HOW; goto log16;\
+    case O (NAME,SL): HOW; goto log32;
 
 
 
@@ -1143,36 +1140,32 @@
 
 	case O (O_EEPMOV, SB):
 	case O (O_EEPMOV, SW):
-	  if (h8300hmode || h8300smode)
+	  if (h8300hmode||h8300smode)
 	    {
-	      register unsigned char *_src, *_dst;
-	      unsigned int count = ((code->opcode == O (O_EEPMOV, SW))
-				    ? cpu.regs[R4_REGNUM] & 0xffff
-				    : cpu.regs[R4_REGNUM] & 0xff);
+	      register unsigned char *_src,*_dst;
+	      unsigned int count = (code->opcode == O(O_EEPMOV, SW))?cpu.regs[R4_REGNUM]&0xffff:
+		cpu.regs[R4_REGNUM]&0xff;
 
-	      _src = (cpu.regs[R5_REGNUM] < memory_size
-		      ? cpu.memory + cpu.regs[R5_REGNUM]
-		      : cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff));
-	      if ((_src + count) >= (cpu.memory + memory_size))
+	      _src = cpu.regs[R5_REGNUM] < memory_size ? cpu.memory+cpu.regs[R5_REGNUM] :
+		cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff);
+	      if ((_src+count)>=(cpu.memory+memory_size))
 		{
-		  if ((_src + count) >= (cpu.eightbit + 0x100))
+		  if ((_src+count)>=(cpu.eightbit+0x100))
 		    goto illegal;
 		}
-	      _dst = (cpu.regs[R6_REGNUM] < memory_size
-		      ? cpu.memory + cpu.regs[R6_REGNUM]
-		      : cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff));
-	      if ((_dst + count) >= (cpu.memory + memory_size))
+	      _dst = cpu.regs[R6_REGNUM] < memory_size ? cpu.memory+cpu.regs[R6_REGNUM] :
+	           				       	      cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff);
+	      if ((_dst+count)>=(cpu.memory+memory_size))
 		{
-		  if ((_dst + count) >= (cpu.eightbit + 0x100))
+		  if ((_dst+count)>=(cpu.eightbit+0x100))
 		    goto illegal;
 		}
-	      memcpy (_dst, _src, count);
+	      memcpy(_dst,_src,count);
 
-	      cpu.regs[R5_REGNUM] += count;
-	      cpu.regs[R6_REGNUM] += count;
-	      cpu.regs[R4_REGNUM] &= ((code->opcode == O (O_EEPMOV, SW))
-				      ? (~0xffff) : (~0xff));
-	      cycles += 2 * count;
+	      cpu.regs[R5_REGNUM]+=count;
+	      cpu.regs[R6_REGNUM]+=count;
+	      cpu.regs[R4_REGNUM]&=(code->opcode == O(O_EEPMOV, SW))?(~0xffff):(~0xff);
+	      cycles += 2*count;
 	      goto next;
 	    }
 	  goto illegal;
@@ -1555,7 +1548,7 @@
 	      goto illegal;
 	    }
 	  res = fetch (&code->src);
-	  store (&code->src, res | 0x80);
+	  store (&code->src,res|0x80);
 	  goto just_flags_log8;
 
 	case O (O_DIVU, SB):
@@ -1680,7 +1673,7 @@
 	  goto next;
 
 	default:
-	illegal:
+        illegal:
 	  cpu.state = SIM_STATE_STOPPED;
 	  cpu.exception = SIGILL;
 	  goto end;
@@ -2002,7 +1995,7 @@
 
   init_pointers ();
 
-  if (!h8300smode && rn >= EXR_REGNUM)
+  if (!h8300smode && rn >=EXR_REGNUM)
     rn++;
   switch (rn)
     {
diff --git a/sim/h8300/inst.h b/sim/h8300/inst.h
index 7f6e400..bcf8e4a 100644
--- a/sim/h8300/inst.h
+++ b/sim/h8300/inst.h
@@ -14,13 +14,14 @@
    outside of main memory refers to the eightbit area (in theory, this
    can only happen when simulating H8/300H programs).  We make no attempt
    to catch overlapping addresses, wrapped addresses, etc etc.  */
-#define H8300_MSIZE (1 << 16)
+#define H8300_MSIZE (1<<16)
 
 /* avolkov: 
    Next 2 macros are ugly for any workstation, but while they're work.
-   Memory size MUST be configurable.  */
-#define H8300H_MSIZE (1 << 18) 
-#define H8300S_MSIZE (1 << 24) 
+   Memory size MUST be configurable.
+ */
+#define H8300H_MSIZE (1<<18) 
+#define H8300S_MSIZE (1<<24) 
 
 #define CSIZE 1000
 
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 0f84f0b..c92eb06 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,45 +1,3 @@
-2003-01-05  Richard Sandiford  <rsandifo@redhat.com>
-
-	* Makefile.in (tmp-run-multi): Fix mips16 filter.
-
-2003-01-04  Richard Sandiford  <rsandifo@redhat.com>
-	    Andrew Cagney  <ac131313@redhat.com>
-	    Gavin Romig-Koch  <gavin@redhat.com>
-	    Graydon Hoare  <graydon@redhat.com>
-	    Aldy Hernandez  <aldyh@redhat.com>
-	    Dave Brolley  <brolley@redhat.com>
-	    Chris Demetriou  <cgd@broadcom.com>
-
-	* configure.in (mips64vr*): Define TARGET_ENABLE_FR to 1.
-	(sim_mach_default): New variable.
-	(mips64vr-*-*, mips64vrel-*-*): New configurations.
-	Add a new simulator generator, MULTI.
-	* configure: Regenerate.
-	* Makefile.in (SIM_MULTI_OBJ, SIM_EXTRA_DISTCLEAN): New variables.
-	(multi-run.o): New dependency.
-	(SIM_MULTI_ALL, SIM_MULTI_IGEN_CONFIGS): New variables.
-	(tmp-mach-multi, tmp-itable-multi, tmp-run-multi): New rules.
-	(tmp-multi): Combine them.
-	(BUILT_SRC_FROM_MULTI): New variable.  Depend on tmp-multi.
-	(clean-extra): Remove sources in BUILT_SRC_FROM_MULTI.
-	(distclean-extra): New rule.
-	* sim-main.h: Include bfd.h.
-	(MIPS_MACH): New macro.
-	* mips.igen (vr4120, vr5400, vr5500): New models.
-	(clo, clz, dclo, dclz, madd, maddu, msub, msub, mul): Add *vr5500.
-	* vr.igen: Replace with new version.
-
-2003-01-04  Chris Demetriou  <cgd@broadcom.com>
-
-	* configure.in: Use SIM_AC_OPTION_RESERVED_BITS(1).
-	* configure: Regenerate.
-
-2002-12-31  Chris Demetriou  <cgd@broadcom.com>
-
-	* sim-main.h (check_branch_bug, mark_branch_bug): Remove.
-	* mips.igen: Remove all invocations of check_branch_bug and
-	mark_branch_bug.
-
 2002-12-16  Chris Demetriou  <cgd@broadcom.com>
 
         * tconfig.in: Include "gdb/callback.h" and "gdb/remote-sim.h".
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index b709ce8..e0e9faf 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -33,7 +33,6 @@
 	itable.o \
 	m16run.o \
 
-SIM_MULTI_OBJ = itable.o @sim_multi_obj@
 
 MIPS_EXTRA_OBJS = @mips_extra_objs@
 MIPS_EXTRA_LIBS = @mips_extra_libs@
@@ -58,7 +57,6 @@
 SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
 
 SIM_EXTRA_CLEAN = clean-extra
-SIM_EXTRA_DISTCLEAN = distclean-extra
 
 SIM_EXTRA_ALL = $(SIM_@sim_gen@_ALL)
 
@@ -76,8 +74,6 @@
 
 mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
 
-multi-run.o: multi-include.h tmp-mach-multi
-
 ../igen/igen:
 	cd ../igen && $(MAKE)
 
@@ -102,7 +98,6 @@
 
 SIM_IGEN_ALL = tmp-igen
 SIM_M16_ALL = tmp-m16
-SIM_MULTI_ALL = tmp-multi
 
 $(BUILT_SRC_FROM_GEN): $(SIM_@sim_gen@_ALL)
 
@@ -296,99 +291,10 @@
 	touch tmp-m16
 
 
-BUILT_SRC_FROM_MULTI = @sim_multi_src@
-SIM_MULTI_IGEN_CONFIGS = @sim_multi_igen_configs@
-
-$(BUILT_SRC_FROM_MULTI): tmp-multi
-tmp-multi: tmp-mach-multi tmp-itable-multi tmp-run-multi targ-vals.h
-tmp-mach-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-	for t in $(SIM_MULTI_IGEN_CONFIGS); do \
-	  p=`echo $${t} | sed -e 's/:.*//'` ; \
-	  m=`echo $${t} | sed -e 's/.*:\(.*\):.*/\1/'` ; \
-	  f=`echo $${t} | sed -e 's/.*://'` ; \
-	  case $${p} in \
-	    m16*) e="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
-	    *) e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
-	  esac; \
-	  ../igen/igen \
-		$(IGEN_TRACE) \
-		$${e} \
-		-I $(srcdir) \
-		-Werror \
-		-Wnodiscard \
-		-N 0 \
-		-M $${m} \
-		-G gen-direct-access \
-		-G gen-zero-r0 \
-		-i $(IGEN_INSN) \
-		-P $${p}_ \
-		-x \
-		-n $${p}_icache.h    -hc tmp-icache.h \
-		-n $${p}_icache.c    -c  tmp-icache.c \
-		-n $${p}_semantics.h -hs tmp-semantics.h \
-		-n $${p}_semantics.c -s  tmp-semantics.c \
-		-n $${p}_idecode.h   -hd tmp-idecode.h \
-		-n $${p}_idecode.c   -d  tmp-idecode.c \
-		-n $${p}_model.h     -hm tmp-model.h \
-		-n $${p}_model.c     -m  tmp-model.c \
-		-n $${p}_support.h   -hf tmp-support.h \
-		-n $${p}_support.c   -f  tmp-support.c \
-		-n $${p}_engine.h    -he tmp-engine.h \
-		-n $${p}_engine.c    -e  tmp-engine.c \
-		; \
-	  $(srcdir)/../../move-if-change tmp-icache.h $${p}_icache.h ; \
-	  $(srcdir)/../../move-if-change tmp-icache.c $${p}_icache.c ; \
-	  $(srcdir)/../../move-if-change tmp-idecode.h $${p}_idecode.h ; \
-	  $(srcdir)/../../move-if-change tmp-idecode.c $${p}_idecode.c ; \
-	  $(srcdir)/../../move-if-change tmp-semantics.h $${p}_semantics.h ; \
-	  $(srcdir)/../../move-if-change tmp-semantics.c $${p}_semantics.c ; \
-	  $(srcdir)/../../move-if-change tmp-model.h $${p}_model.h ; \
-	  $(srcdir)/../../move-if-change tmp-model.c $${p}_model.c ; \
-	  $(srcdir)/../../move-if-change tmp-support.h $${p}_support.h ; \
-	  $(srcdir)/../../move-if-change tmp-support.c $${p}_support.c ; \
-	  $(srcdir)/../../move-if-change tmp-engine.h $${p}_engine.h ; \
-	  $(srcdir)/../../move-if-change tmp-engine.c $${p}_engine.c ; \
-	done
-	touch tmp-mach-multi
-tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-	../igen/igen \
-		$(IGEN_TRACE) \
-		-I $(srcdir) \
-		-Werror \
-		-Wnodiscard \
-		-Wnowidth \
-		-N 0 \
-		@sim_multi_flags@ \
-		-G gen-direct-access \
-		-G gen-zero-r0 \
-		-i $(IGEN_INSN) \
-		-n itable.h    -ht tmp-itable.h \
-		-n itable.c    -t  tmp-itable.c \
-		#
-	$(srcdir)/../../move-if-change tmp-itable.h itable.h
-	$(srcdir)/../../move-if-change tmp-itable.c itable.c
-	touch tmp-itable-multi
-tmp-run-multi: $(srcdir)/m16run.c
-	for t in $(SIM_MULTI_IGEN_CONFIGS); do \
-	  case $${t} in \
-	    m16*) \
-	      m=`echo $${t} | sed -e 's/^m16//' -e 's/:.*//'`; \
-	      sed <  $(srcdir)/m16run.c > tmp-run \
-		    -e "s/^sim_/m16$${m}_/" \
-		    -e "s/m16_/m16$${m}_/" \
-		    -e "s/m32_/m32$${m}_/" ; \
-	      $(srcdir)/../../move-if-change tmp-run m16$${m}_run.c ; \
-	  esac \
-	done
-	touch tmp-run-multi
-
 clean-extra:
 	rm -f $(BUILT_SRC_FROM_GEN)
 	rm -f $(BUILT_SRC_FROM_IGEN)
 	rm -f $(BUILT_SRC_FROM_M16)
-	rm -f $(BUILT_SRC_FROM_MULTI)
 	rm -f tmp-*
 	rm -f m16*.o m32*.o itable*.o
 
-distclean-extra:
-	rm -f multi-include.h multi-run.c
diff --git a/sim/mips/configure b/sim/mips/configure
index a0471b3..92ea0b5 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -163,8 +163,6 @@
 ac_help="$ac_help
   --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
-  --enable-sim-reserved-bits		Specify whether to check reserved bits in instruction."
-ac_help="$ac_help
   --enable-sim-endian=endian		Specify target byte endian orientation."
 ac_help="$ac_help
   --enable-sim-bitsize=N		Specify target bitsize (32 or 64)."
@@ -699,7 +697,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:703: checking how to run the C preprocessor" >&5
+echo "configure:701: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -714,13 +712,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 718 "configure"
+#line 716 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -731,13 +729,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 735 "configure"
+#line 733 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -748,13 +746,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 752 "configure"
+#line 750 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -779,7 +777,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:783: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:781: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -806,7 +804,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:810: checking for POSIXized ISC" >&5
+echo "configure:808: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -827,12 +825,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:831: checking for ANSI C header files" >&5
+echo "configure:829: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 836 "configure"
+#line 834 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -840,7 +838,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -857,7 +855,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 861 "configure"
+#line 859 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -875,7 +873,7 @@
 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 <<EOF
-#line 879 "configure"
+#line 877 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -896,7 +894,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 900 "configure"
+#line 898 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -907,7 +905,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -931,12 +929,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:935: checking for working const" >&5
+echo "configure:933: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 940 "configure"
+#line 938 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -985,7 +983,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1006,21 +1004,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1010: checking for inline" >&5
+echo "configure:1008: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1017 "configure"
+#line 1015 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1046,12 +1044,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1050: checking for off_t" >&5
+echo "configure:1048: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1055 "configure"
+#line 1053 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1079,12 +1077,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1083: checking for size_t" >&5
+echo "configure:1081: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1088 "configure"
+#line 1086 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1114,19 +1112,19 @@
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1118: checking for working alloca.h" >&5
+echo "configure:1116: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1123 "configure"
+#line 1121 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -1147,12 +1145,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1151: checking for alloca" >&5
+echo "configure:1149: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1156 "configure"
+#line 1154 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1180,7 +1178,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -1212,12 +1210,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1216: checking whether alloca needs Cray hooks" >&5
+echo "configure:1214: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1221 "configure"
+#line 1219 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1242,12 +1240,12 @@
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1246: checking for $ac_func" >&5
+echo "configure:1244: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1251 "configure"
+#line 1249 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1270,7 +1268,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1297,7 +1295,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1301: checking stack direction for C alloca" >&5
+echo "configure:1299: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1305,7 +1303,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1309 "configure"
+#line 1307 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1324,7 +1322,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -1349,17 +1347,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1353: checking for $ac_hdr" >&5
+echo "configure:1351: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1356 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1388,12 +1386,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1392: checking for $ac_func" >&5
+echo "configure:1390: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1397 "configure"
+#line 1395 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1416,7 +1414,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1441,7 +1439,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1445: checking for working mmap" >&5
+echo "configure:1443: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1449,7 +1447,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1453 "configure"
+#line 1451 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1589,7 +1587,7 @@
 }
 
 EOF
-if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -1612,12 +1610,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1616: checking for Cygwin environment" >&5
+echo "configure:1614: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1619 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1628,7 +1626,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1645,19 +1643,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1649: checking for mingw32 environment" >&5
+echo "configure:1647: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1654 "configure"
+#line 1652 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1724,7 +1722,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1728: checking host system type" >&5
+echo "configure:1726: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1745,7 +1743,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1749: checking target system type" >&5
+echo "configure:1747: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1763,7 +1761,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1767: checking build system type" >&5
+echo "configure:1765: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1807,7 +1805,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1811: checking for $ac_word" >&5
+echo "configure:1809: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1837,7 +1835,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1841: checking for $ac_word" >&5
+echo "configure:1839: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1888,7 +1886,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1892: checking for $ac_word" >&5
+echo "configure:1890: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1920,7 +1918,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1924: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1931,12 +1929,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1935 "configure"
+#line 1933 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1962,12 +1960,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1964: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1971: checking whether we are using GNU C" >&5
+echo "configure:1969: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1976,7 +1974,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1995,7 +1993,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1999: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1997: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2038,7 +2036,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2042: checking for a BSD compatible install" >&5
+echo "configure:2040: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2106,7 +2104,7 @@
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2110: checking for $ac_word" >&5
+echo "configure:2108: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2141,17 +2139,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2145: checking for $ac_hdr" >&5
+echo "configure:2143: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2150 "configure"
+#line 2148 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2181,12 +2179,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2185: checking for $ac_func" >&5
+echo "configure:2183: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2190 "configure"
+#line 2188 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2209,7 +2207,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2238,12 +2236,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2242: checking for $ac_func" >&5
+echo "configure:2240: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2247 "configure"
+#line 2245 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2266,7 +2264,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2300,19 +2298,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2304: checking for LC_MESSAGES" >&5
+echo "configure:2302: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2309 "configure"
+#line 2307 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -2333,7 +2331,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2337: checking whether NLS is requested" >&5
+echo "configure:2335: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
@@ -2353,7 +2351,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2357: checking whether included gettext is requested" >&5
+echo "configure:2355: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
@@ -2372,17 +2370,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2376: checking for libintl.h" >&5
+echo "configure:2374: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2381 "configure"
+#line 2379 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2399,19 +2397,19 @@
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2403: checking for gettext in libc" >&5
+echo "configure:2401: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2408 "configure"
+#line 2406 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
 else
@@ -2427,7 +2425,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2431: checking for bindtextdomain in -lintl" >&5
+echo "configure:2429: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2435,7 +2433,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2439 "configure"
+#line 2437 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2446,7 +2444,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2462,19 +2460,19 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2466: checking for gettext in libintl" >&5
+echo "configure:2464: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2471 "configure"
+#line 2469 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libintl=yes
 else
@@ -2502,7 +2500,7 @@
 	      # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2506: checking for $ac_word" >&5
+echo "configure:2504: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2536,12 +2534,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2540: checking for $ac_func" >&5
+echo "configure:2538: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2545 "configure"
+#line 2543 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2564,7 +2562,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2591,7 +2589,7 @@
 		# Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2595: checking for $ac_word" >&5
+echo "configure:2593: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2627,7 +2625,7 @@
 		# Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2631: checking for $ac_word" >&5
+echo "configure:2629: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2659,7 +2657,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2663 "configure"
+#line 2661 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2667,7 +2665,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2699,7 +2697,7 @@
         # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2703: checking for $ac_word" >&5
+echo "configure:2701: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2733,7 +2731,7 @@
         # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2737: checking for $ac_word" >&5
+echo "configure:2735: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2769,7 +2767,7 @@
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2773: checking for $ac_word" >&5
+echo "configure:2771: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2859,7 +2857,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2863: checking for catalogs to be installed" >&5
+echo "configure:2861: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2887,17 +2885,17 @@
       if test "$CATOBJEXT" = ".cat"; then
 	 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2891: checking for linux/version.h" >&5
+echo "configure:2889: checking for linux/version.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2896 "configure"
+#line 2894 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2966,17 +2964,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2970: checking for $ac_hdr" >&5
+echo "configure:2968: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2975 "configure"
+#line 2973 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3006,17 +3004,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3010: checking for $ac_hdr" >&5
+echo "configure:3008: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3015 "configure"
+#line 3013 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3046,17 +3044,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3050: checking for $ac_hdr" >&5
+echo "configure:3048: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3055 "configure"
+#line 3053 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3086,17 +3084,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3090: checking for $ac_hdr" >&5
+echo "configure:3088: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3095 "configure"
+#line 3093 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3125,12 +3123,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3129: checking for $ac_func" >&5
+echo "configure:3127: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3134 "configure"
+#line 3132 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3153,7 +3151,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3180,7 +3178,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3184: checking for bind in -lsocket" >&5
+echo "configure:3182: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3188,7 +3186,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3192 "configure"
+#line 3190 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3199,7 +3197,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3227,7 +3225,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3231: checking for gethostbyname in -lnsl" >&5
+echo "configure:3229: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3235,7 +3233,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3239 "configure"
+#line 3237 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3246,7 +3244,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3422,12 +3420,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3426: checking return type of signal handlers" >&5
+echo "configure:3424: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3431 "configure"
+#line 3429 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3444,7 +3442,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3466,7 +3464,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3470: checking for executable suffix" >&5
+echo "configure:3468: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3476,7 +3474,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3626,14 +3624,14 @@
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3630: checking whether byte ordering is bigendian" >&5
+echo "configure:3628: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3637 "configure"
+#line 3635 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3644,11 +3642,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3652 "configure"
+#line 3650 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3659,7 +3657,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3679,7 +3677,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3683 "configure"
+#line 3681 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3692,7 +3690,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3775,7 +3773,7 @@
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
     echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:3779: checking compiler warning flags" >&5
+echo "configure:3777: checking compiler warning flags" >&5
     # Separate out the -Werror flag as some files just cannot be
     # compiled with it enabled.
     for w in ${build_warnings}; do
@@ -3785,14 +3783,14 @@
 	    saved_CFLAGS="$CFLAGS"
 	    CFLAGS="$CFLAGS $w"
 	    cat > conftest.$ac_ext <<EOF
-#line 3789 "configure"
+#line 3787 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
@@ -3807,23 +3805,6 @@
 fi
 
 
-default_sim_reserved_bits="1"
-# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
-if test "${enable_sim_reserved_bits+set}" = set; then
-  enableval="$enable_sim_reserved_bits"
-  case "${enableval}" in
-  yes)	sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
-  no)	sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
-  *)	{ echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
-  echo "Setting reserved flags = $sim_reserved_bits" 6>&1
-fi
-else
-  sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
-fi
-
-
 # DEPRECATED
 #
 # Instead of defining a `subtarget' macro, code should be checking
@@ -3831,7 +3812,6 @@
 # in question.
 #
 case "${target}" in
-  mips64vr*-*-*)	SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
   mips*tx39*)           SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
   mipsisa32*-*-*)       SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
   mipsisa64*-*-*)       SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
@@ -4064,8 +4044,6 @@
 sim_m16_machine="-M mips16"
 sim_igen_filter="32,64,f"
 sim_m16_filter="16"
-sim_mach_default="mips8000"
-
 case "${target}" in
   mips*tx39*)		sim_gen=IGEN
 			sim_igen_filter="32,f"
@@ -4073,29 +4051,16 @@
 			;;
   mips64vr43*-*-*)	sim_gen=IGEN
 			sim_igen_machine="-M mipsIV"
-			sim_mach_default="mips8000"
 			;;
   mips64vr5*-*-*)	sim_gen=IGEN
 			sim_igen_machine="-M vr5000"
-			sim_mach_default="mips5000"
 			;;
   mips64vr41*)		sim_gen=M16
 			sim_igen_machine="-M vr4100"
 			sim_m16_machine="-M vr4100"
 			sim_igen_filter="32,64,f"
 			sim_m16_filter="16"
-			sim_mach_default="mips4100"
                         ;;
-  mips64vr-*-* | mips64vrel-*-*)
-			sim_gen=MULTI
-			sim_multi_configs="\
-			  vr4100:mipsIII,mips16,vr4100:32,64:mips4100,mips4111\
-			  vr4120:mipsIII,mips16,vr4120:32,64:mips4120\
-			  vr5000:mipsIV:32,64,f:mips4300,mips5000\
-			  vr5400:mipsIV,vr5400:32,64,f:mips5400\
-			  vr5500:mipsIV,vr5500:32,64,f:mips5500"
-			sim_multi_default=mips5000
-			;;
   mips64*-*-*)		sim_igen_filter="32,64,f"
 			sim_gen=IGEN
 			;;
@@ -4106,232 +4071,25 @@
   mipsisa32*-*-*)	sim_gen=IGEN
 		        sim_igen_machine="-M mips32"
 			sim_igen_filter="32,f"
-			sim_mach_default="mipsisa32"
 			;;
   mipsisa64sb1*-*-*)	sim_gen=IGEN
 		        sim_igen_machine="-M mips64,sb1"
 			sim_igen_filter="32,64,f"
-			sim_mach_default="mips_sb1"
 			;;
   mipsisa64*-*-*)	sim_gen=IGEN
 		        sim_igen_machine="-M mips64,mips3d"
 			sim_igen_filter="32,64,f"
-			sim_mach_default="mipsisa64"
 			;;
   mips*lsi*)	        sim_gen=M16
 			sim_igen_machine="-M mipsIII,mips16"
 			sim_m16_machine="-M mips16,mipsIII"
 			sim_igen_filter="32,f"
 			sim_m16_filter="16"
-			sim_mach_default="mips4000"
                         ;;
   mips*-*-*)		sim_gen=IGEN
 			sim_igen_filter="32,f"
 			;;
 esac
-
-# The MULTI generator can combine several simulation engines into one.
-# executable.  A configuration which uses the MULTI should set two
-# variables: ${sim_multi_configs} and ${sim_multi_default}.
-#
-# ${sim_multi_configs} is the list of engines to build.  Each
-# space-separated entry has the form NAME:MACHINE:FILTER:BFDMACHS,
-# where:
-#
-# - NAME is a C-compatible prefix for the engine,
-# - MACHINE is a -M argument,
-# - FILTER is a -F argument, and
-# - BFDMACHS is a comma-separated list of bfd machines that the
-#     simulator can run.
-#
-# Each entry will have a separate simulation engine whose prefix is
-# m32<NAME>.  If the machine list includes "mips16", there will also
-# be a mips16 engine, prefix m16<NAME>.  The mips16 engine will be
-# generated using the same machine list as the 32-bit version,
-# but the filter will be "16" instead of FILTER.
-#
-# The simulator compares the bfd mach against BFDMACHS to decide
-# which engine to use.  Entries in BFDMACHS should be bfd_mach
-# values with "bfd_mach_" removed.  ${sim_multi_default} says
-# which entry should be the default.
-if test ${sim_gen} = MULTI; then
-
-  # Simple sanity check.
-  if test -z "${sim_multi_configs}" || test -z "${sim_multi_default}"; then
-    { echo "configure: error: Error in configure.in: MULTI simulator not set up correctly" 1>&2; exit 1; }
-  fi
-
-  # Start in a known state.
-  rm -f multi-include.h multi-run.c
-  sim_multi_flags=
-  sim_multi_src=
-  sim_multi_obj=multi-run.o
-  sim_multi_igen_configs=
-  sim_seen_default=no
-
-  cat << __EOF__ > multi-run.c
-/* Main entry point for MULTI simulators.
-   Copyright (C) 2003 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 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.
-
-   --
-
-   This file was generated by sim/mips/configure.  */
-
-#include "sim-main.h"
-#include "multi-include.h"
-
-#define SD sd
-#define CPU cpu
-
-void
-sim_engine_run (SIM_DESC sd,
-		int next_cpu_nr,
-		int nr_cpus,
-		int signal) /* ignore */
-{
-  int mach;
-
-  if (STATE_ARCHITECTURE (sd) == NULL)
-    mach = bfd_mach_${sim_multi_default};
-  else
-    mach = STATE_ARCHITECTURE (SD)->mach;
-
-  switch (mach)
-    {
-__EOF__
-
-  for fc in ${sim_multi_configs}; do
-
-    # Split up the entry.  ${c} contains the first three elements.
-    # Note: outer sqaure brackets are m4 quotes.
-    c=`echo ${fc} | sed 's/:[^:]*$//'`
-    bfdmachs=`echo ${fc} | sed 's/.*://'`
-    name=`echo ${c} | sed 's/:.*//'`
-    machine=`echo ${c} | sed 's/.*:\(.*\):.*/\1/'`
-    filter=`echo ${c} | sed 's/.*://'`
-
-    # Build the following lists:
-    #
-    #   sim_multi_flags: all -M and -F flags used by the simulator
-    #   sim_multi_src: all makefile-generated source files
-    #   sim_multi_obj: the objects for ${sim_multi_src}
-    #   sim_multi_igen_configs: igen configuration strings.
-    #
-    # Each entry in ${sim_multi_igen_configs} is a prefix (m32
-    # or m16) followed by the NAME, MACHINE and FILTER part of
-    # the ${sim_multi_configs} entry.
-    sim_multi_flags="${sim_multi_flags} -F ${filter} -M ${machine}"
-
-    # Check whether mips16 handling is needed.
-    case ${c} in
-      *:*mips16*:*)
-	# Run igen twice, once for normal mode and once for mips16.
-	ws="m32 m16"
-
-	# The top-level function for the mips16 simulator is
-	# in a file m16${name}_run.c, generated by the
-	# tmp-run-multi Makefile rule.
-	sim_multi_src="${sim_multi_src} m16${name}_run.c"
-	sim_multi_obj="${sim_multi_obj} m16${name}_run.o"
-	sim_multi_flags="${sim_multi_flags} -F 16"
-	;;
-      *)
-	ws=m32
-	;;
-    esac
-
-    # Now add the list of igen-generated files to ${sim_multi_src}
-    # and ${sim_multi_obj}.
-    for w in ${ws}; do
-      for base in engine icache idecode model semantics support; do
-	sim_multi_src="${sim_multi_src} ${w}${name}_${base}.c"
-	sim_multi_src="${sim_multi_src} ${w}${name}_${base}.h"
-	sim_multi_obj="${sim_multi_obj} ${w}${name}_${base}.o"
-      done
-      sim_multi_igen_configs="${sim_multi_igen_configs} ${w}${c}"
-    done
-
-    # Add an include for the engine.h file.  This file declares the
-    # top-level foo_engine_run() function.
-    echo "#include \"${w}${name}_engine.h\"" >> multi-include.h
-
-    # Add case statements for this engine to sim_engine_run().
-    for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
-      echo "    case bfd_mach_${mach}:" >> multi-run.c
-      if test ${mach} = ${sim_multi_default}; then
-	echo "    default:" >> multi-run.c
-	sim_seen_default=yes
-      fi
-    done
-    echo "      ${w}${name}_engine_run (sd, next_cpu_nr, nr_cpus, signal);" \
-      >> multi-run.c
-    echo "      break;" >> multi-run.c
-  done
-
-  # Check whether we added a 'default:' label.
-  if test ${sim_seen_default} = no; then
-    { echo "configure: error: Error in configure.in: \${sim_multi_configs} doesn't have an entry for \${sim_multi_default}" 1>&2; exit 1; }
-  fi
-
-  cat << __EOF__ >> multi-run.c
-    }
-}
-
-int
-mips_mach_multi (SIM_DESC sd)
-{
-  if (STATE_ARCHITECTURE (sd) == NULL)
-    return bfd_mach_${sim_multi_default};
-
-  switch (STATE_ARCHITECTURE (SD)->mach)
-    {
-__EOF__
-
-  # Add case statements for this engine to mips_mach_multi().
-  for fc in ${sim_multi_configs}; do
-
-    # Split up the entry.  ${c} contains the first three elements.
-    # Note: outer sqaure brackets are m4 quotes.
-    c=`echo ${fc} | sed 's/:[^:]*$//'`
-    bfdmachs=`echo ${fc} | sed 's/.*://'`
-
-    for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
-      echo "    case bfd_mach_${mach}:" >> multi-run.c
-    done
-  done
-
-  cat << __EOF__ >> multi-run.c
-      return (STATE_ARCHITECTURE (SD)->mach);
-    default:
-      return bfd_mach_${sim_multi_default};
-    }
-}
-__EOF__
-
-  SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_MULTI"
-else
-  # For clean-extra
-  sim_multi_src=doesnt-exist.c
-
-  if test x"${sim_mach_default}" = x""; then
-    { echo "configure: error: Error in configure.in: \${sim_mach_default} not defined" 1>&2; exit 1; }
-  fi
-  SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_DEFAULT=bfd_mach_${sim_mach_default}"
-fi
 sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
 sim_m16_flags=" -F ${sim_m16_filter}  ${sim_m16_machine}  ${sim_igen_smp}"
 
@@ -4339,10 +4097,6 @@
 
 
 
-
-
-
-
 #
 # Add simulated hardware devices
 #
@@ -4431,7 +4185,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4435: checking for X" >&5
+echo "configure:4189: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4493,12 +4247,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4497 "configure"
+#line 4251 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4567,14 +4321,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4571 "configure"
+#line 4325 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -4667,17 +4421,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4671: checking for $ac_hdr" >&5
+echo "configure:4425: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4676 "configure"
+#line 4430 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4704,7 +4458,7 @@
 done
 
 echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
-echo "configure:4708: checking for fabs in -lm" >&5
+echo "configure:4462: checking for fabs in -lm" >&5
 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4712,7 +4466,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4716 "configure"
+#line 4470 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4723,7 +4477,7 @@
 fabs()
 ; return 0; }
 EOF
-if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4753,12 +4507,12 @@
 for ac_func in aint anint sqrt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4757: checking for $ac_func" >&5
+echo "configure:4511: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4762 "configure"
+#line 4516 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4781,7 +4535,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5020,10 +4774,6 @@
 s%@sim_igen_flags@%$sim_igen_flags%g
 s%@sim_m16_flags@%$sim_m16_flags%g
 s%@sim_gen@%$sim_gen%g
-s%@sim_multi_flags@%$sim_multi_flags%g
-s%@sim_multi_igen_configs@%$sim_multi_igen_configs%g
-s%@sim_multi_src@%$sim_multi_src%g
-s%@sim_multi_obj@%$sim_multi_obj%g
 s%@mips_extra_objs@%$mips_extra_objs%g
 s%@mips_igen_engine@%$mips_igen_engine%g
 s%@mips_extra_libs@%$mips_extra_libs%g
diff --git a/sim/mips/configure.in b/sim/mips/configure.in
index 1ea4901..3672b66 100644
--- a/sim/mips/configure.in
+++ b/sim/mips/configure.in
@@ -10,7 +10,6 @@
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
 SIM_AC_OPTION_HOSTENDIAN
 SIM_AC_OPTION_WARNINGS
-SIM_AC_OPTION_RESERVED_BITS(1)
 
 # DEPRECATED
 #
@@ -19,7 +18,6 @@
 # in question.
 #
 case "${target}" in
-  mips64vr*-*-*)	SIM_SUBTARGET="-DTARGET_ENABLE_FR=1" ;;
   mips*tx39*)           SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
   mipsisa32*-*-*)       SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
   mipsisa64*-*-*)       SIM_SUBTARGET="-DTARGET_ENABLE_FR=1";;
@@ -102,8 +100,6 @@
 sim_m16_machine="-M mips16"
 sim_igen_filter="32,64,f"
 sim_m16_filter="16"
-sim_mach_default="mips8000"
-
 case "${target}" in
   mips*tx39*)		sim_gen=IGEN
 			sim_igen_filter="32,f"
@@ -111,29 +107,16 @@
 			;;
   mips64vr43*-*-*)	sim_gen=IGEN
 			sim_igen_machine="-M mipsIV"
-			sim_mach_default="mips8000"
 			;;
   mips64vr5*-*-*)	sim_gen=IGEN
 			sim_igen_machine="-M vr5000"
-			sim_mach_default="mips5000"
 			;;
   mips64vr41*)		sim_gen=M16
 			sim_igen_machine="-M vr4100"
 			sim_m16_machine="-M vr4100"
 			sim_igen_filter="32,64,f"
 			sim_m16_filter="16"
-			sim_mach_default="mips4100"
                         ;;
-  mips64vr-*-* | mips64vrel-*-*)
-			sim_gen=MULTI
-			sim_multi_configs="\
-			  vr4100:mipsIII,mips16,vr4100:32,64:mips4100,mips4111\
-			  vr4120:mipsIII,mips16,vr4120:32,64:mips4120\
-			  vr5000:mipsIV:32,64,f:mips4300,mips5000\
-			  vr5400:mipsIV,vr5400:32,64,f:mips5400\
-			  vr5500:mipsIV,vr5500:32,64,f:mips5500"
-			sim_multi_default=mips5000
-			;;
   mips64*-*-*)		sim_igen_filter="32,64,f"
 			sim_gen=IGEN
 			;;
@@ -144,241 +127,30 @@
   mipsisa32*-*-*)	sim_gen=IGEN
 		        sim_igen_machine="-M mips32"
 			sim_igen_filter="32,f"
-			sim_mach_default="mipsisa32"
 			;;
   mipsisa64sb1*-*-*)	sim_gen=IGEN
 		        sim_igen_machine="-M mips64,sb1"
 			sim_igen_filter="32,64,f"
-			sim_mach_default="mips_sb1"
 			;;
   mipsisa64*-*-*)	sim_gen=IGEN
 		        sim_igen_machine="-M mips64,mips3d"
 			sim_igen_filter="32,64,f"
-			sim_mach_default="mipsisa64"
 			;;
   mips*lsi*)	        sim_gen=M16
 			sim_igen_machine="-M mipsIII,mips16"
 			sim_m16_machine="-M mips16,mipsIII"
 			sim_igen_filter="32,f"
 			sim_m16_filter="16"
-			sim_mach_default="mips4000"
                         ;;
   mips*-*-*)		sim_gen=IGEN
 			sim_igen_filter="32,f"
 			;;
 esac
-
-# The MULTI generator can combine several simulation engines into one.
-# executable.  A configuration which uses the MULTI should set two
-# variables: ${sim_multi_configs} and ${sim_multi_default}.
-#
-# ${sim_multi_configs} is the list of engines to build.  Each
-# space-separated entry has the form NAME:MACHINE:FILTER:BFDMACHS,
-# where:
-#
-# - NAME is a C-compatible prefix for the engine,
-# - MACHINE is a -M argument,
-# - FILTER is a -F argument, and
-# - BFDMACHS is a comma-separated list of bfd machines that the
-#     simulator can run.
-#
-# Each entry will have a separate simulation engine whose prefix is
-# m32<NAME>.  If the machine list includes "mips16", there will also
-# be a mips16 engine, prefix m16<NAME>.  The mips16 engine will be
-# generated using the same machine list as the 32-bit version,
-# but the filter will be "16" instead of FILTER.
-#
-# The simulator compares the bfd mach against BFDMACHS to decide
-# which engine to use.  Entries in BFDMACHS should be bfd_mach
-# values with "bfd_mach_" removed.  ${sim_multi_default} says
-# which entry should be the default.
-if test ${sim_gen} = MULTI; then
-
-  # Simple sanity check.
-  if test -z "${sim_multi_configs}" || test -z "${sim_multi_default}"; then
-    AC_MSG_ERROR(Error in configure.in: MULTI simulator not set up correctly)
-  fi
-
-  # Start in a known state.
-  rm -f multi-include.h multi-run.c
-  sim_multi_flags=
-  sim_multi_src=
-  sim_multi_obj=multi-run.o
-  sim_multi_igen_configs=
-  sim_seen_default=no
-
-  cat << __EOF__ > multi-run.c
-/* Main entry point for MULTI simulators.
-   Copyright (C) 2003 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 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.
-
-   --
-
-   This file was generated by sim/mips/configure.  */
-
-#include "sim-main.h"
-#include "multi-include.h"
-
-#define SD sd
-#define CPU cpu
-
-void
-sim_engine_run (SIM_DESC sd,
-		int next_cpu_nr,
-		int nr_cpus,
-		int signal) /* ignore */
-{
-  int mach;
-
-  if (STATE_ARCHITECTURE (sd) == NULL)
-    mach = bfd_mach_${sim_multi_default};
-  else
-    mach = STATE_ARCHITECTURE (SD)->mach;
-
-  switch (mach)
-    {
-__EOF__
-
-  for fc in ${sim_multi_configs}; do
-
-    # Split up the entry.  ${c} contains the first three elements.
-    # Note: outer sqaure brackets are m4 quotes.
-    c=`echo ${fc} | sed ['s/:[^:]*$//']`
-    bfdmachs=`echo ${fc} | sed 's/.*://'`
-    name=`echo ${c} | sed 's/:.*//'`
-    machine=`echo ${c} | sed 's/.*:\(.*\):.*/\1/'`
-    filter=`echo ${c} | sed 's/.*://'`
-
-    # Build the following lists:
-    #
-    #   sim_multi_flags: all -M and -F flags used by the simulator
-    #   sim_multi_src: all makefile-generated source files
-    #   sim_multi_obj: the objects for ${sim_multi_src}
-    #   sim_multi_igen_configs: igen configuration strings.
-    #
-    # Each entry in ${sim_multi_igen_configs} is a prefix (m32
-    # or m16) followed by the NAME, MACHINE and FILTER part of
-    # the ${sim_multi_configs} entry.
-    sim_multi_flags="${sim_multi_flags} -F ${filter} -M ${machine}"
-
-    # Check whether mips16 handling is needed.
-    case ${c} in
-      *:*mips16*:*)
-	# Run igen twice, once for normal mode and once for mips16.
-	ws="m32 m16"
-
-	# The top-level function for the mips16 simulator is
-	# in a file m16${name}_run.c, generated by the
-	# tmp-run-multi Makefile rule.
-	sim_multi_src="${sim_multi_src} m16${name}_run.c"
-	sim_multi_obj="${sim_multi_obj} m16${name}_run.o"
-	sim_multi_flags="${sim_multi_flags} -F 16"
-	;;
-      *)
-	ws=m32
-	;;
-    esac
-
-    # Now add the list of igen-generated files to ${sim_multi_src}
-    # and ${sim_multi_obj}.
-    for w in ${ws}; do
-      for base in engine icache idecode model semantics support; do
-	sim_multi_src="${sim_multi_src} ${w}${name}_${base}.c"
-	sim_multi_src="${sim_multi_src} ${w}${name}_${base}.h"
-	sim_multi_obj="${sim_multi_obj} ${w}${name}_${base}.o"
-      done
-      sim_multi_igen_configs="${sim_multi_igen_configs} ${w}${c}"
-    done
-
-    # Add an include for the engine.h file.  This file declares the
-    # top-level foo_engine_run() function.
-    echo "#include \"${w}${name}_engine.h\"" >> multi-include.h
-
-    # Add case statements for this engine to sim_engine_run().
-    for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
-      echo "    case bfd_mach_${mach}:" >> multi-run.c
-      if test ${mach} = ${sim_multi_default}; then
-	echo "    default:" >> multi-run.c
-	sim_seen_default=yes
-      fi
-    done
-    echo "      ${w}${name}_engine_run (sd, next_cpu_nr, nr_cpus, signal);" \
-      >> multi-run.c
-    echo "      break;" >> multi-run.c
-  done
-
-  # Check whether we added a 'default:' label.
-  if test ${sim_seen_default} = no; then
-    AC_MSG_ERROR(Error in configure.in: \${sim_multi_configs} doesn't have an entry for \${sim_multi_default})
-  fi
-
-  cat << __EOF__ >> multi-run.c
-    }
-}
-
-int
-mips_mach_multi (SIM_DESC sd)
-{
-  if (STATE_ARCHITECTURE (sd) == NULL)
-    return bfd_mach_${sim_multi_default};
-
-  switch (STATE_ARCHITECTURE (SD)->mach)
-    {
-__EOF__
-
-  # Add case statements for this engine to mips_mach_multi().
-  for fc in ${sim_multi_configs}; do
-
-    # Split up the entry.  ${c} contains the first three elements.
-    # Note: outer sqaure brackets are m4 quotes.
-    c=`echo ${fc} | sed ['s/:[^:]*$//']`
-    bfdmachs=`echo ${fc} | sed 's/.*://'`
-
-    for mach in `echo ${bfdmachs} | sed 's/,/ /g'`; do
-      echo "    case bfd_mach_${mach}:" >> multi-run.c
-    done
-  done
-
-  cat << __EOF__ >> multi-run.c
-      return (STATE_ARCHITECTURE (SD)->mach);
-    default:
-      return bfd_mach_${sim_multi_default};
-    }
-}
-__EOF__
-
-  SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_MULTI"
-else
-  # For clean-extra
-  sim_multi_src=doesnt-exist.c
-
-  if test x"${sim_mach_default}" = x""; then
-    AC_MSG_ERROR(Error in configure.in: \${sim_mach_default} not defined)
-  fi
-  SIM_SUBTARGET="$SIM_SUBTARGET -DMIPS_MACH_DEFAULT=bfd_mach_${sim_mach_default}"
-fi
 sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
 sim_m16_flags=" -F ${sim_m16_filter}  ${sim_m16_machine}  ${sim_igen_smp}"
 AC_SUBST(sim_igen_flags)
 AC_SUBST(sim_m16_flags)
 AC_SUBST(sim_gen)
-AC_SUBST(sim_multi_flags)
-AC_SUBST(sim_multi_igen_configs)
-AC_SUBST(sim_multi_src)
-AC_SUBST(sim_multi_obj)
 
 
 #
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index fece487..39267a0 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -55,10 +55,7 @@
 //  (or which pre-date or use different encodings than the standard
 //  instructions) are (for the most part) in separate .igen files.
 :model:::vr4100:mips4100:		// vr.igen
-:model:::vr4120:mips4120:
 :model:::vr5000:mips5000:
-:model:::vr5400:mips5400:
-:model:::vr5500:mips5500:
 :model:::r3900:mips3900:		// tx.igen
 
 //  MIPS Application Specific Extensions (ASEs)
@@ -568,8 +565,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] == (signed_word) GPR[RT])
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -589,8 +588,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] == (signed_word) GPR[RT])
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -613,8 +614,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] >= 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -635,11 +638,13 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if (RS == 31)
     Unpredictable ();
   RA = (CIA + 8);
   if ((signed_word) GPR[RS] >= 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -659,6 +664,7 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if (RS == 31)
     Unpredictable ();
   RA = (CIA + 8);
@@ -666,6 +672,7 @@
      executed */
   if ((signed_word) GPR[RS] >= 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -687,8 +694,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] >= 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -711,8 +720,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] > 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -732,10 +743,12 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   /* NOTE: The branch occurs AFTER the next instruction has been
      executed */
   if ((signed_word) GPR[RS] > 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -758,10 +771,12 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   /* NOTE: The branch occurs AFTER the next instruction has been
      executed */
   if ((signed_word) GPR[RS] <= 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -781,8 +796,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] <= 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -805,8 +822,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] < 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -827,6 +846,7 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if (RS == 31)
     Unpredictable ();
   RA = (CIA + 8);
@@ -834,6 +854,7 @@
      executed */
   if ((signed_word) GPR[RS] < 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -853,11 +874,13 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if (RS == 31)
     Unpredictable ();
   RA = (CIA + 8);
   if ((signed_word) GPR[RS] < 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -879,10 +902,12 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   /* NOTE: The branch occurs AFTER the next instruction has been
      executed */
   if ((signed_word) GPR[RS] < 0)
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -905,8 +930,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] != (signed_word) GPR[RT])
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
 }
@@ -926,8 +953,10 @@
 *r3900:
 {
   address_word offset = EXTEND16 (OFFSET) << 2;
+  check_branch_bug ();
   if ((signed_word) GPR[RS] != (signed_word) GPR[RT])
     {
+      mark_branch_bug (NIA+offset);
       DELAY_SLOT (NIA + offset);
     }
   else
@@ -981,7 +1010,6 @@
 "clo r<RD>, r<RS>"
 *mips32:
 *mips64:
-*vr5500:
 {
   unsigned32 temp = GPR[RS];
   unsigned32 i, mask;
@@ -1006,7 +1034,6 @@
 "clz r<RD>, r<RS>"
 *mips32:
 *mips64:
-*vr5500:
 {
   unsigned32 temp = GPR[RS];
   unsigned32 i, mask;
@@ -1116,7 +1143,6 @@
 011100,5.RS,5.RT,5.RD,00000,100101:SPECIAL2:64::DCLO
 "dclo r<RD>, r<RS>"
 *mips64:
-*vr5500:
 {
   unsigned64 temp = GPR[RS];
   unsigned32 i;
@@ -1140,7 +1166,6 @@
 011100,5.RS,5.RT,5.RD,00000,100100:SPECIAL2:64::DCLZ
 "dclz r<RD>, r<RS>"
 *mips64:
-*vr5500:
 {
   unsigned64 temp = GPR[RS];
   unsigned32 i;
@@ -2164,7 +2189,6 @@
 "madd r<RS>, r<RT>"
 *mips32:
 *mips64:
-*vr5500:
 {
   signed64 temp;
   check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2184,7 +2208,6 @@
 "maddu r<RS>, r<RT>"
 *mips32:
 *mips64:
-*vr5500:
 {
   unsigned64 temp;
   check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2289,7 +2312,6 @@
 "msub r<RS>, r<RT>"
 *mips32:
 *mips64:
-*vr5500:
 {
   signed64 temp;
   check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2309,7 +2331,6 @@
 "msubu r<RS>, r<RT>"
 *mips32:
 *mips64:
-*vr5500:
 {
   unsigned64 temp;
   check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
@@ -2367,7 +2388,6 @@
 "mul r<RD>, r<RS>, r<RT>"
 *mips32:
 *mips64:
-*vr5500:
 {
   signed64 prod;
   if (NotWordValue (GPR[RS]) || NotWordValue (GPR[RT]))
@@ -3772,11 +3792,13 @@
 *mipsIII:
 {
   check_fpu (SD_);
+  check_branch_bug ();
   TRACE_BRANCH_INPUT (PREVCOC1());
   if (PREVCOC1() == TF)
     {
       address_word dest = NIA + (EXTEND16 (OFFSET) << 2);
       TRACE_BRANCH_RESULT (dest);
+      mark_branch_bug (dest);
       DELAY_SLOT (dest);
     }
   else if (ND)
@@ -3802,9 +3824,11 @@
 *r3900:
 {
   check_fpu (SD_);
+  check_branch_bug ();
   if (GETFCC(CC) == TF)
     {
       address_word dest = NIA + (EXTEND16 (OFFSET) << 2);
+      mark_branch_bug (dest);
       DELAY_SLOT (dest);
     }
   else if (ND)
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index 2f3ffa4..fed625e 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -1,5 +1,5 @@
 /* MIPS Simulator definition.
-   Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -41,7 +41,7 @@
 typedef address_word sim_cia;
 
 #include "sim-base.h"
-#include "bfd.h"
+
 
 /* Deprecated macros and types for manipulating 64bit values.  Use
    ../common/sim-bits.h and ../common/sim-endian.h macros instead. */
@@ -423,6 +423,10 @@
   hilo_history lo_history;
 #define LOHISTORY (&(CPU)->lo_history)
 
+#define check_branch_bug() 
+#define mark_branch_bug(TARGET) 
+
+
 
   sim_cpu_base base;
 };
@@ -946,12 +950,6 @@
 void mips_cpu_exception_suspend(SIM_DESC sd, sim_cpu* cpu, int exception);
 void mips_cpu_exception_resume(SIM_DESC sd, sim_cpu* cpu, int exception);
 
-#ifdef MIPS_MACH_MULTI
-extern int mips_mach_multi(SIM_DESC sd);
-#define MIPS_MACH(SD)	mips_mach_multi(SD)
-#else
-#define	MIPS_MACH(SD)	MIPS_MACH_DEFAULT
-#endif
 
 #if H_REVEALS_MODULE_P (SIM_MAIN_INLINE)
 #include "sim-main.c"
diff --git a/sim/mips/vr.igen b/sim/mips/vr.igen
index 0eb5f4d..863bb55 100644
--- a/sim/mips/vr.igen
+++ b/sim/mips/vr.igen
@@ -3,321 +3,76 @@
 // NEC specific instructions
 //
 
-:%s::::MFHI:int hi
-{
-  return hi ? "hi" : "";
-}
-
-:%s::::SAT:int s
-{
-  return s ? "s" : "";
-}
-
-:%s::::UNS:int u
-{
-  return u ? "u" : "";
-}
-
-// Simulate the various kinds of multiply and multiply-accumulate instructions.
-// Perform an operation of the form:
+// Integer Instructions
+// --------------------
 //
-//	LHS (+/-) GPR[RS] * GPR[RT]
-//
-// and store it in the 64-bit accumulator.  Optionally copy either LO or
-// HI into a general purpose register.
-//
-// - RD is the destination register of the LO or HI move
-// - RS are RT are the multiplication source registers
-// - ACCUMULATE_P is true if LHS should be the value of the 64-bit accumulator,
-//     false if it should be 0.
-// - STORE_HI_P is true if HI should be stored in RD, false if LO should be.
-// - UNSIGNED_P is true if the operation should be unsigned.
-// - SATURATE_P is true if the result should be saturated to a 32-bit value.
-// - SUBTRACT_P is true if the right hand side should be subtraced from LHS,
-//     false if it should be added.
-// - SHORT_P is true if RS and RT must be 16-bit numbers.
-// - DOUBLE_P is true if the 64-bit accumulator is in LO, false it is a
-//     concatenation of the low 32 bits of HI and LO.
-:function:::void:do_vr_mul_op:int rd, int rs, int rt, int accumulate_p, int store_hi_p, int unsigned_p, int saturate_p, int subtract_p, int short_p, int double_p
+// MulAcc is the Multiply Accumulator.
+//     This register is mapped on the the HI and LO registers.
+//     Upper 32 bits of MulAcc is mapped on to lower 32 bits of HI register.
+//     Lower 32 bits of MulAcc is mapped on to lower 32 bits of LO register.
+
+
+:function:::unsigned64:MulAcc:
+*vr4100:
 {
-  unsigned64 lhs, x, y, xcut, ycut, product, result;
-
-  check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
-
-  lhs = (!accumulate_p ? 0 : double_p ? LO : U8_4 (HI, LO));
-  x = GPR[rs];
-  y = GPR[rt];
-
-  /* Work out the canonical form of X and Y from their significant bits.  */
-  if (!short_p)
-    {
-      /* Normal sign-extension rule for 32-bit operands.  */
-      xcut = EXTEND32 (x);
-      ycut = EXTEND32 (y);
-    }
-  else if (unsigned_p)
-    {
-      /* Operands must be zero-extended 16-bit numbers.  */
-      xcut = x & 0xffff;
-      ycut = y & 0xffff;
-    }
-  else
-    {
-      /* Likewise but sign-extended.  */
-      xcut = EXTEND16 (x);
-      ycut = EXTEND16 (y);
-    }
-  if (x != xcut || y != ycut)
-    sim_engine_abort (SD, CPU, CIA,
-		      "invalid multiplication operand at 0x%08lx\n",
-		      (long) CIA);
-
-  TRACE_ALU_INPUT2 (x, y);
-  product = (unsigned_p ? x * y : EXTEND32 (x) * EXTEND32 (y));
-  result = (subtract_p ? lhs - product : lhs + product);
-  if (saturate_p)
-    {
-      /* Saturate the result to 32 bits.  An unsigned, unsaturated
-	 result is zero-extended to 64 bits, but unsigned overflow
-	 causes all 64 bits to be set.  */
-      if (!unsigned_p && (unsigned64) EXTEND32 (result) != result)
-	result = ((signed64) result < 0 ? -0x7fffffff - 1 : 0x7fffffff);
-      else if (unsigned_p && (result >> 32) != 0)
-	result = (unsigned64) 0 - 1;
-    }
-  TRACE_ALU_RESULT (result);
-
-  if (double_p)
-    LO = result;
-  else
-    {
-      LO = EXTEND32 (result);
-      HI = EXTEND32 (VH4_8 (result));
-    }
-  if (rd != 0)
-    GPR[rd] = store_hi_p ? HI : LO;
-}
-
-// 32-bit rotate right of X by Y bits.
-:function:::unsigned64:do_ror:unsigned32 x,unsigned32 y
-*vr5400:
-*vr5500:
-{
-  unsigned64 result;
-
-  y &= 31;
-  TRACE_ALU_INPUT2 (x, y);
-  result = EXTEND32 (ROTR32 (x, y));
-  TRACE_ALU_RESULT (result);
+  unsigned64 result = U8_4 (HI, LO);
   return result;
 }
 
-// Likewise 64-bit
-:function:::unsigned64:do_dror:unsigned64 x,unsigned64 y
-*vr5400:
-*vr5500:
+:function:::void:SET_MulAcc:unsigned64 value
+*vr4100:
 {
-  unsigned64 result;
+  /* 64 bit specific */
+  *AL4_8 (&HI) = VH4_8 (value);
+  *AL4_8 (&LO) = VL4_8 (value);
+}
 
-  y &= 63;
-  TRACE_ALU_INPUT2 (x, y);
-  result = ROTR64 (x, y);
-  TRACE_ALU_RESULT (result);
+:function:::signed64:SignedMultiply:signed32 l, signed32 r
+*vr4100:
+{
+  signed64 result = (signed64) l * (signed64) r;
+  return result;
+}
+
+:function:::unsigned64:UnsignedMultiply:unsigned32 l, unsigned32 r
+*vr4100:
+{
+  unsigned64 result = (unsigned64) l * (unsigned64) r;
+  return result;
+}
+
+:function:::unsigned64:Low32Bits:unsigned64 value
+*vr4100:
+{
+  unsigned64 result = (signed64) (signed32) VL4_8 (value);
+  return result;
+}
+
+:function:::unsigned64:High32Bits:unsigned64 value
+*vr4100:
+{
+  unsigned64 result = (signed64) (signed32) VH4_8 (value);
   return result;
 }
 
 
-// VR4100 instructions.
 
-000000,5.RS,5.RT,00000,00000,101000::32::MADD16
-"madd16 r<RS>, r<RT>"
+// Multiply, Accumulate
+000000,5.RS,5.RT,00000,00000,101000::64::MAC
+"mac r<RS>, r<RT>"
 *vr4100:
 {
-  do_vr_mul_op (SD_, 0, RS, RT,
-		1 /* accumulate */,
-		0 /* store in LO */,
-		0 /* signed arithmetic */,
-		0 /* don't saturate */,
-		0 /* don't subtract */,
-		1 /* short */,
-		0 /* single */);
+  SET_MulAcc (SD_, MulAcc (SD_) + SignedMultiply (SD_, GPR[RS], GPR[RT]));
 }
 
-000000,5.RS,5.RT,00000,00000,101001::64::DMADD16
-"dmadd16 r<RS>, r<RT>"
+
+// D-Multiply, Accumulate
+000000,5.RS,5.RT,00000,00000,101001::64::DMAC
+"dmac r<RS>, r<RT>"
 *vr4100:
 {
-  do_vr_mul_op (SD_, 0, RS, RT,
-		1 /* accumulate */,
-		0 /* store in LO */,
-		0 /* signed arithmetic */,
-		0 /* don't saturate */,
-		0 /* don't subtract */,
-		1 /* short */,
-		1 /* double */);
+  LO = LO + SignedMultiply (SD_, GPR[RS], GPR[RT]);
 }
 
 
 
-// VR4120 and VR4130 instructions.
-
-000000,5.RS,5.RT,5.RD,1.SAT,1.MFHI,00,1.UNS,101001::64::DMACC
-"dmacc%s<MFHI>%s<UNS>%s<SAT> r<RD>, r<RS>, r<RT>"
-*vr4120:
-{
-  do_vr_mul_op (SD_, RD, RS, RT,
-		1 /* accumulate */,
-		MFHI, UNS, SAT,
-		0 /* don't subtract */,
-		SAT /* short */,
-		1 /* double */);
-}
-
-000000,5.RS,5.RT,5.RD,1.SAT,1.MFHI,00,1.UNS,101000::32::MACC_4120
-"macc%s<MFHI>%s<UNS>%s<SAT> r<RD>, r<RS>, r<RT>"
-*vr4120:
-{
-  do_vr_mul_op (SD_, RD, RS, RT,
-		1 /* accumulate */,
-		MFHI, UNS, SAT,
-		0 /* don't subtract */,
-		SAT /* short */,
-		0 /* single */);
-}
-
-
-// VR5400 and VR5500 instructions.
-
-000000,5.RS,5.RT,5.RD,0,1.MFHI,001,01100,1.UNS::32::MUL
-"mul%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
-*vr5400:
-*vr5500:
-{
-  do_vr_mul_op (SD_, RD, RS, RT,
-		0 /* don't accumulate */,
-		MFHI, UNS,
-		0 /* don't saturate */,
-		0 /* don't subtract */,
-		0 /* not short */,
-		0 /* single */);
-}
-
-000000,5.RS,5.RT,5.RD,0,1.MFHI,011,01100,1.UNS::32::MULS
-"muls%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
-*vr5400:
-*vr5500:
-{
-  do_vr_mul_op (SD_, RD, RS, RT,
-		0 /* don't accumulate */,
-		MFHI, UNS,
-		0 /* don't saturate */,
-		1 /* subtract */,
-		0 /* not short */,
-		0 /* single */);
-}
-
-000000,5.RS,5.RT,5.RD,0,1.MFHI,101,01100,1.UNS::32::MACC_5xxx
-"macc%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
-*vr5400:
-*vr5500:
-{
-  do_vr_mul_op (SD_, RD, RS, RT,
-		1 /* accumulate */,
-		MFHI, UNS,
-		0 /* don't saturate */,
-		0 /* don't subtract */,
-		0 /* not short */,
-		0 /* single */);
-}
-
-000000,5.RS,5.RT,5.RD,0,1.MFHI,111,01100,1.UNS::32::MSAC
-"msac%s<MFHI>%s<UNS> r<RD>, r<RS>, r<RT>"
-*vr5400:
-*vr5500:
-{
-  do_vr_mul_op (SD_, RD, RS, RT,
-		1 /* accumulate */,
-		MFHI, UNS,
-		0 /* don't saturate */,
-		1 /* subtract */,
-		0 /* not short */,
-		0 /* single */);
-}
-
-000000,00001,5.RT,5.RD,5.SHIFT,000010::32::ROR
-"ror r<RD>, r<RT>, <SHIFT>"
-*vr5400:
-*vr5500:
-{
-  GPR[RD] = do_ror (SD_, GPR[RT], SHIFT);
-}
-
-000000,5.RS,5.RT,5.RD,00001,000110::32::RORV
-"rorv r<RD>, r<RT>, r<RS>"
-*vr5400:
-*vr5500:
-{
-  GPR[RD] = do_ror (SD_, GPR[RT], GPR[RS]);
-}
-
-000000,00001,5.RT,5.RD,5.SHIFT,111010::64::DROR
-"dror r<RD>, r<RT>, <SHIFT>"
-*vr5400:
-*vr5500:
-{
-  GPR[RD] = do_dror (SD_, GPR[RT], SHIFT);
-}
-
-000000,00001,5.RT,5.RD,5.SHIFT,111110::64::DROR32
-"dror32 r<RD>, r<RT>, <SHIFT>"
-*vr5400:
-*vr5500:
-{
-  GPR[RD] = do_dror (SD_, GPR[RT], SHIFT + 32);
-}
-
-000000,5.RS,5.RT,5.RD,00001,010110::64::DRORV
-"drorv r<RD>, r<RT>, r<RS>"
-*vr5400:
-*vr5500:
-{
-  GPR[RD] = do_dror (SD_, GPR[RT], GPR[RS]);
-}
-
-010011,5.BASE,5.INDEX,5.0,5.FD,000101:COP1X:64::LUXC1
-"luxc1 f<FD>, r<INDEX>(r<BASE>)"
-*vr5500:
-{
-  check_fpu (SD_);
-  COP_LD (1, FD, do_load (SD_, AccessLength_DOUBLEWORD,
-			  (GPR[BASE] + GPR[INDEX]) & ~MASK64 (2, 0), 0));
-}
-
-010011,5.BASE,5.INDEX,5.FS,00000,001101:COP1X:64::SUXC1
-"suxc1 f<FS>, r<INDEX>(r<BASE>)"
-*vr5500:
-{
-  check_fpu (SD_);
-  do_store (SD_, AccessLength_DOUBLEWORD,
-	    (GPR[BASE] + GPR[INDEX]) & ~MASK64 (2, 0), 0,
-	    COP_SD (1, FS));
-}
-
-010000,1,19.*,100000:COP0:32::WAIT
-"wait"
-*vr5500:
-
-011100,00000,5.RT,5.DR,00000,111101:SPECIAL:64::MFDR
-"mfdr r<RT>, r<DR>"
-*vr5400:
-*vr5500:
-
-011100,00100,5.RT,5.DR,00000,111101:SPECIAL:64::MTDR
-"mtdr r<RT>, r<DR>"
-*vr5400:
-*vr5500:
-
-011100,00000,00000,00000,00000,111110:SPECIAL:64::DRET
-"dret"
-*vr5400:
-*vr5500:
diff --git a/src-release b/src-release
index b5eca52..c13fa35 100644
--- a/src-release
+++ b/src-release
@@ -1,5 +1,5 @@
 #   Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-#   1999, 2000, 2001, 2002, 2003 Free Software Foundation
+#   1999, 2000, 2001, 2002 Free Software Foundation
 #
 # 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
@@ -55,7 +55,7 @@
 # distribution (perhaps it would be better to include it anyway).
 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
 	make-stds.texi standards.info* configure.texi configure.info* \
-	configbuild.* configdev.* fdl.texi texi2pod.pl
+	configbuild.* configdev.*
 
 
 # When you use `make setup-dirs' or `make taz' you should always redefine