--- gcc-2.95.3/config.guess	Wed Mar  8 05:52:57 2000
+++ gcc/config.guess	Sat Oct 13 18:29:51 2001
@@ -1,7 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 1999 Free Software Foundation, Inc.
-#
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-10-13'
+
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
@@ -22,35 +25,153 @@
 # the same distribution terms that you use for the rest of that program.
 
 # Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <config-patches@gnu.org>.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
 # The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	rm -f $dummy.c $dummy.o $dummy.rel ;
+	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'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
+# (ghazi@noc.rutgers.edu 1994-08-24)
 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
 	PATH=$PATH:/.attbin ; export PATH
 fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# Netbsd (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	# Determine the machine/vendor (is the vendor relevant).
+	case "${UNAME_MACHINE}" in
+	    amiga) machine=m68k-unknown ;;
+	    arm32) machine=arm-unknown ;;
+	    atari*) machine=m68k-atari ;;
+	    sun3*) machine=m68k-sun ;;
+	    mac68k) machine=m68k-apple ;;
+	    macppc) machine=powerpc-apple ;;
+	    hp3[0-9][05]) machine=m68k-hp ;;
+	    ibmrt|romp-ibm) machine=romp-ibm ;;
+	    *) machine=${UNAME_MACHINE}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE}" in
+	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	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.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
     alpha:OSF1:*:*)
 	if test $UNAME_RELEASE = "V4.0"; then
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -59,68 +180,82 @@
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	cat <<EOF >dummy.s
+	cat <<EOF >$dummy.s
+	.data
+\$Lformat:
+	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+
+	.text
 	.globl main
+	.align 4
 	.ent main
 main:
-	.frame \$30,0,\$26,0
-	.prologue 0
-	.long 0x47e03d80 # implver $0
-	lda \$2,259
-	.long 0x47e20c21 # amask $2,$1
-	srl \$1,8,\$2
-	sll \$2,2,\$2
-	sll \$0,3,\$0
-	addl \$1,\$0,\$0
-	addl \$2,\$0,\$0
-	ret \$31,(\$26),1
+	.frame \$30,16,\$26,0
+	ldgp \$29,0(\$27)
+	.prologue 1
+	.long 0x47e03d80 # implver \$0
+	lda \$2,-1
+	.long 0x47e20c21 # amask \$2,\$1
+	lda \$16,\$Lformat
+	mov \$0,\$17
+	not \$1,\$18
+	jsr \$26,printf
+	ldgp \$29,0(\$26)
+	mov 0,\$16
+	jsr \$26,exit
 	.end main
 EOF
-	${CC-cc} dummy.s -o dummy 2>/dev/null
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 	if test "$?" = 0 ; then
-		./dummy
-		case "$?" in
-			7)
+		case `./$dummy` in
+			0-0)
 				UNAME_MACHINE="alpha"
 				;;
-			15)
+			1-0)
 				UNAME_MACHINE="alphaev5"
 				;;
-			14)
+			1-1)
 				UNAME_MACHINE="alphaev56"
 				;;
-			10)
+			1-101)
 				UNAME_MACHINE="alphapca56"
 				;;
-			16)
+			2-303)
 				UNAME_MACHINE="alphaev6"
 				;;
+			2-307)
+				UNAME_MACHINE="alphaev67"
+				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
 		esac
 	fi
-	rm -f dummy.s dummy
+	rm -f $dummy.s $dummy
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
-        # How do we know it's Interix rather than generic posix subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname 
-	# instead of the specific alpha model.
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0;;
+	exit 0 ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
 	exit 0 ;;
     Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-cbm-sysv4
+	echo m68k-unknown-sysv4
 	exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
-      exit 0 ;;
     amiga:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
 	exit 0 ;;
+    *:MorphOS:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
     arc64:OpenBSD:*:*)
 	echo mips64el-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -139,16 +274,16 @@
     wgrisc:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
-    arm32:NetBSD:*:*)
-	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    SR2?01:HI-UX/MPP:*:*)
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
 	exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
 		echo pyramid-pyramid-sysv3
@@ -156,7 +291,7 @@
 		echo pyramid-pyramid-bsd
 	fi
 	exit 0 ;;
-    NILE:*:*:dcosx)
+    NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
     sun4H:SunOS:5.*:*)
@@ -201,21 +336,41 @@
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
 	exit 0 ;;
-    atari*:NetBSD:*:*)
-	echo m68k-atari-netbsd${UNAME_RELEASE}
+    sparc*:NetBSD:*)
+	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
 	exit 0 ;;
     atari*:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    sun3*:NetBSD:*:*)
-	echo m68k-sun-netbsd${UNAME_RELEASE}
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
 	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
     sun3*:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    mac68k:NetBSD:*:*)
-	echo m68k-apple-netbsd${UNAME_RELEASE}
-	exit 0 ;;
     mac68k:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -237,12 +392,18 @@
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
 	exit 0 ;;
-    2020:CLIX:*:*)
+    2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
 	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	sed 's/^	//' << EOF >dummy.c
-	int main (argc, argv) int argc; char **argv; {
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
 	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -257,12 +418,15 @@
 	  exit (-1);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy \
-	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
 	exit 0 ;;
@@ -278,15 +442,18 @@
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
 		echo m88k-dg-dgux${UNAME_RELEASE}
-	else
+	    else
 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
-        fi
  	exit 0 ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
@@ -307,12 +474,21 @@
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
 	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i?86:AIX:*:*)
+    i*86:AIX:*:*)
 	echo i386-ibm-aix
 	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		sed 's/^		//' << EOF >dummy.c
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
 		#include <sys/systemcfg.h>
 
 		main()
@@ -323,8 +499,8 @@
 			exit(0);
 			}
 EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -332,8 +508,9 @@
 		echo rs6000-ibm-aix3.2
 	fi
 	exit 0 ;;
-    *:AIX:*:4)
-	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -341,7 +518,7 @@
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=4.${UNAME_RELEASE}
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
 	exit 0 ;;
@@ -351,7 +528,7 @@
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
 	exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
 	exit 0 ;;                           # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
@@ -366,33 +543,50 @@
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
 	exit 0 ;;
-    *9??*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit 0 ;;
     9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
 	    9000/31? )            HP_ARCH=m68000 ;;
 	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9] )
+	    9000/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
+	      eval $set_cc_for_build
+              sed 's/^              //' << EOF >$dummy.c
 
-              sed 's/^              //' << EOF >dummy.c
+              #define _HPUX_SOURCE
               #include <stdlib.h>
               #include <unistd.h>
-              
+
               int main ()
               {
               #if defined(_SC_KERNEL_BITS)
                   long bits = sysconf(_SC_KERNEL_BITS);
-              #endif 
+              #endif
                   long cpu  = sysconf (_SC_CPU_VERSION);
-              
-                  switch (cpu) 
+
+                  switch (cpu)
               	{
               	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
               	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0: 
+              	case CPU_PA_RISC2_0:
               #if defined(_SC_KERNEL_BITS)
-              	    switch (bits) 
+              	    switch (bits)
               		{
               		case 64: puts ("hppa2.0w"); break;
               		case 32: puts ("hppa2.0n"); break;
@@ -400,20 +594,26 @@
               		} break;
               #else  /* !defined(_SC_KERNEL_BITS) */
               	    puts ("hppa2.0"); break;
-              #endif 
+              #endif
               	default: puts ("hppa1.0"); break;
               	}
                   exit (0);
               }
 EOF
-	(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
-	rm -f dummy.c dummy
+	    (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
+	fi ;;
 	esac
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
     3050*:HI-UX:*:*)
-	sed 's/^	//' << EOF >dummy.c
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
 	main ()
@@ -438,8 +638,8 @@
 	  exit (0);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -448,13 +648,16 @@
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
 	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
 	exit 0 ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
 	exit 0 ;;
-    i?86:OSF1:*:*)
+    i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
@@ -489,67 +692,73 @@
 	echo xmp-cray-unicos
         exit 0 ;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE}
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE}
+	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 ;;
     CRAY-2:*:*:*)
 	echo cray2-cray-unicos
         exit 0 ;;
-    F300:UNIX_System_V:*:*)
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-	echo m68k-hp-netbsd${UNAME_RELEASE}
-	exit 0 ;;
     hp300:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
-    *:FreeBSD:*:*)
-        if test -x /usr/bin/objformat -a "elf" = "`/usr/bin/objformat`"; then
-          echo ${UNAME_MACHINE}-unknown-freebsdelf
-        else
-	  echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
-      fi
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
 	exit 0 ;;
-    *:NetBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	exit 0 ;;
     i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin32
+	echo ${UNAME_MACHINE}-pc-cygwin
 	exit 0 ;;
     i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-        # How do we know it's Interix rather than generic posix subsystem?
+	# 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
-	# change UNAME_MACHINE based on the output of uname instead of
-	# i386?
+	# UNAME_MACHINE based on the output of uname instead of i386?
 	echo i386-pc-interix
 	exit 0 ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
 	exit 0 ;;
     p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin32
+	echo powerpcle-unknown-cygwin
 	exit 0 ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -557,175 +766,130 @@
     *:GNU:*:*)
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit 0 ;;
-    *:Linux:*:*)
-	# uname on the ARM produces all sorts of strangeness, and we need to
-	# filter it out.
-	case "$UNAME_MACHINE" in
-	  armv*)		      UNAME_MACHINE=$UNAME_MACHINE ;;
-	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
+	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
 	esac
-
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
 	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us.
-	ld_help_string=`ld --help 2>&1`
-	ld_supported_emulations=`echo $ld_help_string \
-			 | sed -ne '/supported emulations:/!d
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_supported_targets=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
 				    s/[ 	][ 	]*/ /g
-				    s/.*supported emulations: *//
+				    s/.*supported targets: *//
 				    s/ .*//
 				    p'`
-        case "$ld_supported_emulations" in
-	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
-	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
-	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
-	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
-	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
-	  elf32ppc | elf32ppclinux)
-		# Determine Lib Version
-		cat >dummy.c <<EOF
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;		
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	cat >$dummy.c <<EOF
 #include <features.h>
-#if defined(__GLIBC__)
-extern char __libc_version[];
-extern char __libc_release[];
-#endif
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-#if defined(__GLIBC__)
-  printf("%s %s\n", __libc_version, __libc_release);
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
 #else
-  printf("unkown\n");
-#endif
-  return 0;
-}
-EOF
-		LIBC=""
-		${CC-cc} dummy.c -o dummy 2>/dev/null
-		if test "$?" = 0 ; then
-			./dummy | grep 1\.99 > /dev/null
-			if test "$?" = 0 ; then
-				LIBC="libc1"
-			fi
-		fi	
-		rm -f dummy.c dummy
-		echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
-	esac
-
-	if test "${UNAME_MACHINE}" = "alpha" ; then
-		sed 's/^	//'  <<EOF >dummy.s
-		.globl main
-		.ent main
-	main:
-		.frame \$30,0,\$26,0
-		.prologue 0
-		.long 0x47e03d80 # implver $0
-		lda \$2,259
-		.long 0x47e20c21 # amask $2,$1
-		srl \$1,8,\$2
-		sll \$2,2,\$2
-		sll \$0,3,\$0
-		addl \$1,\$0,\$0
-		addl \$2,\$0,\$0
-		ret \$31,(\$26),1
-		.end main
-EOF
-		LIBC=""
-		${CC-cc} dummy.s -o dummy 2>/dev/null
-		if test "$?" = 0 ; then
-			./dummy
-			case "$?" in
-			7)
-				UNAME_MACHINE="alpha"
-				;;
-			15)
-				UNAME_MACHINE="alphaev5"
-				;;
-			14)
-				UNAME_MACHINE="alphaev56"
-				;;
-			10)
-				UNAME_MACHINE="alphapca56"
-				;;
-			16)
-				UNAME_MACHINE="alphaev6"
-				;;
-			esac	
-
-			objdump --private-headers dummy | \
-			  grep ld.so.1 > /dev/null
-			if test "$?" = 0 ; then
-				LIBC="libc1"
-			fi
-		fi	
-		rm -f dummy.s dummy
-		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
-	elif test "${UNAME_MACHINE}" = "mips" ; then
-	  cat >dummy.c <<EOF
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-#ifdef __MIPSEB__
-  printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
+	int main (argc, argv) int argc; char *argv[]; {
 #endif
-  return 0;
-}
-EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	else
-	  # Either a pre-BFD a.out linker (linux-gnuoldld)
-	  # or one that does not give us useful --help.
-	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	  # If ld does not provide *any* "supported emulations:"
-	  # that means it is gnuoldld.
-	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
-	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
-	  case "${UNAME_MACHINE}" in
-	  i?86)
-	    VENDOR=pc;
-	    ;;
-	  *)
-	    VENDOR=unknown;
-	    ;;
-	  esac
-	  # Determine whether the default compiler is a.out or elf
-	  cat >dummy.c <<EOF
-#include <features.h>
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
 #ifdef __ELF__
 # ifdef __GLIBC__
 #  if __GLIBC__ >= 2
-    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+    printf ("%s-pc-linux-gnu\n", argv[1]);
 #  else
-    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
 #  endif
 # else
-   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
 # endif
 #else
-  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+  printf ("%s-pc-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
 EOF
-	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-	  rm -f dummy.c dummy
-	fi ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i?86:DYNIX/ptx:4*:*)
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
 	echo i386-sequent-sysv4
 	exit 0 ;;
-    i?86:UNIX_SV:4.2MP:2.*)
+    i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
         # I am not positive that other SVR4 systems won't match this,
@@ -733,26 +897,23 @@
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit 0 ;;
-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
 	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
 	exit 0 ;;
-    i?86:*:5:7*)
-       UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-       (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-       (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
-               && UNAME_MACHINE=i586
-# 5.0.4c returns "Pent II".  5.0.5 returns PentII
-       (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) \
-               && UNAME_MACHINE=i686
-       (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
-               && UNAME_MACHINE=i686
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
-       exit 0 ;;
-    i?86:*:3.2:*)
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -761,18 +922,20 @@
 		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
 		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 			&& UNAME_MACHINE=i586
-		(/bin/uname -X|egrep '^Machine.*PentII' >/dev/null) \
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pent II' >/dev/null) \
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
-                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
-                        && UNAME_MACHINE=i686
 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
 	else
 		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
         # the processor, so we play safe by assuming i386.
 	echo i386-pc-msdosdjgpp
@@ -796,7 +959,7 @@
 	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -807,28 +970,31 @@
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:*)
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit 0 ;;
-    i?86:LynxOS:2.*:*)
+    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 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+    rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
 	exit 0 ;;
-    RM*:SINIX-*:*:*)
+    RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
 	exit 0 ;;
-    RM*:ReliantUNIX-*:*:*)
+    RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
 	exit 0 ;;
     *:SINIX-*:*:*)
@@ -839,8 +1005,8 @@
 		echo ns32k-sni-sysv
 	fi
 	exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit 0 ;;
     *:UNIX_System_V:4*:FTX*)
@@ -852,13 +1018,17 @@
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
 	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
 	exit 0 ;;
-    news*:NEWS-OS:*:6*)
+    news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
 	exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
@@ -874,12 +1044,89 @@
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
 	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	if test "${UNAME_MACHINE}" = "x86pc"; then
+		UNAME_MACHINE=pc
+	fi
+	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 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 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *: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
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
-cat >dummy.c <<EOF
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
 # include <sys/utsname.h>
@@ -917,7 +1164,10 @@
 #endif
   int version;
   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
   exit (0);
 #endif
 
@@ -962,11 +1212,24 @@
 #endif
 
 #if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
 #endif
 
 #if defined (alliant) && defined (i860)
@@ -977,8 +1240,8 @@
 }
 EOF
 
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
 
@@ -1010,6 +1273,48 @@
     esac
 fi
 
-#echo '(Unable to guess system type)' 1>&2
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
 
 exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- gcc-2.95.3/config.sub	Wed Aug  4 10:09:26 1999
+++ gcc/config.sub	Sat Oct 13 18:29:48 2001
@@ -1,6 +1,10 @@
 #! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-10-13'
+
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -25,6 +29,8 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# Please send patches to <config-patches@gnu.org>.
+#
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
@@ -45,30 +51,73 @@
 #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-if [ x$1 = x ]
-then
-	echo Configuration name missing. 1>&2
-	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-	echo "or     $0 ALIAS" 1>&2
-	echo where ALIAS is a recognized configuration type. 1>&2
-	exit 1
-fi
+me=`echo "$0" | sed -e 's,.*/,,'`
 
-# First pass through any local machine types.
-case $1 in
-	*local*)
-		echo $1
-		exit 0
-		;;
-	*)
-	;;
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
 esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  linux-gnu*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -94,20 +143,28 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple)
+	-apple | -axis)
 		os=
 		basic_machine=$1
 		;;
-	-sim | -cisco | -oki | -wec | -winbond )	# EGCS LOCAL
+	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
 		;;
-	-scout)						# EGCS LOCAL
+	-scout)
 		;;
-	-wrs)						# EGCS LOCAL
+	-wrs)
 		os=-vxworks
 		basic_machine=$1
 		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -156,49 +213,60 @@
 	-psos*)
 		os=-psos
 		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
 esac
 
 # Decode aliases for certain CPU-COMPANY combinations.
 case $basic_machine in
 	# Recognize the basic CPU types without company name.
 	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-		| arme[lb] | pyramid | mn10200 | mn10300 \
-		| tron | a29k | 580 | i960 | h8300 \
-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-		| alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
-		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
-		| 1750a | dsp16xx | pdp11 \
-		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
-		| mipstx39 | mipstx39el \
-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
-		basic_machine=$basic_machine-unknown
-		;;
-	m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
-	        | h8500 | w65) # EGCS LOCAL
-		;;
-	thumb)
-		basic_machine=$basic_machine-unknown
-		;;
-	mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
-		basic_machine=$basic_machine-unknown
-		;;
-	mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dsp16xx \
+	| fr30 \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
+	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
+	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+	| mipsisa32 \
+	| mn10200 | mn10300 \
+	| ns16k | ns32k \
+	| openrisc \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| s390 | s390x \
+	| sh | sh[34] | sh[34]eb | shbe | shle \
+	| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+	| stormy16 | strongarm \
+	| tahoe | thumb | tic80 | tron \
+	| v850 \
+	| we32k \
+	| x86 | xscale \
+	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
-	mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
+		os=-none
 		;;
-	mips16)
-		basic_machine=$basic_machine-unknown
-		;;
-	d10v)
-		basic_machine=$basic_machine-unknown
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
-	i[34567]86)
+	i*86 | x86_64 | i*86be )
 	  basic_machine=$basic_machine-pc
 	  ;;
 	# Object if more than one company name word.
@@ -207,44 +275,47 @@
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
-	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
-	      | xmp-* | ymp-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* \
-	      | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
-	      | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
-	      | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
-	      | xps100-* | clipper-* | orion-* \
-	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-	      | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-*  \
-	      | mipstx39-* | mipstx39el-* \
-	      | f301-* | arm*-*)
-		;;
-	m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
-		;;
-	thumb-*) # EGCS LOCAL angela/thumb
-		;;
-	v850-*) # EGCS LOCAL
-	        ;;
-	d30v-*) # EGCS LOCAL
-	        ;;
-	mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
-		;;
-	mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
-		;;
-	mips16-*) # EGCS LOCAL krk/mips16
-		;;
-	tic30-*) # EGCS LOCAL ian/tic30
-		;;
-	c30-*) # EGCS LOCAL ian/tic30
-		basic_machine=tic30-unknown
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alphapca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armv*-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c54x-* \
+	| clipper-* | cray2-* | cydra-* \
+	| d10v-* | d30v-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| m32r-* \
+	| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
+	| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+	| v850-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
+	| ymp-* \
+	| z8k-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
-	386bsd)						# EGCS LOCAL
+	386bsd)
 		basic_machine=i386-unknown
 		os=-bsd
 		;;
@@ -254,11 +325,11 @@
 	3b*)
 		basic_machine=we32k-att
 		;;
-	a29khif)					# EGCS LOCAL
+	a29khif)
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-	adobe68k)					# EGCS LOCAL
+	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
 		;;
@@ -277,21 +348,25 @@
 		os=-sysv
 		;;
 	amiga | amiga-*)
-		basic_machine=m68k-cbm
+		basic_machine=m68k-unknown
 		;;
 	amigaos | amigados)
-		basic_machine=m68k-cbm
+		basic_machine=m68k-unknown
 		os=-amigaos
 		;;
 	amigaunix | amix)
-		basic_machine=m68k-cbm
+		basic_machine=m68k-unknown
 		os=-sysv4
 		;;
+	amithlon)
+		basic_machine=i386be-unknown
+		os=-amithlon
+		;;
 	apollo68)
 		basic_machine=m68k-apollo
 		os=-sysv
 		;;
-	apollo68bsd)					# EGCS LOCAL
+	apollo68bsd)
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
@@ -331,13 +406,16 @@
 		basic_machine=cray2-cray
 		os=-unicos
 		;;
-	[ctj]90-cray)
-		basic_machine=c90-cray
+	[cjt]90)
+		basic_machine=${basic_machine}-cray
 		os=-unicos
 		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -371,7 +449,7 @@
 	encore | umax | mmax)
 		basic_machine=ns32k-encore
 		;;
-	es1800 | OSE68k | ose68k | ose | OSE)		# EGCS LOCAL
+	es1800 | OSE68k | ose68k | ose | OSE)
 		basic_machine=m68k-ericsson
 		os=-ose
 		;;
@@ -385,6 +463,10 @@
 		basic_machine=tron-gmicro
 		os=-sysv
 		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
 	h3050r* | hiux*)
 		basic_machine=hppa1.1-hitachi
 		os=-hiuxwe2
@@ -393,11 +475,11 @@
 		basic_machine=h8300-hitachi
 		os=-hms
 		;;
-	h8300xray)					# EGCS LOCAL
+	h8300xray)
 		basic_machine=h8300-hitachi
 		os=-xray
 		;;
-	h8500hms)					# EGCS LOCAL
+	h8500hms)
 		basic_machine=h8500-hitachi
 		os=-hms
 		;;
@@ -416,22 +498,6 @@
 		basic_machine=m68k-hp
 		os=-hpux
 		;;
-        w89k-*)						# EGCS LOCAL
-                basic_machine=hppa1.1-winbond
-                os=-proelf
-                ;;
-        op50n-*)					# EGCS LOCAL
-                basic_machine=hppa1.1-oki
-                os=-proelf
-                ;;
-        op60c-*)					# EGCS LOCAL
-                basic_machine=hppa1.1-oki
-                os=-proelf
-                ;;
-        hppro)						# EGCS LOCAL
-                basic_machine=hppa1.1-hp
-                os=-proelf
-                ;;
 	hp3k9[0-9][0-9] | hp9[0-9][0-9])
 		basic_machine=hppa1.0-hp
 		;;
@@ -441,22 +507,21 @@
 	hp9k3[2-9][0-9])
 		basic_machine=m68k-hp
 		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9] )
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
 		basic_machine=hppa1.0-hp
 		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9] )
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
 		basic_machine=hppa1.1-hp
 		;;
-	hp9k78[0-9] | hp78[0-9] )
+	hp9k78[0-9] | hp78[0-9])
 		# FIXME: really hppa2.0-hp
 		basic_machine=hppa1.1-hp
 		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
-	hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
 		# FIXME: really hppa2.0-hp
 		basic_machine=hppa1.1-hp
 		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679] )
+	hp9k8[0-9][13679] | hp8[0-9][13679])
 		basic_machine=hppa1.1-hp
 		;;
 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -465,47 +530,42 @@
 	hppa-next)
 		os=-nextstep3
 		;;
-	hppaosf)					# EGCS LOCAL
+	hppaosf)
 		basic_machine=hppa1.1-hp
 		os=-osf
 		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
 	i370-ibm* | ibm*)
 		basic_machine=i370-ibm
-		os=-mvs
 		;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i[34567]86v32)
+	i*86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
 		;;
-	i[34567]86v4*)
+	i*86v4*)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv4
 		;;
-	i[34567]86v)
+	i*86v)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv
 		;;
-	i[34567]86sol2)
+	i*86sol2)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-solaris2
 		;;
-	i386mach)					# EGCS LOCAL
+	i386mach)
 		basic_machine=i386-mach
 		os=-mach
 		;;
-	i386-vsta | vsta)				# EGCS LOCAL
+	i386-vsta | vsta)
 		basic_machine=i386-unknown
 		os=-vsta
 		;;
-	i386-go32 | go32)				# EGCS LOCAL
-		basic_machine=i386-unknown
-		os=-go32
-		;;
-	i386-mingw32 | mingw32)
-		basic_machine=i386-unknown
-		os=-mingw32
-		;;
 	iris | iris4d)
 		basic_machine=mips-sgi
 		case $os in
@@ -531,9 +591,17 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
 	mipsel*-linux*)
 		basic_machine=mipsel-unknown
 		os=-linux-gnu
@@ -548,24 +616,36 @@
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	monitor)					# EGCS LOCAL
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
-	msdos)						# EGCS LOCAL
-		basic_machine=i386-unknown	
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
 		os=-msdos
 		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
 		;;
 	netbsd386)
-		basic_machine=i386-unknown		# EGCS LOCAL
+		basic_machine=i386-unknown
 		os=-netbsd
 		;;
 	netwinder)
-		basic_machine=armv4l-corel
+		basic_machine=armv4l-rebel
 		os=-linux
 		;;
 	news | news700 | news800 | news900)
@@ -580,7 +660,7 @@
 		basic_machine=mips-sony
 		os=-newsos
 		;;
-	necv70)						# EGCS LOCAL
+	necv70)
 		basic_machine=v70-nec
 		os=-sysv
 		;;
@@ -609,18 +689,29 @@
 		basic_machine=i960-intel
 		os=-nindy
 		;;
-	mon960)						# EGCS LOCAL
+	mon960)
 		basic_machine=i960-intel
 		os=-mon960
 		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
 	np1)
 		basic_machine=np1-gould
 		;;
-	OSE68000 | ose68000)				# EGCS LOCAL
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
 		;;
-	os68k)						# EGCS LOCAL
+	os68k)
 		basic_machine=m68k-none
 		os=-os68k
 		;;
@@ -641,28 +732,28 @@
         pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5 | k5 | k6 | nexen)
+	pentium | p5 | k5 | k6 | nexgen)
 		basic_machine=i586-pc
 		;;
-	pentiumpro | p6 | 6x86)
+	pentiumpro | p6 | 6x86 | athlon)
 		basic_machine=i686-pc
 		;;
 	pentiumii | pentium2)
-		basic_machine=i786-pc
+		basic_machine=i686-pc
 		;;
-	pentium-* | p5-* | k5-* | k6-* | nexen-*)
+	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	pentiumpro-* | p6-* | 6x86-*)
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pentiumii-* | pentium2-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pn)
 		basic_machine=pn-gould
 		;;
-	power)	basic_machine=rs6000-ibm
+	power)	basic_machine=power-ibm
 		;;
 	ppc)	basic_machine=powerpc-unknown
 	        ;;
@@ -674,10 +765,24 @@
 	ppcle-* | powerpclittle-*)
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
+	ppc64)	basic_machine=powerpc64-unknown
+	        ;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+	        ;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	ps2)
 		basic_machine=i386-ibm
 		;;
-	rom68k)						# EGCS LOCAL
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
 		;;
@@ -687,7 +792,7 @@
 	rtpc | rtpc-*)
 		basic_machine=romp-ibm
 		;;
-	sa29200)					# EGCS LOCAL
+	sa29200)
 		basic_machine=a29k-amd
 		os=-udi
 		;;
@@ -698,7 +803,7 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
-	sparclite-wrs)					# EGCS LOCAL
+	sparclite-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -709,10 +814,10 @@
 	spur)
 		basic_machine=spur-unknown
 		;;
-	st2000)						# EGCS LOCAL
+	st2000)
 		basic_machine=m68k-tandem
 		;;
-	stratus)					# EGCS LOCAL
+	stratus)
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
@@ -756,10 +861,22 @@
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
 	symmetry)
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	t3e)
+		basic_machine=t3e-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
@@ -777,7 +894,7 @@
 		basic_machine=a29k-nyu
 		os=-sym1
 		;;
-	v810 | necv810)					# EGCS LOCAL
+	v810 | necv810)
 		basic_machine=v810-nec
 		os=-none
 		;;
@@ -804,9 +921,17 @@
 		basic_machine=a29k-wrs
 		os=-vxworks
 		;;
-	w65*)						# EGCS LOCAL
- 		basic_machine=w65-wdc
- 		os=-none
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	windows32)
+		basic_machine=i386-pc
+		os=-windows32-msvcrt
 		;;
 	xmp)
 		basic_machine=xmp-cray
@@ -815,7 +940,7 @@
         xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
-	z8k-*-coff)					# EGCS LOCAL
+	z8k-*-coff)
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
@@ -826,13 +951,13 @@
 
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
-	w89k)						# EGCS LOCAL
+	w89k)
 		basic_machine=hppa1.1-winbond
 		;;
-	op50n)						# EGCS LOCAL
+	op50n)
 		basic_machine=hppa1.1-oki
 		;;
-	op60c)						# EGCS LOCAL
+	op60c)
 		basic_machine=hppa1.1-oki
 		;;
 	mips)
@@ -851,13 +976,20 @@
 	vax)
 		basic_machine=vax-dec
 		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
 	pdp11)
 		basic_machine=pdp11-dec
 		;;
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sparc | sparcv9)
+	sh3 | sh4 | sh3eb | sh4eb)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
         cydra)
@@ -869,16 +1001,19 @@
 	orion105)
 		basic_machine=clipper-highlevel
 		;;
-	mac | mpw | mac-mpw)				# EGCS LOCAL
+	mac | mpw | mac-mpw)
 		basic_machine=m68k-apple
 		;;
-	pmac | pmac-mpw)				# EGCS LOCAL
+	pmac | pmac-mpw)
 		basic_machine=powerpc-apple
 		;;
- 	c4x*)
- 		basic_machine=c4x-none
- 		os=-coff
-  		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
 	*)
 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 		exit 1
@@ -927,28 +1062,42 @@
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -amigaos* | -amigados* | -morphos* | -amithlon \
+	      | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* )
+	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
-	# EGCS LOCAL
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto*)
+		os=-nto-qnx
+		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
-	      | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
-	# END EGCS LOCAL
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -958,6 +1107,12 @@
 	-sunos6*)
 		os=`echo $os | sed -e 's|sunos6|solaris3|'`
 		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
 	-osfrose*)
 		os=-osfrose
 		;;
@@ -973,7 +1128,7 @@
 	-acis*)
 		os=-aos
 		;;
-	-386bsd)					# EGCS LOCAL
+	-386bsd)
 		os=-bsd
 		;;
 	-ctix* | -uts*)
@@ -982,6 +1137,9 @@
 	-ns2 )
 	        os=-nextstep2
 		;;
+	-nsk*)
+		os=-nsk
+		;;
 	# Preserve the version number of sinix5.
 	-sinix5.*)
 		os=`echo $os | sed -e 's|sinix|sysv|'`
@@ -1007,15 +1165,18 @@
 	# This must come after -sysvr4.
 	-sysv*)
 		;;
-	-ose*)						# EGCS LOCAL
+	-ose*)
 		os=-ose
 		;;
-	-es1800*)					# EGCS LOCAL
+	-es1800*)
 		os=-ose
 		;;
 	-xenix)
 		os=-xenix
 		;;
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+	        os=-mint
+		;;
 	-none)
 		;;
 	*)
@@ -1041,12 +1202,15 @@
 	*-acorn)
 		os=-riscix1.2
 		;;
-	arm*-corel)
+	arm*-rebel)
 		os=-linux
 		;;
 	arm*-semi)
 		os=-aout
 		;;
+	pdp10-*)
+		os=-tops20
+		;;
         pdp11-*)
 		os=-none
 		;;
@@ -1065,15 +1229,15 @@
 		# default.
 		# os=-sunos4
 		;;
-	m68*-cisco)					# EGCS LOCAL
+	m68*-cisco)
 		os=-aout
 		;;
-	mips*-cisco)					# EGCS LOCAL
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
 		os=-elf
 		;;
-        mips*-*)                                        # EGCS LOCAL
-                os=-elf
-                ;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
 		os=-sysv3
 		;;
@@ -1086,13 +1250,13 @@
 	*-ibm)
 		os=-aix
 		;;
-	*-wec)						# EGCS LOCAL
+	*-wec)
 		os=-proelf
 		;;
-	*-winbond)					# EGCS LOCAL
+	*-winbond)
 		os=-proelf
 		;;
-	*-oki)						# EGCS LOCAL
+	*-oki)
 		os=-proelf
 		;;
 	*-hp)
@@ -1155,18 +1319,21 @@
 	*-masscomp)
 		os=-rtu
 		;;
-	f301-fujitsu)
+	f30[01]-fujitsu | f700-fujitsu)
 		os=-uxpv
 		;;
-	*-rom68k)					# EGCS LOCAL
+	*-rom68k)
 		os=-coff
 		;;
-	*-*bug)						# EGCS LOCAL
+	*-*bug)
 		os=-coff
 		;;
-	*-apple)					# EGCS LOCAL
+	*-apple)
 		os=-macos
 		;;
+	*-atari*)
+		os=-mint
+		;;
 	*)
 		os=-none
 		;;
@@ -1212,7 +1379,7 @@
 			-genix*)
 				vendor=ns
 				;;
-			-mvs*)
+			-mvs* | -opened*)
 				vendor=ibm
 				;;
 			-ptx*)
@@ -1224,15 +1391,29 @@
 			-aux*)
 				vendor=apple
 				;;
-			-hms*)				# EGCS LOCAL
+			-hms*)
 				vendor=hitachi
 				;;
-			-mpw* | -macos*)		# EGCS LOCAL
+			-mpw* | -macos*)
 				vendor=apple
 				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
 		esac
 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 		;;
 esac
 
 echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- gcc-2.95.3/configure.in	Wed Jun 23 00:44:40 1999
+++ gcc/configure.in	Thu Sep 27 19:52:22 2001
@@ -50,7 +50,7 @@
 # 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.
-host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
+host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
 
 
 # these libraries are built for the target environment, and are built after
--- gcc-2.95.3/gcc/amigacollect2.c	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/amigacollect2.c	Thu Sep 27 19:35:53 2001
@@ -0,0 +1,344 @@
+/* GG-local whole file: dynamic libraries */
+/* Supplimentary functions that get compiled and linked to collect2 for
+   AmigaOS target.
+   Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+/* From collect2.c:  */
+
+void maybe_unlink(char *);
+char* xmalloc(unsigned);
+void fatal_perror(char *, ...);
+void fork_execute(char *, char **);
+void fatal(char*, ...);
+
+extern char *c_file_name;
+extern int debug;
+
+/* Names of temporary files we create.  */
+#define XLIBS_C_NAME "xlibs.c"
+#define XLIBS_O_NAME "xlibs.o"
+#define SHARED_X_NAME "shared.x"
+
+/* Suffix which is prepended to "-l" options for dynamic libraries.  */
+#define DYNAMIC_LIB_SUFFIX "_ixlibrary"
+
+/* Structure that holds library names.  */
+struct liblist
+{
+  struct liblist *next;
+  char *name;
+  char *cname;
+};
+
+/* Not zero if "-static" was specified on GCC command line or if all the
+   libraries are static.  */
+static int flag_static=0;
+
+/* Not zero if linking a base relative executable.  This is recognized by
+   presence of "-m amiga_bss" on the linker's commandline.  */
+static int flag_baserel=0;
+
+/* Not zero if some of the specified libraries are dynamic.  */
+static int found_dynamic_libs=0;
+
+/* List of linker libraries.  */
+struct liblist *head = NULL;
+
+/* Return 1 if collect2 should do something more apart from tlink. We want it
+   to call "postlink" and "strip" if linking with dynamic libraries.  */
+
+int
+amigaos_do_collecting(void)
+{
+  return !flag_static;
+}
+
+/* Check for presence of "-static" on the GCC command line.  We should not do
+   collecting if this flag was specified.  */
+
+void
+amigaos_gccopts_hook(char* arg)
+{
+  if (strncmp(arg, "-static", strlen("-static"))==0)
+    flag_static=1;
+}
+
+/* Replace unprintable characters with underscores.  Used by "add_lib()".  */
+
+static void
+safename(char *p)
+{
+  if (!isalpha(*p))
+    *p = '_';
+  p++;
+  while (*p)
+    {
+      if (!isalnum(*p))
+	*p = '_';
+      p++;
+    }
+}
+
+/* Add a library to the list of dynamic libraries.  First make sure that the
+   library is actually dynamic.  Used by "amigaos_libname_hook()".  */
+
+static void
+add_lib(char *name)
+{
+  struct liblist *lib;
+  static char buf[256];
+
+  for (lib = head; lib; lib = lib->next)
+    if (!strcmp(lib->name, name))
+      return;
+
+  /* A2IXDIR_PREFIX is passed by "make".  */
+  sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", name);
+  if (access(buf, R_OK))
+    return;
+
+  lib = (struct liblist*)xmalloc(sizeof(struct liblist));
+  lib->name = strdup(name);
+  lib->cname = strdup(name);
+  safename(lib->cname);
+  lib->next = head;
+  head = lib;
+
+  if (debug)
+    fprintf(stderr, "found dynamic library, name: %s, cname: %s\n", lib->name,
+	    lib->cname);
+
+  found_dynamic_libs=1;
+}
+
+/* Check if the argument is a linker library.  Call "add_lib()" if yes.  */
+
+void
+amigaos_libname_hook(char* arg)
+{
+  int len = strlen(arg);
+  if (flag_static)
+    return;
+
+  if (len > 2 && !memcmp(arg, "-l", 2))
+    add_lib(arg + 2);
+  else if (len > 2 && !strcmp(arg + len - 2, ".a"))
+    {
+      char *lib;
+
+      arg[len - 2] = '\0';
+      lib = strrchr(arg, '/');
+      if (lib == NULL)
+	lib = strrchr(arg, ':');
+      if (lib == NULL)
+	lib = arg - 1;
+      if (!strncmp(lib + 1, "lib", 3))
+	add_lib(lib + 4);
+      arg[len - 2] = '.';
+    }
+}
+
+/* Delete temporary files.  */
+
+void
+amigaos_collect2_cleanup(void)
+{
+  if (flag_static)
+    return;
+  maybe_unlink(XLIBS_C_NAME);
+  maybe_unlink(XLIBS_O_NAME);
+  maybe_unlink(SHARED_X_NAME);
+}
+
+/* Copy file named by FNAME to X.  */
+
+static void
+cat(char *fname, FILE *x)
+{
+#define BUFSIZE 16384
+  FILE *in;
+  static char buf[BUFSIZE];
+  int bytes;
+  
+  in = fopen(fname, "r");
+  if (in == NULL)
+    fatal_perror("%s", fname);
+  while (!feof(in) && (bytes = fread(buf, 1, BUFSIZE, in)))
+    fwrite(buf, 1, bytes, x);
+  fclose(in);
+}
+
+/* If no dynamic libraries were found, perform like "-static".  Otherwise,
+   create "xlibs.c", "shared.x" and invoke "gcc" to create "xlibs.o".  We also
+   have to adjust the linker commandline.  */
+
+void
+amigaos_prelink_hook(char** ld1_argv, int* strip_flag)
+{
+  if (flag_static)
+    return;
+
+  if (!found_dynamic_libs)
+    {
+      flag_static=1;
+      /* If the user has not requested "-static", but has requested "-s",
+	 collect2 removes "-s" from the "ld1_argv", and calls "strip" after
+	 linking.  However, this would not be efficient if we linked the
+	 executable without any dynamic library.  In this case, we put "-s"
+	 back.  */
+      if (*strip_flag)
+	{
+	  /* Add "-s" as the last argument on the command line.  */
+	  while (*ld1_argv)
+	    ld1_argv++;
+	  *ld1_argv++="-s";
+	  *ld1_argv=0;
+	  *strip_flag=0;
+	}
+    }
+  else
+    {
+      FILE *x, *out;
+      struct liblist *lib;
+      static char* argv[]={0, "-c", XLIBS_C_NAME, 0};
+      char **ld1_end, **ld1;
+
+      /* Prepend suffixes to dynamic lib names. In addition, check if we are
+	 linking a base relative executable.  */
+      for (ld1=ld1_argv; *ld1; ld1++)
+	{
+	  int len=strlen(*ld1);
+	  if (strncmp(*ld1, "-l", strlen("-l"))==0)
+	    {
+	      for (lib=head; lib; lib=lib->next)
+		if (strcmp(*ld1+strlen("-l"), lib->name)==0)
+		  {
+		    char *newname=
+			    xmalloc(strlen(*ld1)+strlen(DYNAMIC_LIB_SUFFIX)+1);
+		    strcpy(newname, *ld1);
+		    strcat(newname, DYNAMIC_LIB_SUFFIX);
+		    *ld1=newname;
+		    break;
+		  }
+	    }
+	  else if (len > 2 && !strcmp(*ld1 + len - 2, ".a"))
+	    {
+	      char *libname;
+	      int substituted=0;
+
+	      (*ld1)[len - 2] = '\0';
+	      libname = strrchr(*ld1, '/');
+	      if (libname == NULL)
+		libname = strrchr(*ld1, ':');
+	      if (libname == NULL)
+		libname = *ld1 - 1;
+	      if (!strncmp(libname + 1, "lib", 3))
+		for (lib=head; lib; lib=lib->next)
+		  if (strcmp(libname+4, lib->name)==0)
+		    {
+		      char *newname=xmalloc(strlen(*ld1)+
+					    strlen(DYNAMIC_LIB_SUFFIX)+3);
+		      strcpy(newname, *ld1);
+		      strcat(newname, DYNAMIC_LIB_SUFFIX);
+		      strcat(newname, ".a");
+		      *ld1=newname;
+		      substituted=1;
+		      break;
+		    }
+	      if (!substituted)
+		(*ld1)[len - 2] = '.';
+	    }
+	  else if (strcmp(ld1[0], "-m")==0 && ld1[1]
+		   && strcmp(ld1[1], "amiga_bss")==0)
+	    {
+	      flag_baserel=1;
+	      break;
+	    }
+	}
+
+      out = fopen(XLIBS_C_NAME, "w");
+      if (out == NULL)
+	fatal_perror("%s", XLIBS_C_NAME);
+      x = fopen(SHARED_X_NAME, "w");
+      if (x == NULL)
+	fatal_perror("%s", SHARED_X_NAME);
+
+      cat((flag_baserel ? A2IXDIR_PREFIX "/amiga_exe_baserel_script.x"
+			: A2IXDIR_PREFIX "/amiga_exe_script.x"), x);
+      for (lib = head; lib; lib = lib->next)
+	{
+	  static char buf[256];
+	  sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", lib->name);
+	  fprintf(out, "extern long %sBase; long *__p%sBase = &%sBase;\n",
+		  lib->cname, lib->cname, lib->cname);
+	  cat(buf, x);
+	} /* {{ */
+      fprintf(x, "}}\n");
+      fclose(out);
+      fclose(x);
+      argv[0]=c_file_name;
+      fork_execute("gcc", argv);
+
+      /* Unfortunately, unlike "-s", "-T" cannot be specified as the last
+	 argument. We put it after "-L" args.  */
+      ld1_end=ld1_argv;
+      while (*ld1_end)
+	ld1_end++;
+      ld1_end++;
+      /* "ld1_end" now points after the terminating 0 of "ld1_argv".  */
+
+      ld1=ld1_end-2;
+      while (ld1>ld1_argv && strncmp(*ld1, "-L", strlen("-L")))
+	ld1--;
+      if (ld1==ld1_argv)
+	fatal("no -L arguments");
+      ld1++;
+      /* "ld1" now points after "-L".  */
+
+      /* Shift all the arguments after "-L" one position right.  */
+      memmove(ld1+1, ld1, (ld1_end-ld1)*sizeof(*ld1));
+      /* Put -Tshared.x in the now empty space.  */
+      *ld1="-T" SHARED_X_NAME;
+    }
+}
+
+/* Be lazy and just call "postlink".  */
+
+void
+amigaos_postlink_hook(char* output_file)
+{
+  static char* argv[]={"postlink", 0, 0, 0};
+  if (flag_static)
+    return;
+
+  if (flag_baserel)
+    {
+      argv[1]="-baserel";
+      argv[2]=output_file;
+    }
+  else
+    argv[1]=output_file;
+  fork_execute("postlink", argv);
+}
--- gcc-2.95.3/gcc/calls.c	Thu Jan 25 15:03:00 2001
+++ gcc/gcc/calls.c	Thu Sep 27 19:35:54 2001
@@ -2613,6 +2613,10 @@
 
   fun = orgfun;
 
+#ifdef LIBCALL_ENCODE_SECTION_INFO
+  LIBCALL_ENCODE_SECTION_INFO (fun);
+#endif
+
   /* Copy all the libcall-arguments out of the varargs data
      and into a vector ARGVEC.
 
@@ -3113,6 +3117,10 @@
   is_const = no_queue;
   fun = orgfun;
 
+#ifdef LIBCALL_ENCODE_SECTION_INFO
+  LIBCALL_ENCODE_SECTION_INFO (fun);
+#endif
+
   /* If this kind of value comes back in memory,
      decide where in memory it should come back.  */
   if (aggregate_value_p (type_for_mode (outmode, 0)))
--- gcc-2.95.3/gcc/cccp.c	Thu Jan 25 15:03:00 2001
+++ gcc/gcc/cccp.c	Thu Sep 27 19:35:54 2001
@@ -85,7 +85,7 @@
 
 /* Windows does not natively support inodes, and neither does MSDOS.  */
 #if (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN)) \
-  || defined (__MSDOS__)
+  || defined (__MSDOS__) || defined (__amigaos__) || defined (__morphos__)
 #define INO_T_EQ(a, b) 0
 #endif
 
@@ -103,6 +103,11 @@
 
 /* External declarations.  */
 
+#ifndef OPEN_CASE_SENSITIVE
+/* Default is standard open() */
+#define OPEN_CASE_SENSITIVE open
+#endif
+
 extern char *version_string;
 HOST_WIDEST_INT parse_escape PROTO((char **, HOST_WIDEST_INT));
 HOST_WIDEST_INT parse_c_expression PROTO((char *, int));
@@ -403,6 +408,10 @@
     /* This is another place that the target system's headers might be.  */
     { TOOL_INCLUDE_DIR, "BINUTILS", 0, 0, 0 },
 #endif
+    /* Some systems have an extra dir of include files.  */
+#ifdef SYSTEM_INCLUDE_DIR
+    { SYSTEM_INCLUDE_DIR, 0, 0, 0, 0 },
+#endif
 #else /* not CROSS_COMPILE */
 #ifdef LOCAL_INCLUDE_DIR
     /* This should be /usr/local/include and should come before
@@ -1124,7 +1133,7 @@
   printf ("Usage: %s [switches] input output\n", progname);
   printf ("Switches:\n");
   printf ("  -include <file>           Include the contents of <file> before other files\n");
-  printf ("  -imacros <file>           Accept definition of marcos in <file>\n");
+  printf ("  -imacros <file>           Accept definition of macros in <file>\n");
   printf ("  -iprefix <path>           Specify <path> as a prefix for next two options\n");
   printf ("  -iwithprefix <dir>        Add <dir> to the end of the system include paths\n");
   printf ("  -iwithprefixbefore <dir>  Add <dir> to the end of the main include paths\n");
@@ -1918,7 +1927,12 @@
 	notice ("#include <...> search starts here:\n");
       if (!p->fname[0])
 	fprintf (stderr, " .\n");
-      else if (!strcmp (p->fname, "/") || !strcmp (p->fname, "//"))
+      else if (!strcmp (p->fname, "/") || !strcmp (p->fname, "//")
+#ifdef VOL_SEPARATOR
+	/* Don't omit the last character if it's not a '/'.  */
+	       || p->fname[strlen (p->fname) - 1] != '/'
+#endif
+	       )
 	fprintf (stderr, " %s\n", p->fname);
       else
 	/* Omit trailing '/'.  */
@@ -4785,6 +4799,9 @@
 #ifdef DIR_SEPARATOR
   if ((p = rindex (s, DIR_SEPARATOR))) s = p + 1;
 #endif
+#ifdef VOL_SEPARATOR
+  if ((p = rindex (s, VOL_SEPARATOR))) s = p + 1;
+#endif
   return s;
 }
 
@@ -4794,6 +4811,7 @@
 absolute_filename (filename)
      char *filename;
 {
+#ifndef FILE_NAME_ABSOLUTE_P
 #if defined (__MSDOS__) \
   || (defined (_WIN32) && !defined (__CYGWIN__) && !defined (_UWIN))
   if (ISALPHA (filename[0]) && filename[1] == ':') filename += 2;
@@ -4810,6 +4828,9 @@
   if (filename[0] == DIR_SEPARATOR) return 1;
 #endif
   return 0;
+#else /* FILE_NAME_ABSOLUTE_P */
+  return FILE_NAME_ABSOLUTE_P (filename);
+#endif /* FILE_NAME_ABSOLUTE_P */
 }
 
 /* Returns whether or not a given character is a directory separator.
@@ -4888,10 +4909,12 @@
                   return to - filename;
                 }
             }
+#if !defined (__amigaos__) && !defined (__morphos__)	/* Don't convert ':' on Amiga! */
 #if defined(DIR_SEPARATOR_2)
           /* Simplify to one directory separator.  */
           to[-1] = DIR_SEPARATOR;
 #endif
+#endif
         }
 
     /* Skip /s after a /.  */
@@ -5072,7 +5095,7 @@
       || ! inc->control_macro
       || (inc->control_macro[0] && ! lookup (inc->control_macro, -1, -1))) {
 
-    fd = open (fname, O_RDONLY, 0);
+    fd = OPEN_CASE_SENSITIVE (fname, O_RDONLY, 0);
 
     if (fd < 0)
       {
@@ -10406,7 +10429,11 @@
     len = simplify_filename (dir->fname);
 
     /* Convert directory name to a prefix.  */
-    if (len && dir->fname[len - 1] != DIR_SEPARATOR) {
+    if (len && dir->fname[len - 1] != DIR_SEPARATOR
+#ifdef VOL_SEPARATOR
+	&& dir->fname[len - 1] != VOL_SEPARATOR
+#endif
+	) {
       if (len == 1 && dir->fname[len - 1] == '.')
 	len = 0;
       else
--- gcc-2.95.3/gcc/c-decl.c	Thu Jan 25 15:02:59 2001
+++ gcc/gcc/c-decl.c	Thu Sep 27 19:35:53 2001
@@ -4227,8 +4227,10 @@
    record the given order of parms in `parm_order'.  */
 
 void
-push_parm_decl (parm)
-     tree parm;
+/* begin-GG-local: explicit register specification for parameters */
+push_parm_decl (parm, asmspec)
+     tree parm, asmspec;
+/* end-GG-local */
 {
   tree decl;
   int old_immediate_size_expand = immediate_size_expand;
@@ -4253,6 +4255,78 @@
     }
 #endif
 
+  /* begin-GG-local: explicit register specification for parameters */
+  if (asmspec)
+#ifdef TARGET_AMIGAOS
+    {
+      char *regname=TREE_STRING_POINTER(asmspec);
+      int regnum;
+      if ((regnum=decode_reg_name(regname))>=0)
+	{
+	  tree type=TREE_TYPE(decl);
+	  if (HARD_REGNO_MODE_OK(regnum, TYPE_MODE(type)))
+	    {
+	      tree t, attrs;
+	      push_obstacks_nochange();
+	      end_temporary_allocation();
+	      /* Build tree for __attribute__ ((asm(regnum))). */
+#if 0
+	      /* This doesn't work well because of a bug in
+		 attribute_list_contained(), which passes list of arguments to
+		 simple_cst_equal() instead of passing every argument
+		 separately. */
+	      attrs=tree_cons(get_identifier("asm"), tree_cons(NULL_TREE,
+		    build_int_2_wide(regnum, 0), NULL_TREE), NULL_TREE);
+#else
+	      attrs=tree_cons(get_identifier("asm"),
+			      build_int_2_wide(regnum, 0), NULL_TREE);
+#endif
+#if 0
+	      /* build_type_attribute_variant() would seem to be more
+		 appropriate here. However, that function does not support
+		 attributes for parameters properly. It modifies
+		 TYPE_MAIN_VARIANT of a new type. As a result, comptypes()
+		 thinks that types of parameters in prototype and definition
+		 are different and issues error messages. See also comment
+		 below. */
+	      type=build_type_attribute_variant(type, attrs);
+#else
+	      /* First check whether such a type already exists - if yes, use
+		 that one. This is very important, since otherwise
+		 common_type() would think that it sees two different
+		 types and would try to merge them - this could result in
+		 warning messages. */
+	      for (t=TYPE_MAIN_VARIANT(type); t; t=TYPE_NEXT_VARIANT(t))
+		if (comptypes(t, type)==1
+		    && attribute_list_equal(TYPE_ATTRIBUTES(t), attrs))
+		      break;
+	      if (t)
+		type=t;
+	      else
+		{
+		  /* Create a new variant, with differing attributes.
+		     (Hack! Type with differing attributes should no longer be
+		     a variant of its main type. See comment above for
+		     explanation why this was necessary). */
+		  type=build_type_copy(type);
+		  TYPE_ATTRIBUTES(type)=attrs;
+		}
+#endif
+	      TREE_TYPE(decl)=type;
+	      pop_obstacks();
+	    }
+	  else
+	    error_with_decl(decl,
+		"register number for `%s' isn't suitable for the data type");
+	}
+      else
+	error("invalid register name `%s'", regname);
+    }
+#else /* !TARGET_AMIGAOS */
+    error("explicit register specification for parameters is not supported for this target");
+#endif /* !TARGET_AMIGAOS */
+  /* end-GG-local */
+
   decl = pushdecl (decl);
 
   immediate_size_expand = old_immediate_size_expand;
--- gcc-2.95.3/gcc/collect2.c	Thu Jan 25 15:03:01 2001
+++ gcc/gcc/collect2.c	Thu Sep 27 19:35:54 2001
@@ -157,6 +157,12 @@
 #else
 int do_collecting = 0;
 #endif
+
+/* begin-GG-local: dynamic libraries */
+#ifndef DO_COLLECTING
+#define DO_COLLECTING do_collecting
+#endif
+/* end-GG-local */
 
 /* Linked lists of constructor and destructor names.  */
 
@@ -278,8 +284,10 @@
 static void prefix_from_env	PROTO((char *, struct path_prefix *));
 static void prefix_from_string	PROTO((char *, struct path_prefix *));
 static void do_wait		PROTO((char *));
-static void fork_execute	PROTO((char *, char **));
-static void maybe_unlink	PROTO((char *));
+/* begin-GG-local: dynamic libraries */
+void fork_execute		PROTO((char *, char **));
+void maybe_unlink		PROTO((char *));
+/* end-GG-local */
 static void add_to_list		PROTO((struct head *, char *));
 static int  extract_init_priority PROTO((char *));
 static void sort_ids		PROTO((struct head *));
@@ -399,6 +407,12 @@
   if (status != 0 && output_file != 0 && output_file[0])
     maybe_unlink (output_file);
 
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_EXTRA_CLEANUP
+  COLLECT2_EXTRA_CLEANUP();
+#endif
+/* end-GG-local */
+
   exit (status);
 }
 
@@ -523,6 +537,12 @@
     maybe_unlink (import_file);
 #endif
 
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_EXTRA_CLEANUP
+  COLLECT2_EXTRA_CLEANUP();
+#endif
+/* end-GG-local */
+
   signal (signo, SIG_DFL);
   kill (getpid (), signo);
 }
@@ -823,11 +843,15 @@
 
   /* Determine the filename to execute (special case for absolute paths).  */
 
+#ifndef FILE_NAME_ABSOLUTE_P
   if (*name == '/'
 #ifdef HAVE_DOS_BASED_FILE_SYSTEM
       || (*name && name[1] == ':')
 #endif
       )
+#else
+  if (FILE_NAME_ABSOLUTE_P (name))
+#endif
     {
       if (access (name, X_OK) == 0)
 	{
@@ -1063,6 +1087,11 @@
       char *q = extract_string (&p);
       if (*q == '-' && (q[1] == 'm' || q[1] == 'f'))
 	num_c_args++;
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_GCC_OPTIONS_HOOK
+      COLLECT2_GCC_OPTIONS_HOOK(q);
+#endif
+/* end-GG-local */
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
   ++num_c_args;
@@ -1340,6 +1369,11 @@
 		add_to_list (&libs, s);
 	      }
 #endif
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_LIBNAME_HOOK
+	      COLLECT2_LIBNAME_HOOK(arg);
+#endif
+/* end-GG-local */
 	      break;
 
 #ifdef COLLECT_EXPORT_LIST
@@ -1362,7 +1396,9 @@
 	      break;
 
 	    case 's':
-	      if (arg[2] == '\0' && do_collecting)
+/* begin-GG-local: dynamic libraries */
+	     if (arg[2] == '\0' && DO_COLLECTING)
+/* end-GG-local */
 		{
 		  /* We must strip after the nm run, otherwise C++ linking
 		     will not work.  Thus we strip in the second ld run, or
@@ -1413,6 +1449,11 @@
               add_to_list (&libs, arg);
             }
 #endif
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_LIBNAME_HOOK
+	  COLLECT2_LIBNAME_HOOK(arg);
+#endif
+/* end-GG-local */
 	}
     }
 
@@ -1511,6 +1552,12 @@
       fprintf (stderr, "\n");
     }
 
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_PRELINK_HOOK
+  COLLECT2_PRELINK_HOOK(ld1_argv, &strip_flag);
+#endif
+/* end-GG-local */
+
   /* Load the program, searching all libraries and attempting to provide
      undefined symbols from repository information.  */
 
@@ -1523,7 +1570,9 @@
      constructor or destructor list, just return now.  */
   if (rflag
 #ifndef COLLECT_EXPORT_LIST
-      || ! do_collecting
+/* begin-GG-local: dynamic libraries */
+      || ! DO_COLLECTING
+/* end-GG-local */
 #endif
       )
     {
@@ -1542,6 +1591,8 @@
       return 0;
     }
 
+/* begin-GG-local: dynamic libraries */
+#ifndef COLLECT2_POSTLINK_HOOK
   /* Examine the namelist with nm and search it for static constructors
      and destructors to call.
      Write the constructor and destructor tables to a .s file and reload.  */
@@ -1561,6 +1612,10 @@
       notice ("%d destructor(s)  found\n", destructors.number);
       notice ("%d frame table(s) found\n", frame_tables.number);
     }
+#else /* COLLECT2_POSTLINK_HOOK */
+  COLLECT2_POSTLINK_HOOK(output_file);
+#endif
+/* end-GG-local */
 
   if (constructors.number == 0 && destructors.number == 0
       && frame_tables.number == 0
@@ -1592,6 +1647,11 @@
 #endif
       maybe_unlink (c_file);
       maybe_unlink (o_file);
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_EXTRA_CLEANUP
+      COLLECT2_EXTRA_CLEANUP();
+#endif
+/* end-GG-local */
       return 0;
     }
 
@@ -1671,6 +1731,11 @@
   maybe_unlink (import_file);
 #endif
 
+/* begin-GG-local: dynamic libraries */
+#ifdef COLLECT2_EXTRA_CLEANUP
+  COLLECT2_EXTRA_CLEANUP();
+#endif
+/* end-GG-local */
   return 0;
 }
 
@@ -1793,7 +1858,9 @@
    fatal_perror (errmsg_fmt, errmsg_arg);
 }
 
-static void
+/* begin-GG-local: dynamic libraries */
+void
+/* end-GG-local */
 fork_execute (prog, argv)
      char *prog;
      char **argv;
@@ -1804,7 +1871,9 @@
 
 /* Unlink a file unless we are debugging.  */
 
-static void
+/* begin-GG-local: dynamic libraries */
+void
+/* end-GG-local */
 maybe_unlink (file)
      char *file;
 {
--- gcc-2.95.3/gcc/combine.c	Thu Jan 25 15:03:01 2001
+++ gcc/gcc/combine.c	Thu Sep 27 19:35:54 2001
@@ -122,6 +122,11 @@
 #ifndef REVERSIBLE_CC_MODE
 #define REVERSIBLE_CC_MODE(MODE) 0
 #endif
+
+#ifndef GET_MIN_MODE_ALIGNMENT
+#define GET_MIN_MODE_ALIGNMENT(mode) 1
+#endif
+
 
 /* Vector mapping INSN_UIDs to cuids.
    The cuids are like uids but increase monotonically always.
@@ -5626,7 +5631,7 @@
 	  || (GET_CODE (inner) == MEM && pos_rtx == 0
 	      && (pos
 		  % (STRICT_ALIGNMENT ? GET_MODE_ALIGNMENT (tmode)
-		     : BITS_PER_UNIT)) == 0
+		     : GET_MIN_MODE_ALIGNMENT (tmode))) == 0
 	      /* We can't do this if we are widening INNER_MODE (it
 		 may not be aligned, for one thing).  */
 	      && GET_MODE_BITSIZE (inner_mode) >= GET_MODE_BITSIZE (tmode)
--- gcc-2.95.3/gcc/config/i386/amithlon.h	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/i386/amithlon.h	Tue Jun  4 19:39:04 2002
@@ -0,0 +1,355 @@
+/* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Contributed by Eric Youngdale.
+   Modified for stabs-in-ELF by H.J. Lu.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Amithlon is basically just a Linux process, so lets act as one... */
+
+#include <i386/linux.h>
+
+/* Now undo and redefine */
+#undef LINUX_DEFAULT_ELF
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (i386be Amithlon/ELF)");
+
+/* Some predicates used in i386be.md */
+#undef PREDICATE_CODES
+#define PREDICATE_CODES						\
+  {"cint_operand",        {CONST_INT}},				\
+  {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}}, 		\
+
+/* Now the fun part: let's use big endian integers, but little endian
+   floats and instructions ... */
+
+/* Define this if most significant byte of a word is the lowest numbered.  */
+#undef BYTES_BIG_ENDIAN
+#define BYTES_BIG_ENDIAN 1
+
+/* Define this if most significant word of a multiword number is the lowest
+   numbered.  */
+#undef WORDS_BIG_ENDIAN
+#define WORDS_BIG_ENDIAN 1
+
+/* Define this if most significant word of doubles is the lowest numbered. */
+#undef FLOAT_WORDS_BIG_ENDIAN
+#define FLOAT_WORDS_BIG_ENDIAN 0
+
+
+
+
+
+
+
+
+
+
+#if 0
+
+/* Since GCC assumes the endian word order for registers is the same as for
+   memory, we have to swap eax and edx :( */
+
+This turned out to be WAY to difficult ....
+
+
+/* 1 for registers that have pervasive standard uses
+   and are not available for the register allocator.
+   On the 80386, the stack pointer is such, as is the arg pointer. */
+
+#undef FIXED_REGISTERS
+#define FIXED_REGISTERS \
+/*dx,ax,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/       \
+{  0, 0, 0, 0, 0, 0, 0, 1, 0,  0,  0,  0,  0,  0,  0,  0,  1 }
+
+/* 1 for registers not available across function calls.
+   These must include the FIXED_REGISTERS and also any
+   registers that can be used without being saved.
+   The latter must include the registers where values are returned
+   and the register where structure-value addresses are passed.
+   Aside from that, you can include as many other registers as you like.  */
+
+#undef CALL_USED_REGISTERS
+#define CALL_USED_REGISTERS \
+/*dx,ax,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \
+{  1, 1, 1, 0, 0, 0, 0, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1 }
+
+/* Order in which to allocate registers.  Each register must be
+   listed once, even those in FIXED_REGISTERS.  List frame pointer
+   late and fixed registers last.  Note that, in general, we prefer
+   registers listed in CALL_USED_REGISTERS, keeping the others
+   available for storage of persistent values.
+
+   Three different versions of REG_ALLOC_ORDER have been tried:
+
+   If the order is edx, ecx, eax, ... it produces a slightly faster compiler,
+   but slower code on simple functions returning values in eax.
+
+   If the order is eax, ecx, edx, ... it causes reload to abort when compiling
+   perl 4.036 due to not being able to create a DImode register (to hold a 2
+   word union).
+
+   If the order is eax, edx, ecx, ... it produces better code for simple
+   functions, and a slightly slower compiler.  Users complained about the code
+   generated by allocating edx first, so restore the 'natural' order of things. */
+
+#undef REG_ALLOC_ORDER
+#define REG_ALLOC_ORDER \
+/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \
+{  1, 0, 2, 3, 4, 5, 6, 7, 8,  9, 10, 11, 12, 13, 14, 15, 16 }
+
+/* How to refer to registers in assembler output.
+   This sequence is indexed by compiler's hard-register-number (see above). */
+
+/* In order to refer to the first 8 regs as 32 bit regs prefix an "e"
+   For non floating point regs, the following are the HImode names.
+
+   For float regs, the stack top is sometimes referred to as "%st(0)"
+   instead of just "%st".  PRINT_REG handles this with the "y" code.  */
+
+#undef HI_REGISTER_NAMES
+#define HI_REGISTER_NAMES \
+{"dx","ax","cx","bx","si","di","bp","sp",          \
+ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","" }
+
+#define REGISTER_NAMES HI_REGISTER_NAMES
+
+/* Table of additional register names to use in user input.  */
+
+#undef ADDITIONAL_REGISTER_NAMES
+#define ADDITIONAL_REGISTER_NAMES \
+{ { "edx", 0 }, { "eax", 1 }, { "ecx", 2 }, { "ebx", 3 },	\
+  { "esi", 4 }, { "edi", 5 }, { "ebp", 6 }, { "esp", 7 },	\
+  { "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 },		\
+  { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 } }
+
+/* Note we are omitting these since currently I don't know how
+to get gcc to use these, since they want the same but different
+number as al, and ax.
+*/
+
+/* note the last four are not really qi_registers, but
+   the md will have to never output movb into one of them
+   only a movw .  There is no movb into the last four regs */
+
+#undef QI_REGISTER_NAMES
+#define QI_REGISTER_NAMES \
+{"dl", "al", "cl", "bl", "si", "di", "bp", "sp",}
+
+/* These parallel the array above, and can be used to access bits 8:15
+   of regs 0 through 3. */
+
+#undef QI_HIGH_REGISTER_NAMES
+#define QI_HIGH_REGISTER_NAMES \
+{"dh", "ah", "ch", "bh", }
+
+/* How to renumber registers for dbx and gdb.  */
+
+/* {1,2,0,3,6,7,4,5,12,13,14,15,16,17}  */
+#undef DBX_REGISTER_NUMBER
+#define DBX_REGISTER_NUMBER(n) \
+((n) == 0 ? 1 : \
+ (n) == 1 ? 2 : \
+ (n) == 2 ? 0 : \
+ (n) == 3 ? 3 : \
+ (n) == 4 ? 6 : \
+ (n) == 5 ? 7 : \
+ (n) == 6 ? 4 : \
+ (n) == 7 ? 5 : \
+ (n) + 4)
+
+#endif  // 0
+
+
+
+
+
+
+
+/* The assembler will use big endian for data section, but we must
+ * swap the words in 64 bit integers ourself. We also have to "undo"
+ * the byteswap in the individual words for floats
+ */
+
+/* This is how to output an assembler line defining an `long long'
+   constant.  */
+
+#undef ASM_OUTPUT_DOUBLE_INT
+#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)				\
+do {									\
+      assemble_integer (operand_subword ((VALUE), 0, 0, DImode),	\
+                        UNITS_PER_WORD, 1);				\
+      assemble_integer (operand_subword ((VALUE), 1, 0, DImode),	\
+                        UNITS_PER_WORD, 1);				\
+} while (0)
+
+
+/* This is how to output an assembler line defining a `double' constant.  */
+
+#undef ASM_OUTPUT_DOUBLE
+#define ASM_OUTPUT_DOUBLE(FILE,VALUE)					\
+do { long l[2];								\
+     REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);				\
+     fprintf (FILE, "%s 0x%lx,0x%lx\n", ASM_LONG, bswap_32(l[0]), bswap_32(l[1]));		\
+   } while (0)
+
+/* This is how to output a `long double' extended real constant. */
+
+#undef ASM_OUTPUT_LONG_DOUBLE
+#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE)  		\
+do { long l[3];						\
+     REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);	\
+     fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", ASM_LONG, bswap_32(l[0]), bswap_32(l[1]), bswap_32(l[2])); \
+   } while (0)
+
+/* This is how to output an assembler line defining a `float' constant.  */
+
+#undef ASM_OUTPUT_FLOAT
+#define ASM_OUTPUT_FLOAT(FILE,VALUE)			\
+do { long l;						\
+     REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);		\
+     fprintf ((FILE), "%s 0x%lx\n", ASM_LONG, bswap_32(l));	\
+   } while (0)
+
+
+#undef CPP_SPEC
+#define CPP_SPEC							\
+  "%(cpp_cpu) "								\
+  "-D__BIG_ENDIAN__ -Amachine(bigendian) "				\
+  "%{!ansi: "								\
+   "%{!noixemul:-Dixemul} "						\
+   "%{noixemul:-Dlibnix}} "						\
+  "%{!noixemul:-D__ixemul__ -D__ixemul} "				\
+  "%{noixemul:-D__libnix__ -D__libnix} "				\
+  "%{msoft-float: -D_SOFT_FLOAT}"
+
+
+/* amiga/amigaos are the new "standard" defines for the Amiga.
+ * MCH_AMIGA, AMIGA, __chip etc. are used in other compilers and are
+ * provided for compatibility reasons.
+ * We define both AmigaOS and Amithlon systems. */
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES \
+  "-D__ELF__ "								\
+  "-Damiga -Damigaos -DMCH_AMIGA -DAMIGA "				\
+  "-Damithlon "								\
+  "-Asystem(amigaos) -Asystem(amithlon) "
+
+#undef CC1_SPEC
+#define CC1_SPEC "%(cc1_cpu)"
+
+/* Choose the right startup file, depending on whether we use base relative
+   code, base relative code with automatic relocation (-resident), or plain
+   crt0.o. 
+  
+   Profiling is currently only available for plain startup.
+   mcrt0.o does not exist, but at least we get an error message when using
+   the -p flag */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC							\
+  "%{!noixemul: "							\
+   "%{pg:gcrt0.o%s} "							\
+   "%{!pg: %{p:mcrt0.o%s} "						\
+          "%{!p:crt0.o%s}}} "						\
+  "%{noixemul:"								\
+    "%{resident:libnix/nrcrt0.o%s} "					\
+    "%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}} " \
+   "libnix/crti.o%s} "                                                  \
+  "%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{noixemul:-lstubs} "                             \
+                     "%{!shared:crtend.o%s} %{shared:crtendS.o%s} "     \
+                     "%{noixemul:libnix/crtn.o%s}"
+
+/* Automatically search libamiga.a for AmigaOS specific functions.  Note
+   that we first search the standard C library to resolve as much as
+   possible from there, since it has names that are duplicated in libamiga.a
+   which we *don't* want from there.  Then search libamiga.a for any calls
+   that were not generated inline, and finally search the standard C library
+   again to resolve any references that libamiga.a might have generated.
+   This may only be a temporary solution since it might be better to simply
+   remove the things from libamiga.a that should be pulled in from libc.a
+   instead, which would eliminate the first reference to libc.a.  Note that
+   if we don't search it automatically, it is very easy for the user to try
+   to put in a -lamiga himself and get it in the wrong place, so that (for
+   example) calls like sprintf come from -lamiga rather than -lc. */
+
+#undef LIB_SPEC
+#define LIB_SPEC							\
+  "%{!noixemul: "							\
+    "%{!p:%{!pg:-lc -lamiga -lc}} "					\
+    "%{p:-lc_p}%{pg:-lc_p}} "						\
+  "%{noixemul:-lnixmain -lnix -lamiga "					\
+    "%{mstackcheck:-lstack} "						\
+    "%{mstackextend:-lstack}} -lamigastubs"
+
+/* Pass appropriate linker flavours depending on user-supplied
+   commandline options.  */
+
+#undef LINK_SPEC
+#define LINK_SPEC							\
+  "%{noixemul:-fl libnix} " 						\
+  "%{shared:-shared} "							\
+  "%{!shared: "								\
+    "%{!static: "							\
+      "%{rdynamic:-export-dynamic} "					\
+      "%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} "		\
+    "%{static:-static}} "
+
+/* Get perform_* macros to build libgcc.a.  */
+/* Do I have to? #include "i386/perform.h" */
+
+
+/* begin-GG-local: dynamic libraries */
+
+/* This macro is used to check if all collect2 facilities should be used.
+   We need a few special ones, like stripping after linking.  */
+
+#define DO_COLLECTING (do_collecting || amigaos_do_collecting())
+
+/* This macro is called in collect2 for every GCC argument name.
+   ARG is a part of commandline (without '\0' at the end).  */
+
+#define COLLECT2_GCC_OPTIONS_HOOK(ARG) amigaos_gccopts_hook(ARG)
+
+/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a"
+   argument.  ARG is a complete argument, with '\0' at the end.  */
+
+#define COLLECT2_LIBNAME_HOOK(ARG) amigaos_libname_hook(ARG)
+
+/* This macro is called at collect2 exit, to clean everything up.  */
+
+#define COLLECT2_EXTRA_CLEANUP amigaos_collect2_cleanup
+
+/* This macro is called just before the first linker invocation.
+   LD1_ARGV is "char** argv", which will be passed to "ld".  STRIP is an
+   *address* of "strip_flag" variable.  */
+
+#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \
+amigaos_prelink_hook((LD1_ARGV), (STRIP))
+
+/* This macro is called just after the first linker invocation, in place of
+   "nm" and "ldd".  OUTPUT_FILE is the executable's filename.  */
+
+#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) amigaos_postlink_hook(OUTPUT_FILE)
+/* end-GG-local */
+
--- gcc-2.95.3/gcc/config/i386/i386be.md	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/i386/i386be.md	Tue Apr  9 23:07:39 2002
@@ -0,0 +1,8714 @@
+; GCC machine description for Intel X86.
+;; Copyright (C) 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software
+;; Foundation, Inc.
+;; Mostly by William Schelter.
+
+;; This file is part of GNU CC.
+
+;; GNU CC 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.
+
+;; GNU CC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU CC; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA. */
+
+;; The original PO technology requires these to be ordered by speed,
+;; so that assigner will pick the fastest.
+
+;; See file "rtl.def" for documentation on define_insn, match_*, et. al.
+
+;; Macro #define NOTICE_UPDATE_CC in file i386.h handles condition code
+;; updates for most instructions.
+
+;; Macro REG_CLASS_FROM_LETTER in file i386.h defines the register
+;; constraint letters.
+
+;; the special asm out single letter directives following a '%' are:
+;; 'z' mov%z1 would be movl, movw, or movb depending on the mode of
+;;     operands[1].
+;; 'L' Print the opcode suffix for a 32-bit integer opcode.
+;; 'W' Print the opcode suffix for a 16-bit integer opcode.
+;; 'B' Print the opcode suffix for an 8-bit integer opcode.
+;; 'Q' Print the opcode suffix for a 64-bit float opcode.
+;; 'S' Print the opcode suffix for a 32-bit float opcode.
+;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode.
+;; 'J' Print the appropriate jump operand.
+
+;; 'b' Print the QImode name of the register for the indicated operand.
+;;     %b0 would print %al if operands[0] is reg 0.
+;; 'w' Likewise, print the HImode name of the register.
+;; 'k' Likewise, print the SImode name of the register.
+;; 'h' Print the QImode name for a "high" register, either ah, bh, ch or dh.
+;; 'y' Print "st(0)" instead of "st" as a register.
+
+;; UNSPEC usage:
+;; 0  This is a `scas' operation.  The mode of the UNSPEC is always SImode.
+;;    operand 0 is the memory address to scan.
+;;    operand 1 is a register containing the value to scan for.  The mode
+;;       of the scas opcode will be the same as the mode of this operand.
+;;    operand 2 is the known alignment of operand 0.
+;; 1  This is a `sin' operation.  The mode of the UNSPEC is MODE_FLOAT.
+;;    operand 0 is the argument for `sin'.
+;; 2  This is a `cos' operation.  The mode of the UNSPEC is MODE_FLOAT.
+;;    operand 0 is the argument for `cos'.
+;; 3  This is part of a `stack probe' operation.  The mode of the UNSPEC is 
+;;    always SImode.  operand 0 is the size of the stack allocation.
+;; 4  This is the source of a fake SET of the frame pointer which is used to
+;;    prevent insns referencing it being scheduled across the initial
+;;    decrement of the stack pointer.
+;; 5  This is a `bsf' operation.
+;; 6  This is the @GOT offset of a PIC address.
+;; 7  This is the @GOTOFF offset of a PIC address.
+;; 8  This is a reference to a symbol's @PLT address.
+
+;; This shadows the processor_type enumeration, so changes must be made
+;; to i386.h at the same time.
+
+(define_attr "type"
+  "integer,binary,memory,test,compare,fcompare,idiv,imul,lea,fld,fpop,fpdiv,fpmul"
+  (const_string "integer"))
+
+(define_attr "memory" "none,load,store"
+  (cond [(eq_attr "type" "idiv,lea")
+	 (const_string "none")
+
+	 (eq_attr "type" "fld")
+	 (const_string "load")
+
+	 (eq_attr "type" "test")
+	 (if_then_else (match_operand 0 "memory_operand" "")
+		       (const_string "load")
+		       (const_string "none"))
+
+	 (eq_attr "type" "compare,fcompare")
+	 (if_then_else (ior (match_operand 0 "memory_operand" "")
+			    (match_operand 1 "memory_operand" ""))
+		       (const_string "load")
+		       (const_string "none"))
+
+	 (and (eq_attr "type" "integer,memory,fpop")
+	      (match_operand 0 "memory_operand" ""))
+	 (const_string "store")
+
+	 (and (eq_attr "type" "integer,memory,fpop")
+	      (match_operand 1 "memory_operand" ""))
+	 (const_string "load")
+
+	 (and (eq_attr "type" "binary,imul,fpmul,fpdiv")
+	      (ior (match_operand 1 "memory_operand" "")
+		   (match_operand 2 "memory_operand" "")))
+	 (const_string "load")]
+
+	(const_string "none")))
+
+;; Functional units
+
+; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
+;                       TEST READY-DELAY ISSUE-DELAY [CONFLICT-LIST])
+
+; pentiumpro has a reservation station with 5 ports
+; port  0 has integer, float add, integer divide, float divide, float 
+;        multiply, and shifter units.
+; port  1 has integer, and jump units.
+; port  2 has the load address generation unit
+; ports 3 and 4 have the store address generation units
+
+; pentium has two integer pipelines, the main u pipe and the secondary v pipe.
+; and a float pipeline
+
+;; Floating point
+
+(define_function_unit "fp" 1 0
+ (and (eq_attr "type" "fpop,fcompare") (eq_attr "cpu" "i386,i486"))
+ 5 5)
+
+(define_function_unit "fp" 1 0
+ (and (eq_attr "type" "fpop,fcompare") (eq_attr "cpu" "pentium,pentiumpro")) 
+ 3 0)
+
+(define_function_unit "fp" 1 0
+ (and (eq_attr "type" "fpmul") (eq_attr "cpu" "pentium")) 
+ 7 0)
+
+(define_function_unit "fp" 1 0
+ (and (eq_attr "type" "fpmul") (eq_attr "cpu" "pentiumpro")) 
+ 5 0)
+
+(define_function_unit "fp" 1 0
+ (and (eq_attr "type" "idiv") (eq_attr "cpu" "pentiumpro")) 
+ 10 10)
+
+(define_function_unit "fp" 1 0
+ (and (eq_attr "type" "imul") (eq_attr "cpu" "pentiumpro")) 
+ 6 0)
+
+(define_function_unit "fp" 1 0
+ (eq_attr "type" "fpdiv") 
+ 10 10)
+
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fld") (eq_attr "cpu" "!pentiumpro,k6"))
+ 1 0)
+
+;; K6 FPU is not pipelined.
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fpop,fpmul,fcompare") (eq_attr "cpu" "k6"))
+ 2 2)
+
+;; i386 and i486 have one integer unit, which need not be modeled
+
+(define_function_unit "integer" 2 0
+  (and (eq_attr "type" "integer,binary,test,compare,lea") (eq_attr "cpu" "pentium,pentiumpro"))
+ 1 0)
+
+(define_function_unit "integer" 2 0
+  (and (eq_attr "cpu" "k6")
+       (and (eq_attr "type" "integer,binary,test,compare")
+	    (eq_attr "memory" "!load")))
+  1 0)
+
+;; Internally, K6 converts REG OP MEM instructions into a load (2 cycles)
+;; and a register operation (1 cycle).
+(define_function_unit "integer" 2 0
+  (and (eq_attr "cpu" "k6")
+       (and (eq_attr "type" "integer,binary,test,compare")
+	    (eq_attr "memory" "load")))
+  3 0)
+
+;; Multiplies use one of the integer units
+(define_function_unit "integer" 2 0
+  (and (eq_attr "cpu" "pentium") (eq_attr "type" "imul"))
+  11 11)
+
+(define_function_unit "integer" 2 0
+  (and (eq_attr "cpu" "k6") (eq_attr "type" "imul"))
+  2 2)
+
+(define_function_unit "integer" 2 0
+  (and (eq_attr "cpu" "pentium") (eq_attr "type" "idiv"))
+  25 25)
+
+(define_function_unit "integer" 2 0
+  (and (eq_attr "cpu" "k6") (eq_attr "type" "idiv"))
+  17 17)
+
+;; Pentium Pro and K6 have a separate load unit.
+(define_function_unit "load" 1 0
+  (and (eq_attr "cpu" "pentiumpro") (eq_attr "memory" "load"))
+  3 0)
+
+(define_function_unit "load" 1 0
+  (and (eq_attr "cpu" "k6") (eq_attr "memory" "load"))
+  2 0)
+
+;; Pentium Pro and K6 have a separate store unit.
+(define_function_unit "store" 1 0
+  (and (eq_attr "cpu" "pentiumpro,k6") (eq_attr "memory" "store"))
+  1 0)
+
+;; lea executes in the K6 store unit with 1 cycle latency
+(define_function_unit "store" 1 0
+  (and (eq_attr "cpu" "k6") (eq_attr "type" "lea"))
+  1 0)
+
+
+;; "movl MEM,REG / testl REG,REG" is faster on a 486 than "cmpl $0,MEM".
+;; But restricting MEM here would mean that gcc could not remove a redundant
+;; test in cases like "incl MEM / je TARGET".
+;;
+;; We don't want to allow a constant operand for test insns because
+;; (set (cc0) (const_int foo)) has no mode information.  Such insns will
+;; be folded while optimizing anyway.
+
+;; All test insns have expanders that save the operands away without
+;; actually generating RTL.  The bCOND or sCOND (emitted immediately
+;; after the tstM or cmp) will actually emit the tstM or cmpM.
+
+;; Processor type -- this attribute must exactly match the processor_type
+;; enumeration in i386.h.
+
+(define_attr "cpu" "i386,i486,pentium,pentiumpro,k6"
+  (const (symbol_ref "ix86_cpu")))
+
+(define_insn "tstsi_1"
+  [(set (cc0)
+	(match_operand:SI 0 "register_operand" "r"))]
+  ""
+  "*
+{
+  if (REG_P (operands[0]))
+    return AS2 (test%L0,%0,%0);
+
+  operands[1] = const0_rtx;
+  return AS2 (cmp%L0,%1,%0);
+}"
+  [(set_attr "type" "test")])
+
+(define_expand "tstsi"
+  [(set (cc0)
+	(match_operand:SI 0 "register_operand" ""))]
+  ""
+  "
+{
+  i386_compare_gen = gen_tstsi_1;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = const0_rtx;
+  DONE;
+}")
+
+(define_insn "tsthi_1"
+  [(set (cc0)
+	(match_operand:HI 0 "register_operand" "r"))]
+  ""
+  "*
+{
+  if (REG_P (operands[0]))
+    return AS2 (test%W0,%0,%0);
+
+  operands[1] = const0_rtx;
+  return AS2 (cmp%W0,%1,%0);
+}"
+  [(set_attr "type" "test")])
+
+(define_expand "tsthi"
+  [(set (cc0)
+	(match_operand:HI 0 "register_operand" ""))]
+  ""
+  "
+{
+  i386_compare_gen = gen_tsthi_1;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = const0_rtx;
+  DONE;
+}")
+
+(define_insn "tstqi_1"
+  [(set (cc0)
+	(match_operand:QI 0 "nonimmediate_operand" "qm"))]
+  ""
+  "*
+{
+  if (REG_P (operands[0]))
+    return AS2 (test%B0,%0,%0);
+
+  operands[1] = const0_rtx;
+  return AS2 (cmp%B0,%1,%0);
+}"
+  [(set_attr "type" "test")])
+
+(define_expand "tstqi"
+  [(set (cc0)
+	(match_operand:QI 0 "nonimmediate_operand" ""))]
+  ""
+  "
+{
+  i386_compare_gen = gen_tstqi_1;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = const0_rtx;
+  DONE;
+}")
+
+(define_insn "tstsf_cc"
+  [(set (cc0)
+	(match_operand:SF 0 "register_operand" "f"))
+   (clobber (match_scratch:HI 1 "=a"))]
+  "TARGET_80387 && ! TARGET_IEEE_FP"
+  "*
+{
+  if (! STACK_TOP_P (operands[0]))
+    abort ();
+
+  output_asm_insn (\"ftst\", operands);
+
+  if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+    output_asm_insn (AS1 (fstp,%y0), operands);
+
+  return output_fp_cc0_set (insn);
+}"
+  [(set_attr "type" "test")])
+
+;; Don't generate tstsf if generating IEEE code, since the `ftst' opcode
+;; isn't IEEE compliant.
+
+(define_expand "tstsf"
+  [(parallel [(set (cc0)
+		   (match_operand:SF 0 "register_operand" ""))
+	      (clobber (match_scratch:HI 1 ""))])]
+  "TARGET_80387 && ! TARGET_IEEE_FP"
+  "
+{
+  i386_compare_gen = gen_tstsf_cc;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = const0_rtx;
+  DONE;
+}")
+
+(define_insn "tstdf_cc"
+  [(set (cc0)
+	(match_operand:DF 0 "register_operand" "f"))
+   (clobber (match_scratch:HI 1 "=a"))]
+  "TARGET_80387 && ! TARGET_IEEE_FP"
+  "*
+{
+  if (! STACK_TOP_P (operands[0]))
+    abort ();
+
+  output_asm_insn (\"ftst\", operands);
+
+  if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+    output_asm_insn (AS1 (fstp,%y0), operands);
+
+  return output_fp_cc0_set (insn);
+}"
+  [(set_attr "type" "test")])
+
+;; Don't generate tstdf if generating IEEE code, since the `ftst' opcode
+;; isn't IEEE compliant.
+
+(define_expand "tstdf"
+  [(parallel [(set (cc0)
+		   (match_operand:DF 0 "register_operand" ""))
+	      (clobber (match_scratch:HI 1 ""))])]
+  "TARGET_80387 && ! TARGET_IEEE_FP"
+  "
+{
+  i386_compare_gen = gen_tstdf_cc;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = const0_rtx;
+  DONE;
+}")
+
+(define_insn "tstxf_cc"
+  [(set (cc0)
+	(match_operand:XF 0 "register_operand" "f"))
+   (clobber (match_scratch:HI 1 "=a"))]
+  "TARGET_80387 && ! TARGET_IEEE_FP"
+  "*
+{
+  if (! STACK_TOP_P (operands[0]))
+    abort ();
+
+  output_asm_insn (\"ftst\", operands);
+
+  if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+    output_asm_insn (AS1 (fstp,%y0), operands);
+
+  return output_fp_cc0_set (insn);
+}"
+  [(set_attr "type" "test")])
+
+;; Don't generate tstxf if generating IEEE code, since the `ftst' opcode
+;; isn't IEEE compliant.
+
+(define_expand "tstxf"
+  [(parallel [(set (cc0)
+		   (match_operand:XF 0 "register_operand" ""))
+	      (clobber (match_scratch:HI 1 ""))])]
+  "TARGET_80387 && ! TARGET_IEEE_FP"
+  "
+{
+  i386_compare_gen = gen_tstxf_cc;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = const0_rtx;
+  DONE;
+}")
+
+;;- compare instructions.  See comments above tstM patterns about
+;;  expansion of these insns.
+
+(define_insn "cmpsi_1"
+  [(set (cc0)
+	(compare (match_operand:SI 0 "nonimmediate_operand" "r")
+		 (match_operand:SI 1 "general_operand" "ri")))]
+  "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
+  "* return AS2 (cmp%L0,%1,%0);"
+  [(set_attr "type" "compare")])
+
+(define_expand "cmpsi"
+  [(set (cc0)
+	(compare (match_operand:SI 0 "nonimmediate_operand" "")
+		 (match_operand:SI 1 "general_operand" "")))]
+  ""
+  "
+{
+  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
+    operands[0] = force_reg (SImode, operands[0]);
+
+  i386_compare_gen = gen_cmpsi_1;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = operands[1];
+  DONE;
+}")
+
+(define_insn "cmphi_1"
+  [(set (cc0)
+	(compare (match_operand:HI 0 "nonimmediate_operand" "r")
+		 (match_operand:HI 1 "general_operand" "ri")))]
+  "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
+  "* return AS2 (cmp%W0,%1,%0);"
+  [(set_attr "type" "compare")])
+
+(define_expand "cmphi"
+  [(set (cc0)
+	(compare (match_operand:HI 0 "nonimmediate_operand" "")
+		 (match_operand:HI 1 "general_operand" "")))]
+  ""
+  "
+{
+  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
+    operands[0] = force_reg (HImode, operands[0]);
+
+  i386_compare_gen = gen_cmphi_1;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = operands[1];
+  DONE;
+}")
+
+(define_insn "cmpqi_1"
+  [(set (cc0)
+	(compare (match_operand:QI 0 "nonimmediate_operand" "q,mq")
+		 (match_operand:QI 1 "general_operand" "qm,nq")))]
+  "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
+  "* return AS2 (cmp%B0,%1,%0);"
+  [(set_attr "type" "compare")])
+
+(define_expand "cmpqi"
+  [(set (cc0)
+	(compare (match_operand:QI 0 "nonimmediate_operand" "")
+		 (match_operand:QI 1 "general_operand" "")))]
+  ""
+  "
+{
+  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
+    operands[0] = force_reg (QImode, operands[0]);
+
+  i386_compare_gen = gen_cmpqi_1;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = operands[1];
+  DONE;
+}")
+
+;; These implement float point compares.  For each of DFmode and
+;; SFmode, there is the normal insn, and an insn where the second operand
+;; is converted to the desired mode.
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(match_operand:XF 0 "register_operand" "f")
+			 (match_operand:XF 1 "register_operand" "f")]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(match_operand:XF 0 "register_operand" "f")
+			 (float_extend:XF
+			  (match_operand:DF 1 "nonimmediate_operand" "fm"))]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(float_extend:XF
+			  (match_operand:DF 0 "nonimmediate_operand" "fm"))
+			 (match_operand:XF 1 "register_operand" "f")]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(match_operand:XF 0 "register_operand" "f")
+			 (float_extend:XF
+			  (match_operand:SF 1 "nonimmediate_operand" "fm"))]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(float_extend:XF
+			  (match_operand:SF 0 "nonimmediate_operand" "fm"))
+			 (match_operand:XF 1 "register_operand" "f")]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(compare:CCFPEQ (match_operand:XF 0 "register_operand" "f")
+			(match_operand:XF 1 "register_operand" "f")))
+   (clobber (match_scratch:HI 2 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(match_operand:DF 0 "nonimmediate_operand" "f,fm")
+			 (match_operand:DF 1 "nonimmediate_operand" "fm,f")]))
+   (clobber (match_scratch:HI 3 "=a,a"))]
+  "TARGET_80387
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(match_operand:DF 0 "register_operand" "f")
+			 (float_extend:DF
+			  (match_operand:SF 1 "nonimmediate_operand" "fm"))]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(float_extend:DF
+			  (match_operand:SF 0 "nonimmediate_operand" "fm"))
+			 (match_operand:DF 1 "register_operand" "f")]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(float_extend:DF
+			  (match_operand:SF 0 "register_operand" "f"))
+			 (match_operand:DF 1 "nonimmediate_operand" "fm")]))
+   (clobber (match_scratch:HI 3 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(compare:CCFPEQ (match_operand:DF 0 "register_operand" "f")
+			(match_operand:DF 1 "register_operand" "f")))
+   (clobber (match_scratch:HI 2 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+;; These two insns will never be generated by combine due to the mode of
+;; the COMPARE.
+;(define_insn ""
+;  [(set (cc0)
+;	(compare:CCFPEQ (match_operand:DF 0 "register_operand" "f")
+;			(float_extend:DF
+;			 (match_operand:SF 1 "register_operand" "f"))))
+;   (clobber (match_scratch:HI 2 "=a"))]
+;  "TARGET_80387"
+;  "* return output_float_compare (insn, operands);")
+;
+;(define_insn ""
+;  [(set (cc0)
+;	(compare:CCFPEQ (float_extend:DF
+;			 (match_operand:SF 0 "register_operand" "f"))
+;			(match_operand:DF 1 "register_operand" "f")))
+;   (clobber (match_scratch:HI 2 "=a"))]
+;  "TARGET_80387"
+;  "* return output_float_compare (insn, operands);")
+
+(define_insn "*cmpsf_cc_1"
+  [(set (cc0)
+	(match_operator 2 "VOIDmode_compare_op"
+			[(match_operand:SF 0 "nonimmediate_operand" "f,fm")
+			 (match_operand:SF 1 "nonimmediate_operand" "fm,f")]))
+   (clobber (match_scratch:HI 3 "=a,a"))]
+  "TARGET_80387
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_insn ""
+  [(set (cc0)
+	(compare:CCFPEQ (match_operand:SF 0 "register_operand" "f")
+			(match_operand:SF 1 "register_operand" "f")))
+   (clobber (match_scratch:HI 2 "=a"))]
+  "TARGET_80387"
+  "* return output_float_compare (insn, operands);"
+  [(set_attr "type" "fcompare")])
+
+(define_expand "cmpxf"
+  [(set (cc0)
+	(compare (match_operand:XF 0 "register_operand" "")
+		 (match_operand:XF 1 "register_operand" "")))]
+  "TARGET_80387"
+  "
+{
+  i386_compare_gen = gen_cmpxf_cc;
+  i386_compare_gen_eq = gen_cmpxf_ccfpeq;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = operands[1];
+  DONE;
+}")
+
+(define_expand "cmpdf"
+  [(set (cc0)
+	(compare (match_operand:DF 0 "register_operand" "")
+		 (match_operand:DF 1 "general_operand" "")))]
+  "TARGET_80387"
+  "
+{
+  i386_compare_gen = gen_cmpdf_cc;
+  i386_compare_gen_eq = gen_cmpdf_ccfpeq;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = (immediate_operand (operands[1], DFmode))
+			? copy_to_mode_reg (DFmode, operands[1]) : operands[1];
+  DONE;
+}")
+
+(define_expand "cmpsf"
+  [(set (cc0)
+	(compare (match_operand:SF 0 "register_operand" "")
+		 (match_operand:SF 1 "general_operand" "")))]
+  "TARGET_80387"
+  "
+{
+  i386_compare_gen = gen_cmpsf_cc;
+  i386_compare_gen_eq = gen_cmpsf_ccfpeq;
+  i386_compare_op0 = operands[0];
+  i386_compare_op1 = (immediate_operand (operands[1], SFmode))
+			? copy_to_mode_reg (SFmode, operands[1]) : operands[1];
+  DONE;
+}")
+
+(define_expand "cmpxf_cc"
+  [(parallel [(set (cc0)
+		   (compare (match_operand:XF 0 "register_operand" "")
+			    (match_operand:XF 1 "register_operand" "")))
+	      (clobber (match_scratch:HI 2 ""))])]
+  "TARGET_80387"
+  "")
+
+(define_expand "cmpxf_ccfpeq"
+  [(parallel [(set (cc0)
+		   (compare:CCFPEQ (match_operand:XF 0 "register_operand" "")
+				   (match_operand:XF 1 "register_operand" "")))
+	      (clobber (match_scratch:HI 2 ""))])]
+  "TARGET_80387"
+  "")
+
+(define_expand "cmpdf_cc"
+  [(parallel [(set (cc0)
+		   (compare (match_operand:DF 0 "register_operand" "")
+			    (match_operand:DF 1 "register_operand" "")))
+	      (clobber (match_scratch:HI 2 ""))])]
+  "TARGET_80387"
+  "")
+
+(define_expand "cmpdf_ccfpeq"
+  [(parallel [(set (cc0)
+		   (compare:CCFPEQ (match_operand:DF 0 "register_operand" "")
+				   (match_operand:DF 1 "register_operand" "")))
+	      (clobber (match_scratch:HI 2 ""))])]
+  "TARGET_80387"
+  "
+{
+  if (! register_operand (operands[1], DFmode))
+    operands[1] = copy_to_mode_reg (DFmode, operands[1]);
+}")
+
+(define_expand "cmpsf_cc"
+  [(parallel [(set (cc0)
+		   (compare (match_operand:SF 0 "register_operand" "")
+			    (match_operand:SF 1 "register_operand" "")))
+	      (clobber (match_scratch:HI 2 ""))])]
+  "TARGET_80387"
+  "")
+
+(define_expand "cmpsf_ccfpeq"
+  [(parallel [(set (cc0)
+		   (compare:CCFPEQ (match_operand:SF 0 "register_operand" "")
+				   (match_operand:SF 1 "register_operand" "")))
+	      (clobber (match_scratch:HI 2 ""))])]
+  "TARGET_80387"
+  "
+{
+  if (! register_operand (operands[1], SFmode))
+    operands[1] = copy_to_mode_reg (SFmode, operands[1]);
+}")
+
+;; logical compare
+
+(define_insn ""
+  [(set (cc0)
+	(and:SI (match_operand:SI 0 "general_operand" "%ro")
+		(match_operand:SI 1 "nonmemory_operand" "ri")))]
+  ""
+  "*
+{
+  /* For small integers, we may actually use testb. */
+  if (GET_CODE (operands[1]) == CONST_INT
+      && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))
+      && (! REG_P (operands[0]) || QI_REG_P (operands[0]))
+      /* A Pentium test is pairable only with eax. Not with ah or al.  */
+      && (! REG_P (operands[0]) || REGNO (operands[0]) || !TARGET_PENTIUM
+          || optimize_size))
+    {
+      /* We may set the sign bit spuriously.  */
+
+      if ((INTVAL (operands[1]) & ~0xff) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  return AS2 (test%B0,%1,%b0);
+	}
+
+      if ((INTVAL (operands[1]) & ~0xff00) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  operands[1] = GEN_INT (INTVAL (operands[1]) >> 8);
+
+	  if (QI_REG_P (operands[0]))
+	    return AS2 (test%B0,%1,%h0);
+	  else
+	    {
+	      operands[0] = adj_offsettable_operand (operands[0], 1);
+	      return AS2 (test%B0,%1,%b0);
+	    }
+	}
+
+      if (GET_CODE (operands[0]) == MEM
+	  && (INTVAL (operands[1]) & ~0xff0000) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  operands[1] = GEN_INT (INTVAL (operands[1]) >> 16);
+	  operands[0] = adj_offsettable_operand (operands[0], 2);
+	  return AS2 (test%B0,%1,%b0);
+	}
+
+      if (GET_CODE (operands[0]) == MEM
+	  && (INTVAL (operands[1]) & ~0xff000000) == 0)
+        {
+	  operands[1] = GEN_INT ((INTVAL (operands[1]) >> 24) & 0xff);
+	  operands[0] = adj_offsettable_operand (operands[0], 3);
+	  return AS2 (test%B0,%1,%b0);
+	}
+    }
+
+  if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM)
+    return AS2 (test%L0,%1,%0);
+
+  return AS2 (test%L1,%0,%1);
+}"
+  [(set_attr "type" "compare")])
+
+(define_insn ""
+  [(set (cc0)
+	(and:HI (match_operand:HI 0 "general_operand" "%ro")
+		(match_operand:HI 1 "nonmemory_operand" "ri")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[1]) == CONST_INT
+      && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))
+      && (! REG_P (operands[0]) || QI_REG_P (operands[0])))
+    {
+      if ((INTVAL (operands[1]) & 0xff00) == 0)
+	{
+	  /* ??? This might not be necessary. */
+	  if (INTVAL (operands[1]) & 0xffff0000)
+	    operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff);
+
+	  /* We may set the sign bit spuriously.  */
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  return AS2 (test%B0,%1,%b0);
+	}
+
+      if ((INTVAL (operands[1]) & 0xff) == 0)
+        {
+	  operands[1] = GEN_INT ((INTVAL (operands[1]) >> 8) & 0xff);
+
+	  if (QI_REG_P (operands[0]))
+	    return AS2 (test%B0,%1,%h0);
+	  else
+	    {
+	      operands[0] = adj_offsettable_operand (operands[0], 1);
+	      return AS2 (test%B0,%1,%b0);
+	    }
+	}
+    }
+
+  /* use 32-bit test instruction if there are no sign issues */
+  if (GET_CODE (operands[1]) == CONST_INT
+      && !(INTVAL (operands[1]) & ~0x7fff)
+      && i386_aligned_p (operands[0]))
+    return AS2 (test%L0,%1,%k0);
+
+  if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM)
+    return AS2 (test%W0,%1,%0);
+
+  return AS2 (test%W1,%0,%1);
+}"
+  [(set_attr "type" "compare")])
+
+(define_insn ""
+  [(set (cc0)
+	(and:QI (match_operand:QI 0 "nonimmediate_operand" "%qm")
+		(match_operand:QI 1 "nonmemory_operand" "qi")))]
+  ""
+  "*
+{
+  if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM)
+    return AS2 (test%B0,%1,%0);
+
+  return AS2 (test%B1,%0,%1);
+}"
+  [(set_attr "type" "compare")])
+
+;; move instructions.
+;; There is one for each machine mode,
+;; and each is preceded by a corresponding push-insn pattern
+;; (since pushes are not general_operands on the 386).
+
+(define_insn ""
+  [(set (match_operand:SI 0 "push_operand" "=<")
+	(match_operand:SI 1 "reg_or_cint_operand" "rn"))]
+  "flag_pic"
+  "*
+{
+  if (GET_CODE (operands[1]) == CONST_INT )
+  {
+    operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) );
+    output_asm_insn (AS1 (push%L0,%1), operands);
+    RET;
+  }
+  else
+  {
+    //lcs: I'd like to remove the last bswap...
+    output_asm_insn (AS1 (bswap,%1), operands);
+    output_asm_insn (AS1 (push%L0,%1), operands);
+    output_asm_insn (AS1 (bswap,%1), operands);
+    RET;
+  }
+}"
+  [(set_attr "memory" "store")])
+
+(define_insn ""
+  [(set (match_operand:SI 0 "push_operand" "=<")
+	(match_operand:SI 1 "reg_or_cint_operand" "rn"))]
+  "!flag_pic"
+  "*
+{
+  if (GET_CODE (operands[1]) == CONST_INT )
+  {
+    operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) );
+    output_asm_insn (AS1 (push%L0,%1), operands);
+    RET;
+  }
+  else
+  {
+    //lcs: I'd like to remove the last bswap...
+    output_asm_insn (AS1 (bswap,%1), operands);
+    output_asm_insn (AS1 (push%L0,%1), operands);
+    output_asm_insn (AS1 (bswap,%1), operands);
+    RET;
+  }
+}"
+  [(set_attr "memory" "store")])
+
+;; On a 386, it is faster to push MEM directly.
+
+(define_insn ""
+  [(set (match_operand:SI 0 "push_operand" "=<")
+	(match_operand:SI 1 "memory_operand" "m"))]
+  "TARGET_PUSH_MEMORY"
+  "* return AS1 (push%L0,%1);"
+  [(set_attr "type" "memory")
+   (set_attr "memory" "load")])
+
+;; General case of fullword move.
+
+;; If generating PIC code and operands[1] is a symbolic CONST, emit a
+;; move to get the address of the symbolic object from the GOT.
+
+(define_expand "movsi"
+  [(set (match_operand:SI 0 "general_operand" "")
+	(match_operand:SI 1 "general_operand" ""))]
+  ""
+  "
+{
+  extern int flag_pic;
+
+  if (flag_pic && SYMBOLIC_CONST (operands[1]))
+    emit_pic_move (operands, SImode);
+
+  /* Don't generate memory->memory moves, go through a register */
+  else if (TARGET_MOVE
+	   && no_new_pseudos == 0
+	   && GET_CODE (operands[0]) == MEM
+	   && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (SImode, operands[1]);
+    }
+  else if ( GET_CODE (operands[0]) == MEM &&
+            SYMBOLIC_CONST (operands[1]) )
+    {
+      operands[1] = force_reg (SImode, operands[1]);
+    }
+}")
+
+
+;; On i486, incl reg is faster than movl $1,reg.
+
+(define_insn ""
+  [(set (match_operand:SI 0 "general_operand" "=g,r,r")
+	(match_operand:SI 1 "general_operand" "rn,i,m"))]
+  "((!TARGET_MOVE || GET_CODE (operands[0]) != MEM)
+    || (GET_CODE (operands[1]) != MEM))
+   && flag_pic"
+  "*
+{
+  rtx link;
+
+  /* K6: mov reg,0 is slightly faster than xor reg,reg but is 3 bytes
+     longer.  */
+  if ((ix86_cpu != PROCESSOR_K6 || optimize_size)
+      && operands[1] == const0_rtx && REG_P (operands[0]))
+    return AS2 (xor%L0,%0,%0);
+
+  if (operands[1] == const1_rtx
+      /* PPRO and K6 prefer mov to inc to reduce dependencies.  */
+      && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO)
+      && (link = find_reg_note (insn, REG_WAS_0, 0))
+      /* Make sure the insn that stored the 0 is still present.  */
+      && ! INSN_DELETED_P (XEXP (link, 0))
+      && GET_CODE (XEXP (link, 0)) != NOTE
+      /* Make sure cross jumping didn't happen here.  */
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
+    /* Fastest way to change a 0 to a 1.  */
+    return AS1 (inc%L0,%0);
+
+  if (SYMBOLIC_CONST (operands[1]))
+    return AS2 (lea%L0,%a1,%0);
+
+  if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM))
+    return AS2 (mov%L0,%1,%0);
+  else if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE (operands[1]) == CONST_INT )
+    {
+      operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) );
+      output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+      RET;
+    }
+    else
+    {
+      if (REGNO (operands[1]) == STACK_POINTER_REGNUM ||
+	  ( GET_CODE( operands[0] ) == MEM && REG_P( operands[1] ) &&
+	    GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	    ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+		REGNO( XEXP( XEXP( operands[0], 0), 0) ) == REGNO( operands[1] ) )
+	      ||
+	      ( REG_P( XEXP( XEXP( operands[0], 0), 1) ) &&
+		REGNO( XEXP( XEXP( operands[0], 0), 1) ) == REGNO( operands[1] ) ) ) ))
+      {
+	output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+	output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+	output_asm_insn (AS2 (rol%L0,$16,%0), operands);
+	output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+      }
+      else
+      {
+	//lcs: I'd like to remove the last bswap...
+	output_asm_insn (AS1 (bswap,%1), operands);
+	output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+	output_asm_insn (AS1 (bswap,%1), operands);
+      }
+      RET;
+    }
+  }
+  else if (GET_CODE (operands[1]) == MEM)
+  {
+    output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+    output_asm_insn (AS1 (bswap,%0), operands);
+    RET;
+  }
+}"
+  [(set_attr "type" "integer,integer,memory")
+   (set_attr "memory" "*,*,load")])
+
+(define_insn ""
+  [(set (match_operand:SI 0 "general_operand" "=g,r,r")
+	(match_operand:SI 1 "general_operand" "rn,i,m"))]
+  "((!TARGET_MOVE || GET_CODE (operands[0]) != MEM)
+    || (GET_CODE (operands[1]) != MEM))
+   && !flag_pic"
+  "*
+{
+  rtx link;
+
+  /* Use of xor was disabled for AMD K6 as recommended by the Optimization
+     Manual.  My test shows, that this generally hurts the performance, because
+     mov is longer and takes longer to decode and decoding is the main
+     bottleneck of K6 when executing GCC code.  */
+  if (operands[1] == const0_rtx && REG_P (operands[0]))
+    return AS2 (xor%L0,%0,%0);
+
+  if (operands[1] == const1_rtx
+      /* PPRO and K6 prefer mov to inc to reduce dependencies.  */
+      && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO)
+      && (link = find_reg_note (insn, REG_WAS_0, 0))
+      /* Make sure the insn that stored the 0 is still present.  */
+      && ! INSN_DELETED_P (XEXP (link, 0))
+      && GET_CODE (XEXP (link, 0)) != NOTE
+      /* Make sure cross jumping didn't happen here.  */
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
+    /* Fastest way to change a 0 to a 1.  */
+    return AS1 (inc%L0,%0);
+
+  if (SYMBOLIC_CONST (operands[1]))
+    return AS2 (lea%L0,%a1,%0);
+
+  if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM))
+    return AS2 (mov%L0,%1,%0);
+  else if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE (operands[1]) == CONST_INT )
+    {
+      operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) );
+      output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+      RET;
+    }
+    else
+    {
+      if (REGNO (operands[1]) == STACK_POINTER_REGNUM ||
+	  ( GET_CODE( operands[0] ) == MEM && REG_P( operands[1] ) &&
+	    GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	    ( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+		REGNO( XEXP( XEXP( operands[0], 0), 0) ) == REGNO( operands[1] ) )
+	      ||
+	      ( REG_P( XEXP( XEXP( operands[0], 0), 1) ) &&
+		REGNO( XEXP( XEXP( operands[0], 0), 1) ) == REGNO( operands[1] ) ) ) ))
+      {
+	output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+	output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+	output_asm_insn (AS2 (rol%L0,$16,%0), operands);
+	output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+      }
+      else
+      {
+	//lcs: I'd like to remove the last bswap...
+	output_asm_insn (AS1 (bswap,%1), operands);
+	output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+	output_asm_insn (AS1 (bswap,%1), operands);
+      }
+      RET;
+    }
+  }
+  else if (GET_CODE (operands[1]) == MEM)
+  {
+    output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+    output_asm_insn (AS1 (bswap,%0), operands);
+    RET;
+  }
+}"
+  [(set_attr "type" "integer,integer,memory")
+   (set_attr "memory" "*,*,load")])
+
+(define_insn ""
+  [(set (match_operand:HI 0 "push_operand" "=<")
+	(match_operand:HI 1 "nonmemory_operand" "ri"))]  ;; lcs -- ri -> qi
+  ""
+  "*
+{
+  if (GET_CODE (operands[1]) == CONST_INT )
+  {
+    operands[1] = GEN_INT ( bswap_16 (INTVAL (operands[1]) ) );
+    output_asm_insn (AS1 (push%W0,%1), operands);
+    RET;
+  }
+  else
+  {
+    //lcs: I'd like to remove the last xchg...    
+    output_asm_insn (AS2 (xchg,%b1,%h1), operands);
+    output_asm_insn (AS1 (push%W0,%1), operands);
+    output_asm_insn (AS2 (xchg,%b1,%h1), operands);
+    RET;
+  }
+}"
+  [(set_attr "type" "memory")
+   (set_attr "memory" "store")])
+
+(define_insn ""
+  [(set (match_operand:HI 0 "push_operand" "=<")
+	(match_operand:HI 1 "memory_operand" "m"))]
+  "TARGET_PUSH_MEMORY"
+  "* return AS1 (push%W0,%1);"
+  [(set_attr "type" "memory")
+   (set_attr "memory" "load")])
+
+;; On i486, an incl and movl are both faster than incw and movw.
+
+(define_expand "movhi"
+  [(set (match_operand:HI 0 "general_operand" "")
+	(match_operand:HI 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (HImode, operands[1]);
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "general_operand" "=g,r")
+	(match_operand:HI 1 "general_operand" "ri,m"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  rtx link;
+  if (REG_P (operands[0]) && operands[1] == const0_rtx)
+    return AS2 (xor%L0,%k0,%k0);
+
+  if (REG_P (operands[0]) && operands[1] == const1_rtx 
+      /* PPRO and K6 prefer mov to inc to reduce dependencies.  */
+      && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO)
+      && (link = find_reg_note (insn, REG_WAS_0, 0))
+      /* Make sure the insn that stored the 0 is still present.  */
+      && ! INSN_DELETED_P (XEXP (link, 0))
+      && GET_CODE (XEXP (link, 0)) != NOTE
+      /* Make sure cross jumping didn't happen here.  */
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
+    /* Fastest way to change a 0 to a 1.  */
+    return AS1 (inc%L0,%k0);
+
+  if (REG_P (operands[0]))
+    {
+      if (i386_aligned_p (operands[1]))
+	{
+	  operands[1] = i386_sext16_if_const (operands[1]);
+	  output_asm_insn (AS2 (mov%L0,%k1,%k0), operands);
+	  if (GET_CODE (operands[1]) == MEM)
+	  {
+	    if (QI_REG_P (operands[0]) )
+	    {
+	      output_asm_insn (AS2 (xchg,%b0,%h0), operands);
+	    }
+	    else
+	    {
+	      output_asm_insn (AS2 (rol%W0,$8,%w0), operands);
+	    }
+	  }
+	  RET;
+	}
+      if (! TARGET_ZERO_EXTEND_WITH_AND)
+	{
+	  /* movzwl is faster than movw on the Pentium Pro,
+	   * although not as fast as an aligned movl. */
+#ifdef INTEL_SYNTAX
+	  output_asm_insn (AS2 (movzx,%1,%k0), operands);
+#else
+	  output_asm_insn (AS2 (movz%W0%L0,%1,%k0), operands);
+#endif
+	  if (QI_REG_P (operands[0]) )
+	  {
+	    output_asm_insn (AS2 (xchg,%b0,%h0), operands);
+	  }
+	  else
+	  {
+	    output_asm_insn (AS2 (rol%W0,$8,%w0), operands);
+	  }
+	  RET;
+	}
+    }
+
+  if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM))
+    return AS2 (mov%W0,%1,%0);
+  else if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE (operands[1]) == CONST_INT )
+    {
+      operands[1] = GEN_INT ( bswap_16 (INTVAL (operands[1]) ) );
+      output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+      RET;
+    }
+    else
+    {
+      output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+      output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+      RET;
+    }
+  }
+  else if (GET_CODE (operands[1]) == MEM)
+  {
+    output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+
+    if (QI_REG_P (operands[0]) )
+    {
+      output_asm_insn (AS2 (xchg,%b0,%h0), operands);
+    }
+    else
+    {
+      output_asm_insn (AS2 (rol%W0,$8,%w0), operands);
+    }
+    RET;
+  }
+}"
+  [(set_attr "type" "integer,memory")
+   (set_attr "memory" "*,load")])
+
+(define_expand "movstricthi"
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" ""))
+	(match_operand:HI 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (HImode, operands[1]);
+    }
+}")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+g,r"))
+	(match_operand:HI 1 "general_operand" "ri,m"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  rtx link;
+
+  /* Use of xor was disabled for AMD K6 as recommended by the Optimization
+     Manual.  My test shows, that this generally hurts the performance, because
+     mov is longer and takes longer to decode and decoding is the main
+     bottleneck of K6 when executing GCC code.  */
+
+  if (operands[1] == const0_rtx && REG_P (operands[0]))
+    return AS2 (xor%W0,%0,%0);
+
+  if (operands[1] == const1_rtx
+      /* PPRO and K6 prefer mov to inc to reduce dependencies.  */
+      && (optimize_size || (int)ix86_cpu < (int)PROCESSOR_PENTIUMPRO)
+      && (link = find_reg_note (insn, REG_WAS_0, 0))
+      /* Make sure the insn that stored the 0 is still present.  */
+      && ! INSN_DELETED_P (XEXP (link, 0))
+      && GET_CODE (XEXP (link, 0)) != NOTE
+      /* Make sure cross jumping didn't happen here.  */
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
+    /* Fastest way to change a 0 to a 1.  */
+    return AS1 (inc%W0,%0);
+
+  if ((GET_CODE (operands[0]) != MEM) && (GET_CODE (operands[1]) != MEM))
+    return AS2 (mov%W0,%1,%0);
+  else if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE (operands[1]) == CONST_INT )
+    {
+      operands[1] = GEN_INT ( bswap_16 (INTVAL (operands[1]) ) );
+      output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+      RET;
+    }
+    else
+    {
+      //lcs: Can the xchg destroy the memory base register here? I doubt it, but...
+      //lcs: I'd like to remove the last xchg...
+      output_asm_insn (AS2 (xchg,%b1,%h1), operands);
+      output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+      output_asm_insn (AS2 (xchg,%b1,%h1), operands);
+
+      /* The following code will not work on write-only memory
+      output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+      output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+      */
+      RET;
+    }
+  }
+  else if (GET_CODE (operands[1]) == MEM)
+  {
+    output_asm_insn (AS2 (mov%W0,%1,%0), operands);
+    if (QI_REG_P (operands[0]) )
+    {
+      output_asm_insn (AS2 (xchg,%b0,%h0), operands);
+    }
+    else
+    {
+      output_asm_insn (AS2 (rol%W0,$8,%0), operands);
+    }
+    RET;
+  }
+}"
+  [(set_attr "type" "integer,memory")])
+
+;; emit_push_insn when it calls move_by_pieces
+;; requires an insn to "push a byte".
+;; But actually we use pushw, which has the effect of rounding
+;; the amount pushed up to a halfword.
+(define_insn ""
+  [(set (match_operand:QI 0 "push_operand" "=<")
+	(match_operand:QI 1 "const_int_operand" "n"))]
+  ""
+  "* return AS1(push%W0,%1);")
+
+(define_insn ""
+  [(set (match_operand:QI 0 "push_operand" "=<")
+	(match_operand:QI 1 "register_operand" "q"))]
+  ""
+  "*
+{
+  operands[1] = gen_rtx_REG (HImode, REGNO (operands[1]));
+  return AS1 (push%W0,%1);
+}")
+
+;; On i486, incb reg is faster than movb $1,reg.
+
+;; ??? Do a recognizer for zero_extract that looks just like this, but reads
+;; or writes %ah, %bh, %ch, %dh.
+
+(define_expand "movqi"
+  [(set (match_operand:QI 0 "general_operand" "")
+	(match_operand:QI 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (QImode, operands[1]);
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,*r,qm")
+	(match_operand:QI 1 "general_operand" "*g,*rn,qn"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  rtx link;
+
+  /* movb $0,reg8 is 2 bytes, the same as xorl reg8,reg8.
+     It is at least as fast as xor on any processor except a Pentium. */
+
+  if (operands[1] == const1_rtx
+      && TARGET_PENTIUM
+      && (link = find_reg_note (insn, REG_WAS_0, 0))
+      /* Make sure the insn that stored the 0 is still present.  */
+      && ! INSN_DELETED_P (XEXP (link, 0))
+      && GET_CODE (XEXP (link, 0)) != NOTE
+      /* Make sure cross jumping didn't happen here.  */
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
+    {
+      /* Fastest way to change a 0 to a 1.
+	 If inc%B0 isn't allowed, use inc%L0.  */
+      if (NON_QI_REG_P (operands[0]))
+	return AS1 (inc%L0,%k0);
+      else
+	return AS1 (inc%B0,%0);
+    }
+
+  /* If mov%B0 isn't allowed for one of these regs, use mov%L0.  */
+  if (NON_QI_REG_P (operands[0]) || NON_QI_REG_P (operands[1]))
+    return (AS2 (mov%L0,%k1,%k0));
+
+  return (AS2 (mov%B0,%1,%0));
+}")
+
+;; If it becomes necessary to support movstrictqi into %esi or %edi,
+;; use the insn sequence:
+;;
+;;	shrdl $8,srcreg,dstreg
+;;	rorl $24,dstreg
+;;
+;; If operands[1] is a constant, then an andl/orl sequence would be
+;; faster.
+
+(define_expand "movstrictqi"
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" ""))
+	(match_operand:QI 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (QImode, operands[1]);
+    }
+}")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "nonimmediate_operand" "+qm,q"))
+	(match_operand:QI 1 "general_operand" "*qn,m"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  rtx link;
+
+  /* movb $0,reg8 is 2 bytes, the same as xorl reg8,reg8.  */
+
+  if (operands[1] == const1_rtx
+      && TARGET_PENTIUM
+      && ! NON_QI_REG_P (operands[0])
+      && (link = find_reg_note (insn, REG_WAS_0, 0))
+      /* Make sure the insn that stored the 0 is still present.  */
+      && ! INSN_DELETED_P (XEXP (link, 0))
+      && GET_CODE (XEXP (link, 0)) != NOTE
+      /* Make sure cross jumping didn't happen here.  */
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
+    /* Fastest way to change a 0 to a 1.  */
+    return AS1 (inc%B0,%0);
+
+  /* If mov%B0 isn't allowed for one of these regs, use mov%L0.  */
+  if (NON_QI_REG_P (operands[0]) || NON_QI_REG_P (operands[1]))
+    {
+      abort ();
+      return (AS2 (mov%L0,%k1,%k0));
+    }
+
+  return AS2 (mov%B0,%1,%0);
+}")
+
+(define_insn "movsf_push"
+  [(set (match_operand:SF 0 "push_operand" "=<,<")
+	(match_operand:SF 1 "general_operand" "*rfF,m"))]
+  "TARGET_PUSH_MEMORY || GET_CODE (operands[1]) != MEM 
+   || reload_in_progress || reload_completed"
+  "*
+{
+  if (STACK_REG_P (operands[1]))
+    {
+      rtx xops[3];
+
+      if (! STACK_TOP_P (operands[1]))
+        abort ();
+
+      xops[0] = AT_SP (SFmode);
+      xops[1] = GEN_INT (4);
+      xops[2] = stack_pointer_rtx;
+
+      output_asm_insn (AS2 (sub%L2,%1,%2), xops);
+
+      if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+        output_asm_insn (AS1 (fstp%S0,%0), xops);
+      else
+        output_asm_insn (AS1 (fst%S0,%0), xops);
+
+      RET;
+    }
+
+  return AS1 (push%L0,%1);
+}")
+
+(define_split
+  [(set (match_operand:SF 0 "push_operand" "")
+        (match_operand:SF 1 "general_operand" ""))]
+  "reload_completed && STACK_REG_P (operands[1])"
+  [(set (reg:SI 7)
+        (minus:SI (reg:SI 7) (const_int 4)))
+   (set (mem:SF (reg:SI 7))
+        (match_dup 1))]
+  "")
+
+(define_expand "movsf"
+  [(set (match_operand:SF 0 "general_operand" "")
+	(match_operand:SF 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (SFmode, operands[1]);
+    }
+
+  /* If we are loading a floating point constant that isn't 0 or 1
+     into a register, force the value to memory now, since we'll 
+     get better code out the back end.  */
+  else if ((reload_in_progress | reload_completed) == 0
+	   && GET_CODE (operands[0]) != MEM
+	   && GET_CODE (operands[1]) == CONST_DOUBLE
+	   && !standard_80387_constant_p (operands[1]))
+    {
+      operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
+    }
+}")
+
+;; For the purposes of regclass, prefer FLOAT_REGS.
+(define_insn ""
+  [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m,!*r,!m")
+	(match_operand:SF 1 "general_operand" "fmG,f,*rmF,*rF"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+
+  /* First handle a `pop' insn or a `fld %st(0)' */
+
+  if (STACK_TOP_P (operands[0]) && STACK_TOP_P (operands[1]))
+    {
+      if (stack_top_dies)
+	return AS1 (fstp,%y0);
+      else
+        return AS1 (fld,%y0);
+    }
+
+  /* Handle other kinds of writes from the 387 */
+
+  if (STACK_TOP_P (operands[1]))
+    {
+      if (stack_top_dies)
+	return AS1 (fstp%z0,%y0);
+      else
+        return AS1 (fst%z0,%y0);
+    }
+
+  /* Handle other kinds of reads to the 387 */
+
+  if (STACK_TOP_P (operands[0]) && GET_CODE (operands[1]) == CONST_DOUBLE)
+    return output_move_const_single (operands);
+
+  if (STACK_TOP_P (operands[0]))
+    return AS1 (fld%z1,%y1);
+
+  /* Handle all SFmode moves not involving the 387 */
+
+  return singlemove_string (operands);
+}"
+  [(set_attr "type" "fld")])
+
+
+(define_insn "swapsf"
+  [(set (match_operand:SF 0 "register_operand" "f")
+	(match_operand:SF 1 "register_operand" "f"))
+   (set (match_dup 1)
+	(match_dup 0))]
+  ""
+  "*
+{
+  if (STACK_TOP_P (operands[0]))
+    return AS1 (fxch,%1);
+  else
+    return AS1 (fxch,%0);
+}")
+
+
+(define_insn "movdf_push"
+  [(set (match_operand:DF 0 "push_operand" "=<,<")
+	(match_operand:DF 1 "general_operand" "*rfF,o"))]
+  "TARGET_PUSH_MEMORY || GET_CODE (operands[1]) != MEM 
+   || reload_in_progress || reload_completed"
+  "*
+{
+  if (STACK_REG_P (operands[1]))
+    {
+      rtx xops[3];
+
+      xops[0] = AT_SP (DFmode);
+      xops[1] = GEN_INT (8);
+      xops[2] = stack_pointer_rtx;
+
+      output_asm_insn (AS2 (sub%L2,%1,%2), xops);
+
+      if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+        output_asm_insn (AS1 (fstp%Q0,%0), xops);
+      else
+        output_asm_insn (AS1 (fst%Q0,%0), xops);
+
+      RET;
+    }
+
+  if (which_alternative == 1)
+    return output_move_pushmem (operands, insn, GET_MODE_SIZE (DFmode), 0, 0);
+
+  return output_move_double (operands);
+}")
+
+(define_split
+  [(set (match_operand:DF 0 "push_operand" "")
+        (match_operand:DF 1 "register_operand" ""))]
+  "reload_completed && STACK_REG_P (operands[1])"
+  [(set (reg:SI 7)
+        (minus:SI (reg:SI 7) (const_int 8)))
+   (set (mem:DF (reg:SI 7))
+        (match_dup 1))]
+  "")
+
+(define_expand "movdf"
+  [(set (match_operand:DF 0 "general_operand" "")
+	(match_operand:DF 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (DFmode, operands[1]);
+    }
+
+  /* If we are loading a floating point constant that isn't 0 or 1 into a
+     register, indicate we need the pic register loaded.  This could be
+     optimized into stores of constants if the target eventually moves to
+     memory, but better safe than sorry.  */
+  else if ((reload_in_progress | reload_completed) == 0
+	   && GET_CODE (operands[0]) != MEM
+	   && GET_CODE (operands[1]) == CONST_DOUBLE
+	   && !standard_80387_constant_p (operands[1]))
+    {
+      operands[1] = validize_mem (force_const_mem (DFmode, operands[1]));
+    }
+}")
+
+;; For the purposes of regclass, prefer FLOAT_REGS.
+(define_insn ""
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,!*r,!o")
+	(match_operand:DF 1 "general_operand" "fmG,f,*roF,*rF"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM)
+   || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+
+  /* First handle a `pop' insn or a `fld %st(0)' */
+
+  if (STACK_TOP_P (operands[0]) && STACK_TOP_P (operands[1]))
+    {
+      if (stack_top_dies)
+	return AS1 (fstp,%y0);
+      else
+        return AS1 (fld,%y0);
+    }
+
+  /* Handle other kinds of writes from the 387 */
+
+  if (STACK_TOP_P (operands[1]))
+    {
+      if (stack_top_dies)
+	return AS1 (fstp%z0,%y0);
+      else
+        return AS1 (fst%z0,%y0);
+    }
+
+  /* Handle other kinds of reads to the 387 */
+
+  if (STACK_TOP_P (operands[0]) && GET_CODE (operands[1]) == CONST_DOUBLE)
+    return output_move_const_single (operands);
+
+  if (STACK_TOP_P (operands[0]))
+    return AS1 (fld%z1,%y1);
+
+  /* Handle all DFmode moves not involving the 387 */
+
+  return output_move_double (operands);
+}"
+  [(set_attr "type" "fld")])
+
+
+
+(define_insn "swapdf"
+  [(set (match_operand:DF 0 "register_operand" "f")
+	(match_operand:DF 1 "register_operand" "f"))
+   (set (match_dup 1)
+	(match_dup 0))]
+  ""
+  "*
+{
+  if (STACK_TOP_P (operands[0]))
+    return AS1 (fxch,%1);
+  else
+    return AS1 (fxch,%0);
+}")
+
+(define_insn "movxf_push"
+  [(set (match_operand:XF 0 "push_operand" "=<,<")
+ 	(match_operand:XF 1 "general_operand" "*rfF,o"))]
+  "TARGET_PUSH_MEMORY || GET_CODE (operands[1]) != MEM 
+   || reload_in_progress || reload_completed"
+  "*
+{
+  if (STACK_REG_P (operands[1]))
+    {
+      rtx xops[3];
+
+      xops[0] = AT_SP (XFmode);
+      xops[1] = GEN_INT (12);
+      xops[2] = stack_pointer_rtx;
+
+      output_asm_insn (AS2 (sub%L2,%1,%2), xops);
+
+      output_asm_insn (AS1 (fstp%T0,%0), xops);
+      if (! find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+	output_asm_insn (AS1 (fld%T0,%0), xops);
+
+      RET;
+    }
+
+  if (which_alternative == 1)
+    return output_move_pushmem (operands, insn, GET_MODE_SIZE (XFmode), 0, 0);
+
+  return output_move_double (operands);
+ }")
+
+(define_split
+  [(set (match_operand:XF 0 "push_operand" "")
+        (match_operand:XF 1 "register_operand" ""))]
+  "reload_completed && STACK_REG_P (operands[1])"
+  [(set (reg:SI 7)
+        (minus:SI (reg:SI 7) (const_int 12)))
+   (set (mem:XF (reg:SI 7))
+        (match_dup 1))]
+  "")
+
+(define_expand "movxf"
+  [(set (match_operand:XF 0 "general_operand" "")
+	(match_operand:XF 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (XFmode, operands[1]);
+    }
+
+  /* If we are loading a floating point constant that isn't 0 or 1
+     into a register, indicate we need the pic register loaded.  This could
+     be optimized into stores of constants if the target eventually moves
+     to memory, but better safe than sorry.  */
+  else if ((reload_in_progress | reload_completed) == 0
+	   && GET_CODE (operands[0]) != MEM
+	   && GET_CODE (operands[1]) == CONST_DOUBLE
+	   && !standard_80387_constant_p (operands[1]))
+    {
+      operands[1] = validize_mem (force_const_mem (XFmode, operands[1]));
+    }
+}")
+
+
+(define_insn ""
+  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,!*r,!o")
+	(match_operand:XF 1 "general_operand" "fmG,f,*roF,*rF"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM)
+   || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+
+  /* First handle a `pop' insn or a `fld %st(0)' */
+
+  if (STACK_TOP_P (operands[0]) && STACK_TOP_P (operands[1]))
+    {
+      if (stack_top_dies)
+	return AS1 (fstp,%y0);
+      else
+        return AS1 (fld,%y0);
+    }
+
+  /* Handle other kinds of writes from the 387 */
+
+  if (STACK_TOP_P (operands[1]))
+    {
+      output_asm_insn (AS1 (fstp%z0,%y0), operands);
+      if (! stack_top_dies)
+	return AS1 (fld%z0,%y0);
+
+      RET;
+    }
+
+  /* Handle other kinds of reads to the 387 */
+
+  if (STACK_TOP_P (operands[0]) && GET_CODE (operands[1]) == CONST_DOUBLE)
+    return output_move_const_single (operands);
+
+  if (STACK_TOP_P (operands[0]))
+       return AS1 (fld%z1,%y1);
+
+  /* Handle all XFmode moves not involving the 387 */
+
+  return output_move_double (operands);
+}")
+
+(define_insn "swapxf" 
+  [(set (match_operand:XF 0 "register_operand" "f")
+	(match_operand:XF 1 "register_operand" "f"))
+   (set (match_dup 1)
+	(match_dup 0))]
+  ""
+  "*
+{
+  if (STACK_TOP_P (operands[0]))
+    return AS1 (fxch,%1);
+  else
+    return AS1 (fxch,%0);
+}")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "push_operand" "=<")
+	(match_operand:DI 1 "general_operand" "riF"))]
+  ""
+  "* return output_move_double (operands);")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "push_operand" "=<")
+	(match_operand:DI 1 "memory_operand" "o"))]
+  "TARGET_PUSH_MEMORY"
+  "* return output_move_pushmem (operands, insn, GET_MODE_SIZE (DImode),0,0);")
+
+(define_expand "movdi"
+  [(set (match_operand:DI 0 "general_operand" "")
+	(match_operand:DI 1 "general_operand" ""))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && no_new_pseudos == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (DImode, operands[1]);
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "general_operand" "=g,r")
+	(match_operand:DI 1 "general_operand" "riF,m"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM)
+   || (GET_CODE (operands[1]) != MEM)"
+  "* return output_move_double (operands);"
+  [(set_attr "type" "integer,memory")
+   (set_attr "memory" "*,load")])
+
+(define_split
+  [(set (match_operand:DI 0 "nonimmediate_operand" "")
+	(match_operand:DI 1 "general_operand" ""))]
+  "reload_completed
+   && (offsettable_memref_p (operands[0])
+       || nonmemory_operand (operands[0], DImode))
+   && (offsettable_memref_p (operands[1])
+       || nonmemory_operand (operands[1], DImode))
+   && (! reg_overlap_mentioned_p (gen_lowpart (SImode, operands[0]),
+				  operands[1])
+       || ! reg_overlap_mentioned_p (gen_highpart (SImode, operands[0]),
+				     operands[1]))"
+  [(set (match_dup 2)
+	(match_dup 4))
+   (set (match_dup 3)
+	(match_dup 5))]
+  "
+{
+  split_di (&operands[0], 1, &operands[2], &operands[3]);
+  split_di (&operands[1], 1, &operands[4], &operands[5]);
+
+  if (reg_overlap_mentioned_p (operands[2], operands[1]))
+    {
+    rtx tmp;
+
+    tmp = operands[2];
+    operands[2] = operands[3];
+    operands[3] = tmp;
+
+    tmp = operands[4];
+    operands[4] = operands[5];
+    operands[5] = tmp;
+    }
+}")
+
+;;- conversion instructions
+;;- NONE
+
+;;- zero extension instructions
+;; See comments by `andsi' for when andl is faster than movzx.
+
+(define_expand "zero_extendhisi2"
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
+  ""
+  "")
+
+;; When optimizing for the PPro/PII or code size, always use movzwl.
+;; We want to use a different pattern so we can use different constraints
+;; than the generic pattern.
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))]
+  "(optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)"
+  "* return AS2 (movz%W0%L0,%1,%0);")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=r,&r,?r")
+	(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "0,r,r")))]
+  "! (optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)"
+  "*
+  {
+  rtx xops[2];
+
+  if ((TARGET_ZERO_EXTEND_WITH_AND || REGNO (operands[0]) == 0)
+      && REG_P (operands[1]) && REGNO (operands[0]) == REGNO (operands[1]))
+    {
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xffff);
+      output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+      RET;
+    }
+  if (TARGET_ZERO_EXTEND_WITH_AND && !reg_overlap_mentioned_p (operands[0], operands[1]))
+    {
+      output_asm_insn (AS2 (xor%L0,%0,%0),operands);
+      output_asm_insn (AS2 (mov%W0,%1,%w0),operands);
+      RET;
+    }
+
+  if (TARGET_ZERO_EXTEND_WITH_AND)
+    {
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xffff);
+      if (i386_aligned_p (operands[1]))
+	output_asm_insn (AS2 (mov%L0,%k1,%k0),operands);
+      else
+	output_asm_insn (AS2 (mov%W0,%1,%w0),operands);
+      output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+      RET;
+    }
+
+#ifdef INTEL_SYNTAX
+  return AS2 (movzx,%1,%0);
+#else
+  return AS2 (movz%W0%L0,%1,%0);
+#endif
+}")
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
+ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND && !reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (match_dup 0)
+       (const_int 0))
+  (set (strict_low_part (match_dup 2))
+       (match_dup 1))]
+ "operands[2] = gen_rtx_REG (HImode, true_regnum (operands[0]));")
+
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:HI 1 "memory_operand" "")))]
+ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND && reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (strict_low_part (match_dup 2))
+       (match_dup 1))
+  (set (match_dup 0)
+       (and:SI (match_dup 0)
+	       (const_int 65535)))]
+  "operands[2] = gen_rtx_REG (HImode, true_regnum (operands[0]));")
+
+(define_expand "zero_extendqihi2"
+  [(set (match_operand:HI 0 "register_operand" "")
+	(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
+  ""
+  "")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "register_operand" "=r")
+	(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "q")))]
+  "optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO"
+
+  "*  return AS2 (movz%B0%W0,%1,%0);")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "register_operand" "=q,&q,?r")
+	(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "0,q,q")))]
+  "! (optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)"
+  "*
+  {
+  rtx xops[2];
+
+  if ((TARGET_ZERO_EXTEND_WITH_AND || REGNO (operands[0]) == 0)
+      && REG_P (operands[1]) 
+      && REGNO (operands[0]) == REGNO (operands[1]))
+    {
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xff);
+      output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+      RET;
+    }
+  if (TARGET_ZERO_EXTEND_WITH_AND && QI_REG_P (operands[0]))
+    {
+      if(!reg_overlap_mentioned_p(operands[0],operands[1]))
+	{
+	  output_asm_insn (AS2 (xor%L0,%k0,%k0), operands);
+	  output_asm_insn (AS2 (mov%B0,%1,%b0), operands);
+	}
+      else
+	{
+	  xops[0] = operands[0];
+	  xops[1] = GEN_INT (0xff);
+	  output_asm_insn (AS2 (mov%B0,%1,%b0),operands);
+	  output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+	}
+      RET;
+    }
+  
+#ifdef INTEL_SYNTAX
+  return AS2 (movzx,%1,%0);
+#else
+  return AS2 (movz%B0%W0,%1,%0);
+#endif
+}")
+
+(define_split
+  [(set (match_operand:HI 0 "register_operand" "")
+	(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
+ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND
+  && !reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (match_dup 0)
+       (const_int 0))
+  (set (strict_low_part (match_dup 2))
+       (match_dup 1))]
+ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));")
+
+
+(define_split
+  [(set (match_operand:HI 0 "register_operand" "")
+	(zero_extend:HI (match_operand:QI 1 "memory_operand" "")))]
+ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND
+  && reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (strict_low_part (match_dup 2))
+       (match_dup 1))
+  (set (match_dup 0)
+       (and:HI (match_dup 0)
+	       (const_int 255)))]
+ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));")
+
+(define_split
+  [(set (match_operand:HI 0 "register_operand" "")
+	(zero_extend:HI (match_operand:QI 1 "register_operand" "")))]
+ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND"
+ [(set (match_dup 0)
+       (match_dup 2))
+  (set (match_dup 0)
+       (and:HI (match_dup 0)
+	       (const_int 255)))]
+ "if (GET_CODE (operands[1]) == SUBREG && SUBREG_WORD (operands[1]) == 0)
+    operands[1] = SUBREG_REG (operands[1]);
+  if (GET_CODE (operands[0]) != REG || GET_CODE (operands[1]) != REG
+
+      || REGNO (operands[0]) == REGNO (operands[1]))
+    FAIL;
+  operands[2] = gen_rtx_REG (HImode, REGNO (operands[1]));")
+
+(define_expand "zero_extendqisi2"
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
+  ""
+  "")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "q")))]
+  "optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO"
+  "* return AS2 (movz%B0%L0,%1,%0);")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=q,&q,?r")
+	(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "0,q,q")))]
+  "! (optimize_size || (int)ix86_cpu == (int)PROCESSOR_PENTIUMPRO)"
+  "*
+  {
+  rtx xops[2];
+
+  if ((TARGET_ZERO_EXTEND_WITH_AND || REGNO (operands[0]) == 0)
+      && REG_P (operands[1]) 
+      && REGNO (operands[0]) == REGNO (operands[1]))
+    {
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xff);
+      output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+      RET;
+    }
+  if (TARGET_ZERO_EXTEND_WITH_AND && QI_REG_P (operands[0]))
+    {
+      if(!reg_overlap_mentioned_p (operands[0], operands[1]))
+	{
+	  output_asm_insn (AS2 (xor%L0,%0,%0),operands);
+	  output_asm_insn (AS2 (mov%B0,%1,%b0),operands);
+	}
+      else
+	{
+	  xops[0] = operands[0];
+	  xops[1] = GEN_INT (0xff);
+	  output_asm_insn (AS2 (mov%B0,%1,%b0), operands);
+	  output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+	}
+      RET;
+    }
+
+  if (TARGET_ZERO_EXTEND_WITH_AND && GET_CODE (operands[1]) == REG)
+    {
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xff);
+      operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]));
+      output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+      output_asm_insn (AS2 (and%L0,%1,%k0), xops);
+      RET;
+    }
+
+#ifdef INTEL_SYNTAX
+  return AS2 (movzx,%1,%0);
+#else
+  return AS2 (movz%B0%L0,%1,%0);
+#endif
+}")
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
+ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND
+  && !reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (match_dup 0)
+       (const_int 0))
+  (set (strict_low_part (match_dup 2))
+       (match_dup 1))]
+ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));")
+
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:QI 1 "memory_operand" "")))]
+ "reload_completed && QI_REG_P (operands[0]) && TARGET_ZERO_EXTEND_WITH_AND
+  && reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (strict_low_part (match_dup 2))
+       (match_dup 1))
+  (set (match_dup 0)
+       (and:SI (match_dup 0)
+	       (const_int 255)))]
+ "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0]));")
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(zero_extend:SI (match_operand:QI 1 "register_operand" "")))]
+ "reload_completed && TARGET_ZERO_EXTEND_WITH_AND
+  && ! reg_overlap_mentioned_p (operands[0], operands[1])"
+ [(set (match_dup 0)
+       (match_dup 2))
+  (set (match_dup 0)
+       (and:SI (match_dup 0)
+	       (const_int 255)))]
+ "operands[2] = gen_rtx_REG (SImode, true_regnum (operands[1]));")
+
+(define_insn "zero_extendsidi2"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?*o")
+	(zero_extend:DI (match_operand:SI 1 "general_operand" "0,rm,r")))]
+  ""
+  "#")
+
+;; lcs: Is "true_regnum (operands[0]) + 1" right? I think so!
+(define_split 
+  [(set (match_operand:DI 0 "register_operand" "")
+	(zero_extend:DI (match_operand:SI 1 "register_operand" "")))]
+  "reload_completed && true_regnum (operands[0]) + 1 == true_regnum (operands[1])"
+  [(set (match_dup 4) (const_int 0))]
+  "split_di (&operands[0], 1, &operands[3], &operands[4]);")
+
+(define_split 
+  [(set (match_operand:DI 0 "nonimmediate_operand" "")
+	(zero_extend:DI (match_operand:SI 1 "general_operand" "")))]
+  "reload_completed"
+  [(set (match_dup 3) (match_dup 1))
+   (set (match_dup 4) (const_int 0))]
+  "split_di (&operands[0], 1, &operands[3], &operands[4]);")
+
+;;- sign extension instructions
+
+(define_insn "extendsidi2"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=A,?r,?Ar,*o")
+	(sign_extend:DI (match_operand:SI 1 "register_operand" "0,0,r,*r")))
+   (clobber (match_scratch:SI 2 "=X,X,X,&r"))]
+  ""
+  "#")
+
+;; Extend to memory case when source register does die.
+(define_split 
+  [(set (match_operand:DI 0 "memory_operand" "")
+	(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
+   (clobber (match_operand:SI 2 "register_operand" ""))]
+  "(flow2_completed
+    && dead_or_set_p (insn, operands[1])
+    && !reg_mentioned_p (operands[1], operands[0]))"
+  [(set (match_dup 3) (match_dup 1))
+   (set (match_dup 1) (ashiftrt:SI (match_dup 1) (const_int 31)))
+   (set (match_dup 4) (match_dup 1))]
+  "split_di (&operands[0], 1, &operands[3], &operands[4]);")
+
+;; Extend to memory case when source register does not die.
+(define_split 
+  [(set (match_operand:DI 0 "memory_operand" "")
+	(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
+   (clobber (match_operand:SI 2 "register_operand" ""))]
+  "flow2_completed"
+  [(const_int 0)]
+  "
+{
+  split_di (&operands[0], 1, &operands[3], &operands[4]);
+
+  emit_move_insn (operands[3], operands[1]);
+
+  /* Generate a cltd if possible and doing so it profitable.  */
+  if (true_regnum (operands[1]) == 0
+      && true_regnum (operands[2]) == 1
+      && (optimize_size || !TARGET_PENTIUM))
+    {
+      emit_insn (gen_ashrsi3_31 (operands[2], operands[1]));
+    }
+  else
+    {
+      emit_move_insn (operands[2], operands[1]);
+      emit_insn (gen_ashrsi3_31 (operands[2], operands[2]));
+    }
+  emit_move_insn (operands[4], operands[2]);
+  DONE;
+}")
+
+;; Extend to register case.  Optimize case where source and destination
+;; registers match and cases where we can use cltd.
+(define_split 
+  [(set (match_operand:DI 0 "register_operand" "")
+	(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
+   (clobber (match_scratch:SI 2 ""))]
+  "reload_completed"
+  [(const_int 0)]
+  "
+{
+  split_di (&operands[0], 1, &operands[3], &operands[4]);
+
+  if (true_regnum (operands[3]) != true_regnum (operands[1]))
+    emit_move_insn (operands[3], operands[1]);
+
+  /* Generate a cltd if possible and doing so it profitable.  */
+  if (true_regnum (operands[3]) == 0
+      && (optimize_size || !TARGET_PENTIUM))
+    {
+      emit_insn (gen_ashrsi3_31 (operands[4], operands[3]));
+      DONE;
+    }
+
+  if (true_regnum (operands[4]) != true_regnum (operands[1]))
+    emit_move_insn (operands[4], operands[1]);
+
+  emit_insn (gen_ashrsi3_31 (operands[4], operands[4]));
+  DONE;
+}")
+
+;; Note that the i386 programmers' manual says that the opcodes
+;; are named movsx..., but the assembler on Unix does not accept that.
+;; We use what the Unix assembler expects.
+
+(define_insn "extendhisi2"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r")))]
+  ""
+  "*
+{
+  if (REGNO (operands[0]) == 0
+      && REG_P (operands[1]) && REGNO (operands[1]) == 0
+      && (optimize_size || ix86_cpu != PROCESSOR_K6))
+#ifdef INTEL_SYNTAX
+    return \"cwde\";
+#else
+    return \"cwtl\";
+#endif
+
+#ifdef INTEL_SYNTAX
+  return AS2 (movsx,%1,%0);
+#else
+  return AS2 (movs%W0%L0,%1,%0);
+#endif
+}")
+
+(define_insn "extendqihi2"
+  [(set (match_operand:HI 0 "register_operand" "=r")
+	(sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "q")))]
+  ""
+  "*
+{
+  if (REGNO (operands[0]) == 0
+      && REG_P (operands[1]) && REGNO (operands[1]) == 0
+      && (optimize_size || ix86_cpu != PROCESSOR_K6))
+    return \"cbtw\";
+
+#ifdef INTEL_SYNTAX
+  return AS2 (movsx,%1,%0);
+#else
+  return AS2 (movs%B0%W0,%1,%0);
+#endif
+}")
+
+(define_insn "extendqisi2"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "q")))]
+  ""
+  "*
+{
+#ifdef INTEL_SYNTAX
+  return AS2 (movsx,%1,%0);
+#else
+  return AS2 (movs%B0%L0,%1,%0);
+#endif
+}")
+
+
+;; Truncation of long long -> 32 bit
+
+(define_expand "truncdisi2"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(truncate:SI (match_operand:DI 1 "nonimmediate_operand" "ro")))]
+  ""
+  "
+{
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && (reload_in_progress | reload_completed) == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      rtx target = gen_reg_rtx (SImode);
+      emit_insn (gen_truncdisi2 (target, operands[1]));
+      emit_move_insn (operands[0], target);
+      DONE;
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(truncate:SI (match_operand:DI 1 "nonimmediate_operand" "ro")))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  rtx low[2], high[2], xops[2];
+
+  split_di (&operands[1], 1, low, high);
+  xops[0] = operands[0];
+  xops[1] = low[0];
+  if (!rtx_equal_p (xops[0], xops[1]))
+  {
+    output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+
+    if (GET_CODE (operands[1]) == MEM)
+    {
+      output_asm_insn (AS1 (bswap,%0), xops);
+    }
+  }
+
+  RET;
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(truncate:SI (lshiftrt:DI (match_operand:DI 1 "nonimmediate_operand" "ro")
+				  (const_int 32))))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM) || (GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  rtx low[2], high[2], xops[2];
+
+  split_di (&operands[1], 1, low, high);
+  xops[0] = operands[0];
+  xops[1] = high[0];
+  if (!rtx_equal_p (xops[0], xops[1]))
+  {
+    output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+
+    if (GET_CODE (operands[1]) == MEM)
+    {
+      output_asm_insn (AS1 (bswap,%0), xops);
+    }
+  }
+
+  RET;
+}")
+
+
+
+;; Conversions between float and double.
+
+(define_expand "extendsfdf2"
+  [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
+		   (float_extend:DF
+		     (match_operand:SF 1 "nonimmediate_operand" "")))
+     (clobber (match_dup 2))
+     (clobber (match_dup 3))])]
+  "TARGET_80387"
+  "
+{
+  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
+    operands[1] = force_reg (SFmode, operands[1]);
+
+  operands[2] = assign_386_stack_local (SFmode, 0);
+  operands[3] = assign_386_stack_local (DFmode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,!f,!*r")
+	(float_extend:DF
+	  (match_operand:SF 1 "nonimmediate_operand" "fm,f,*r,f")))
+   (clobber (match_operand:SF 2 "memory_operand" "m,m,m,m"))
+   (clobber (match_operand:DF 3 "memory_operand" "m,m,m,o"))]
+  "TARGET_80387 && (GET_CODE (operands[0]) != MEM
+		    || GET_CODE (operands[1]) != MEM)"
+  "*
+{
+  output_float_extend (insn, operands);
+  return \"\";
+}"
+  [(set_attr "type" "fld,fpop,fld,fpop")])
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "")
+	(float_extend:DF (match_operand:SF 1 "register_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))
+   (clobber (match_operand:DF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[1])"
+  [(set (match_dup 2)
+	(match_dup 1))
+   (set (match_dup 0)
+	(float_extend:DF (match_dup 2)))]
+  "")
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "")
+	(float_extend:DF (match_operand:SF 1 "register_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))
+   (clobber (match_operand:DF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[0])"
+  [(set (match_dup 3)
+	(float_extend:DF (match_dup 1)))
+   (set (match_dup 0)
+	(match_dup 3))]
+  "")
+
+(define_split
+  [(set (match_operand:DF 0 "nonimmediate_operand" "")
+	(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))
+   (clobber (match_operand:DF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+	(float_extend:DF (match_dup 1)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m")
+	(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,f")))]
+  "TARGET_80387 && (GET_CODE (operands[0]) != MEM
+		    || GET_CODE (operands[1]) != MEM)"
+  "*
+{
+    output_float_extend (insn, operands);
+    return \"\";
+}"
+  [(set_attr "type" "fld,fpop")])
+
+(define_expand "extenddfxf2"
+  [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "")
+		   (float_extend:XF
+		     (match_operand:DF 1 "nonimmediate_operand" "")))
+     (clobber (match_dup 2))
+     (clobber (match_dup 3))])]
+  "TARGET_80387"
+  "
+{
+  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
+    operands[1] = force_reg (DFmode, operands[1]);
+
+  operands[2] = assign_386_stack_local (DFmode, 0);
+  operands[3] = assign_386_stack_local (XFmode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,!f,!*r")
+	(float_extend:XF
+	  (match_operand:DF 1 "nonimmediate_operand" "fm,f,*r,f")))
+   (clobber (match_operand:DF 2 "memory_operand" "m,m,o,m"))
+   (clobber (match_operand:XF 3 "memory_operand" "m,m,m,o"))]
+  "TARGET_80387 && (GET_CODE (operands[0]) != MEM
+		    || GET_CODE (operands[1]) != MEM)"
+  "*
+{
+    output_float_extend (insn, operands);
+    return \"\";
+}"
+  [(set_attr "type" "fld,fpop,fld,fpop")])
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "")
+	(float_extend:XF (match_operand:DF 1 "register_operand" "")))
+   (clobber (match_operand:DF 2 "memory_operand" ""))
+   (clobber (match_operand:XF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[1])"
+  [(set (match_dup 2)
+	(match_dup 1))
+   (set (match_dup 0)
+	(float_extend:XF (match_dup 2)))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "")
+	(float_extend:XF (match_operand:DF 1 "register_operand" "")))
+   (clobber (match_operand:DF 2 "memory_operand" ""))
+   (clobber (match_operand:XF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[0])"
+  [(set (match_dup 3)
+	(float_extend:XF (match_dup 1)))
+   (set (match_dup 0)
+	(match_dup 3))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "nonimmediate_operand" "")
+	(float_extend:XF (match_operand:DF 1 "nonimmediate_operand" "")))
+   (clobber (match_operand:DF 2 "memory_operand" ""))
+   (clobber (match_operand:XF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+	(float_extend:XF (match_dup 1)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m")
+	(float_extend:XF (match_operand:DF 1 "nonimmediate_operand" "fm,f")))]
+  "TARGET_80387 && (GET_CODE (operands[0]) != MEM
+		    || GET_CODE (operands[1]) != MEM)"
+  "*
+{
+    output_float_extend (insn, operands);
+    return \"\";
+}"
+  [(set_attr "type" "fld,fpop")])
+
+(define_expand "extendsfxf2"
+  [(parallel [(set (match_operand:XF 0 "nonimmediate_operand" "")
+		   (float_extend:XF
+		     (match_operand:SF 1 "nonimmediate_operand" "")))
+     (clobber (match_dup 2))
+     (clobber (match_dup 3))])]
+  "TARGET_80387"
+  "
+{
+  if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
+    operands[1] = force_reg (SFmode, operands[1]);
+
+  operands[2] = assign_386_stack_local (SFmode, 0);
+  operands[3] = assign_386_stack_local (XFmode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,!f,!*r")
+	(float_extend:XF
+	  (match_operand:SF 1 "nonimmediate_operand" "fm,f,*r,f")))
+   (clobber (match_operand:SF 2 "memory_operand" "m,m,m,m"))
+   (clobber (match_operand:XF 3 "memory_operand" "m,m,m,o"))]
+  "TARGET_80387 && (GET_CODE (operands[0]) != MEM
+		    || GET_CODE (operands[1]) != MEM)"
+  "*
+{
+    output_float_extend (insn, operands);
+    return \"\";
+}"
+  [(set_attr "type" "fld,fpop,fld,fpop")])
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "")
+	(float_extend:XF (match_operand:SF 1 "register_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))
+   (clobber (match_operand:XF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[1])"
+  [(set (match_dup 2)
+	(match_dup 1))
+   (set (match_dup 0)
+	(float_extend:XF (match_dup 2)))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "")
+	(float_extend:XF (match_operand:SF 1 "register_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))
+   (clobber (match_operand:XF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed && NON_STACK_REG_P (operands[0])"
+  [(set (match_dup 3)
+	(float_extend:XF (match_dup 1)))
+   (set (match_dup 0)
+	(match_dup 3))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "nonimmediate_operand" "")
+	(float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))
+   (clobber (match_operand:XF 3 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+	(float_extend:XF (match_dup 1)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m")
+	(float_extend:XF
+	 (match_operand:SF 1 "nonimmediate_operand" "fm,f")))]
+  "TARGET_80387 && (GET_CODE (operands[0]) != MEM
+		    || GET_CODE (operands[1]) != MEM)"
+  "*
+{
+    output_float_extend (insn, operands);
+    return \"\";
+}"
+  [(set_attr "type" "fld,fpop")])
+
+(define_expand "truncdfsf2"
+  [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
+		   (float_truncate:SF
+		    (match_operand:DF 1 "register_operand" "")))
+	      (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "
+{
+  operands[2] = (rtx) assign_386_stack_local (SFmode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m,!*r")
+	(float_truncate:SF
+	  (match_operand:DF 1 "register_operand" "0,f,f")))
+   (clobber (match_operand:SF 2 "memory_operand" "m,m,m"))]
+  "TARGET_80387"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+  rtx xops[1];
+
+  xops[0] = GET_CODE (operands[0]) == MEM ? operands[0] : operands[2];
+
+  if (stack_top_dies || STACK_REG_P (operands[0]))
+    output_asm_insn (AS1 (fstp%z0,%0), xops);
+  else
+    output_asm_insn (AS1 (fst%z0,%0), xops);
+
+  if (STACK_REG_P (operands[0]))
+    return AS1 (fld%z2,%2);
+  else if (NON_STACK_REG_P (operands[0]))
+    return AS2 (mov%L0,%2,%0);
+
+  return \"\";
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float_truncate:SF (match_operand:DF 1 "register_operand" "")))
+;;   (clobber (match_operand:SF 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(float_truncate:SF (match_dup 1)))
+;;   (set (match_dup 0)
+;;	(match_dup 2))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "memory_operand" "")
+;;	(float_truncate:SF (match_operand:DF 1 "register_operand" "")))
+;;   (clobber (match_operand:SF 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float_truncate:SF (match_dup 1)))]
+;;  "")
+
+;; This cannot output into an f-reg because there is no way to be sure
+;; of truncating in that case.
+
+(define_insn ""
+  [(set (match_operand:SF 0 "memory_operand" "=m")
+	(float_truncate:SF (match_operand:DF 1 "register_operand" "f")))]
+  "TARGET_80387"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+
+  if (stack_top_dies)
+    return AS1 (fstp%z0,%0);
+  else
+    return AS1 (fst%z0,%0);
+}"
+  [(set_attr "type" "fpop")])
+
+(define_expand "truncxfsf2"
+  [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
+		   (float_truncate:SF
+		    (match_operand:XF 1 "register_operand" "")))
+	      (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "
+{
+  operands[2] = (rtx) assign_386_stack_local (SFmode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "nonimmediate_operand" "=f,m,!*r")
+	(float_truncate:SF
+	  (match_operand:XF 1 "register_operand" "0,f,f")))
+   (clobber (match_operand:SF 2 "memory_operand" "m,m,m"))]
+  "TARGET_80387"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+  rtx xops[1];
+
+  xops[0] = GET_CODE (operands[0]) == MEM ? operands[0] : operands[2];
+
+  if (stack_top_dies || STACK_REG_P (operands[0]))
+    output_asm_insn (AS1 (fstp%z0,%0), xops);
+  else
+    output_asm_insn (AS1 (fst%z0,%0), xops);
+
+  if (STACK_REG_P (operands[0]))
+    return AS1 (fld%z2,%2);
+  else if (NON_STACK_REG_P (operands[0]))
+    return AS2 (mov%L0,%2,%0);
+
+  return \"\";
+}"
+  [(set_attr "type" "fpop")])
+
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "")
+	(float_truncate:SF (match_operand:XF 1 "register_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+	(float_truncate:SF (match_dup 1)))
+   (set (match_dup 0)
+	(match_dup 2))]
+  "")
+
+(define_split
+  [(set (match_operand:SF 0 "memory_operand" "")
+	(float_truncate:SF (match_operand:XF 1 "register_operand" "")))
+   (clobber (match_operand:SF 2 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+	(float_truncate:SF (match_dup 1)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "memory_operand" "=m")
+	(float_truncate:SF (match_operand:XF 1 "register_operand" "f")))]
+  "TARGET_80387"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+
+  if (stack_top_dies)
+    return AS1 (fstp%z0,%0);
+  else
+    return AS1 (fst%z0,%0);
+}"
+  [(set_attr "type" "fpop")])
+
+(define_expand "truncxfdf2"
+  [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
+		   (float_truncate:DF
+		    (match_operand:XF 1 "register_operand" "")))
+	      (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "
+{
+  operands[2] = (rtx) assign_386_stack_local (DFmode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,!*r")
+	(float_truncate:DF
+	  (match_operand:XF 1 "register_operand" "0,f,f")))
+   (clobber (match_operand:DF 2 "memory_operand" "m,m,o"))]
+  "TARGET_80387"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+  rtx xops[2];
+
+  xops[0] = GET_CODE (operands[0]) == MEM ? operands[0] : operands[2];
+
+  if (stack_top_dies || STACK_REG_P (operands[0]))
+    output_asm_insn (AS1 (fstp%z0,%0), xops);
+  else
+    output_asm_insn (AS1 (fst%z0,%0), xops);
+
+  if (STACK_REG_P (operands[0]))
+    return AS1 (fld%z2,%2);
+  else if (NON_STACK_REG_P (operands[0]))
+    {
+    xops[0] = operands[0];
+    xops[1] = operands[2];
+    output_asm_insn (output_move_double (xops), xops);
+    }
+
+  return \"\";
+}"
+  [(set_attr "type" "fpop")])
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "")
+	(float_truncate:DF (match_operand:XF 1 "register_operand" "")))
+   (clobber (match_operand:DF 2 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+	(float_truncate:DF (match_dup 1)))
+   (set (match_dup 0)
+	(match_dup 2))]
+  "")
+
+(define_split
+  [(set (match_operand:DF 0 "memory_operand" "")
+	(float_truncate:DF (match_operand:XF 1 "register_operand" "")))
+   (clobber (match_operand:DF 2 "memory_operand" ""))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+	(float_truncate:DF (match_dup 1)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "memory_operand" "=m")
+	(float_truncate:DF (match_operand:XF 1 "register_operand" "f")))]
+  "TARGET_80387"
+  "*
+{
+  int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
+
+  if (stack_top_dies)
+    return AS1 (fstp%z0,%0);
+  else
+    return AS1 (fst%z0,%0);
+}"
+  [(set_attr "type" "fpop")])
+
+;; Conversions between floating point and fix point.
+
+(define_expand "fix_truncsfsi2"
+  [(parallel [(set (match_operand:SI 0 "register_operand" "")
+		   (fix:SI (fix:SF (match_operand:SF 1 "register_operand" ""))))
+	      (clobber (match_dup 2))
+	      (clobber (match_dup 3))
+	      (clobber (match_dup 4))
+	      (clobber (match_scratch:HI 5 ""))])]
+  "TARGET_80387"
+  "
+{
+  operands[2] = (rtx) assign_386_stack_local (HImode, 0);
+  operands[3] = (rtx) assign_386_stack_local (HImode, 1);
+  operands[4] = (rtx) assign_386_stack_local (SImode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=&r")
+	(fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f"))))
+   (clobber (match_operand:HI 2 "memory_operand" "m"))
+   (clobber (match_operand:HI 3 "memory_operand" "m"))
+   (clobber (match_operand:SI 4 "memory_operand" "m"))
+   (clobber (match_scratch:HI 5 "=&r"))]
+  "TARGET_80387"
+  "* return output_fix_trunc (insn, operands);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "fix_truncsfdi2"
+  [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "")
+		   (fix:DI (fix:SF (match_operand:SF 1 "register_operand" ""))))
+	      (clobber (match_dup 1))
+	      (clobber (match_dup 2))
+	      (clobber (match_dup 3))
+	      (clobber (match_dup 4))
+	      (clobber (match_scratch:HI 5 ""))])]
+  "TARGET_80387"
+  "
+{
+  operands[1] = copy_to_mode_reg (SFmode, operands[1]);
+  operands[2] = (rtx) assign_386_stack_local (HImode, 0);
+  operands[3] = (rtx) assign_386_stack_local (HImode, 1);
+  operands[4] = (rtx) assign_386_stack_local (DImode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r")
+	(fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f,f"))))
+   (clobber (match_dup 1))
+   (clobber (match_operand:HI 2 "memory_operand" "m,m"))
+   (clobber (match_operand:HI 3 "memory_operand" "m,m"))
+   (clobber (match_operand:DI 4 "memory_operand" "m,o"))
+   (clobber (match_scratch:HI 5 "=&r,&r"))]
+  "TARGET_80387"
+  "* return output_fix_trunc (insn, operands);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "fix_truncdfsi2"
+  [(parallel [(set (match_operand:SI 0 "register_operand" "")
+		   (fix:SI (fix:DF (match_operand:DF 1 "register_operand" ""))))
+	      (clobber (match_dup 2))
+	      (clobber (match_dup 3))
+	      (clobber (match_dup 4))
+	      (clobber (match_scratch:HI 5 ""))])]
+  "TARGET_80387"
+  "
+{
+  operands[2] = (rtx) assign_386_stack_local (HImode, 0);
+  operands[3] = (rtx) assign_386_stack_local (HImode, 1);
+  operands[4] = (rtx) assign_386_stack_local (SImode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=&r")
+	(fix:SI (fix:DF (match_operand:DF 1 "register_operand" "f"))))
+   (clobber (match_operand:HI 2 "memory_operand" "m"))
+   (clobber (match_operand:HI 3 "memory_operand" "m"))
+   (clobber (match_operand:SI 4 "memory_operand" "m"))
+   (clobber (match_scratch:HI 5 "=&r"))]
+  "TARGET_80387"
+  "* return output_fix_trunc (insn, operands);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "fix_truncdfdi2"
+  [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "")
+		   (fix:DI (fix:DF (match_operand:DF 1 "register_operand" ""))))
+	      (clobber (match_dup 1))
+	      (clobber (match_dup 2))
+	      (clobber (match_dup 3))
+	      (clobber (match_dup 4))
+	      (clobber (match_scratch:HI 5 ""))])]
+  "TARGET_80387"
+  "
+{
+  operands[1] = copy_to_mode_reg (DFmode, operands[1]);
+  operands[2] = (rtx) assign_386_stack_local (HImode, 0);
+  operands[3] = (rtx) assign_386_stack_local (HImode, 1);
+  operands[4] = (rtx) assign_386_stack_local (DImode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r")
+	(fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f,f"))))
+   (clobber (match_dup 1))
+   (clobber (match_operand:HI 2 "memory_operand" "m,m"))
+   (clobber (match_operand:HI 3 "memory_operand" "m,m"))
+   (clobber (match_operand:DI 4 "memory_operand" "m,o"))
+   (clobber (match_scratch:HI 5 "=&r,&r"))]
+  "TARGET_80387"
+  "* return output_fix_trunc (insn, operands);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "fix_truncxfsi2"
+  [(parallel [(set (match_operand:SI 0 "register_operand" "")
+		   (fix:SI (fix:XF (match_operand:XF 1 "register_operand" ""))))
+	      (clobber (match_dup 2))
+	      (clobber (match_dup 3))
+	      (clobber (match_dup 4))
+	      (clobber (match_scratch:HI 5 ""))])]
+  "TARGET_80387"
+  "
+{
+  operands[2] = (rtx) assign_386_stack_local (HImode, 0);
+  operands[3] = (rtx) assign_386_stack_local (HImode, 1);
+  operands[4] = (rtx) assign_386_stack_local (SImode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=&r")
+	(fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f"))))
+   (clobber (match_operand:HI 2 "memory_operand" "m"))
+   (clobber (match_operand:HI 3 "memory_operand" "m"))
+   (clobber (match_operand:SI 4 "memory_operand" "m"))
+   (clobber (match_scratch:HI 5 "=&r"))]
+  "TARGET_80387"
+  "* return output_fix_trunc (insn, operands);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "fix_truncxfdi2"
+  [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "")
+		   (fix:DI (fix:XF (match_operand:XF 1 "register_operand" ""))))
+	      (clobber (match_dup 1))
+	      (clobber (match_dup 2))
+	      (clobber (match_dup 3))
+	      (clobber (match_dup 4))
+	      (clobber (match_scratch:HI 5 ""))])]
+  "TARGET_80387"
+  "
+{
+  operands[1] = copy_to_mode_reg (XFmode, operands[1]);
+  operands[2] = (rtx) assign_386_stack_local (HImode, 0);
+  operands[3] = (rtx) assign_386_stack_local (HImode, 1);
+  operands[4] = (rtx) assign_386_stack_local (DImode, 0);
+}")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r")
+	(fix:DI (fix:XF (match_operand:XF 1 "register_operand" "f,f"))))
+   (clobber (match_dup 1))
+   (clobber (match_operand:HI 2 "memory_operand" "m,m"))
+   (clobber (match_operand:HI 3 "memory_operand" "m,m"))
+   (clobber (match_operand:DI 4 "memory_operand" "m,o"))
+   (clobber (match_scratch:HI 5 "=&r,&r"))]
+  "TARGET_80387"
+  "* return output_fix_trunc (insn, operands);"
+  [(set_attr "type" "fpop")])
+
+;; Conversion between fixed point and floating point.
+
+;; ??? Possibly represent floatunssidf2 here in gcc2.
+
+;;(define_expand "floatsisf2"
+;;  [(parallel [(set (match_operand:SF 0 "register_operand" "")
+;;		   (float:SF (match_operand:SI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (SImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:SF 0 "register_operand" "=f,f")
+;;	(float:SF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:SI 2 "memory_operand" "m,m"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float:SF (match_operand:SI 1 "memory_operand" "")))
+;;   (clobber (match_operand:SI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:SF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float:SF (match_operand:SI 1 "register_operand" "")))
+;;   (clobber (match_operand:SI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:SF (match_dup 2)))]
+;;  "")
+
+(define_insn "floatsisf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(float:SF (match_operand:SI 1 "register_operand" "r")))]
+  "TARGET_80387"
+  "*
+{
+  output_asm_insn (AS1 (push%z1,%1), operands);
+  output_asm_insn (AS1 (fild%z1,(%%esp)), operands);
+  output_asm_insn (AS2 (add%L0,$4,%%esp), operands);
+  RET;
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_expand "floathisf2"
+;;  [(parallel [(set (match_operand:SF 0 "register_operand" "")
+;;		   (float:SF (match_operand:HI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (HImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:SF 0 "register_operand" "=f,f")
+;;	(float:SF (match_operand:HI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:HI 2 "memory_operand" "m,m"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float:SF (match_operand:HI 1 "memory_operand" "")))
+;;   (clobber (match_operand:HI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:SF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float:SF (match_operand:HI 1 "register_operand" "")))
+;;   (clobber (match_operand:HI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:SF (match_dup 2)))]
+;;  "")
+
+(define_insn "floathisf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(float:SF (match_operand:HI 1 "register_operand" "r")))]
+  "TARGET_80387"
+  "*
+{
+  output_asm_insn (AS1 (push%z1,%1), operands);
+  output_asm_insn (AS1 (fild%z1,(%%esp)), operands);
+  output_asm_insn (AS2 (add%L0,$2,%%esp), operands);
+  RET;
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_expand "floatdisf2"
+;;  [(parallel [(set (match_operand:SF 0 "register_operand" "")
+;;		   (float:SF (match_operand:DI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (DImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:SF 0 "register_operand" "=f,f")
+;;	(float:SF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
+;;      (clobber (match_operand:DI 2 "memory_operand" "m,o"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float:SF (match_operand:DI 1 "memory_operand" "")))
+;;   (clobber (match_operand:DI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:SF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:SF 0 "register_operand" "")
+;;	(float:SF (match_operand:DI 1 "register_operand" "")))
+;;   (clobber (match_operand:DI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:SF (match_dup 2)))]
+;;  "")
+
+;;(define_insn ""
+;;  [(set (match_operand:SF 0 "register_operand" "=f")
+;;	(float:SF (match_operand:DI 1 "register_operand" "")))]
+;;  "TARGET_80387"
+;;  "* return AS1 (fild%z1,%1);"
+;;  [(set_attr "type" "fpop")])
+
+;;(define_expand "floatsidf2"
+;;  [(parallel [(set (match_operand:DF 0 "register_operand" "")
+;;		   (float:DF (match_operand:SI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (SImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:DF 0 "register_operand" "=f,f")
+;;	(float:DF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:SI 2 "memory_operand" "m,m"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:DF 0 "register_operand" "")
+;;	(float:DF (match_operand:SI 1 "memory_operand" "")))
+;;   (clobber (match_operand:SI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:DF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:DF 0 "register_operand" "")
+;;	(float:DF (match_operand:SI 1 "register_operand" "")))
+;;   (clobber (match_operand:SI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:DF (match_dup 2)))]
+;;  "")
+
+(define_insn "floatsidf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(float:DF (match_operand:SI 1 "register_operand" "r")))]
+  "TARGET_80387"
+  "*
+{
+  output_asm_insn (AS1 (push%z1,%1), operands);
+  output_asm_insn (AS1 (fild%z1,(%%esp)), operands);
+  output_asm_insn (AS2 (add%L0,$4,%%esp), operands);
+  RET;
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_expand "floathidf2"
+;;  [(parallel [(set (match_operand:DF 0 "register_operand" "")
+;;		   (float:DF (match_operand:HI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (HImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:DF 0 "register_operand" "=f,f")
+;;	(float:DF (match_operand:HI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:HI 2 "memory_operand" "m,m"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:DF 0 "register_operand" "")
+;;	(float:DF (match_operand:HI 1 "memory_operand" "")))
+;;   (clobber (match_operand:HI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:DF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:DF 0 "register_operand" "")
+;;	(float:DF (match_operand:HI 1 "register_operand" "")))
+;;   (clobber (match_operand:HI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:DF (match_dup 2)))]
+;;  "")
+
+(define_insn "floathidf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(float:DF (match_operand:HI 1 "register_operand" "r")))]
+  "TARGET_80387"
+  "*
+{
+  output_asm_insn (AS1 (push%z1,%1), operands);
+  output_asm_insn (AS1 (fild%z1,(%%esp)), operands);
+  output_asm_insn (AS2 (add%L0,$2,%%esp), operands);
+  RET;
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_expand "floatdidf2"
+;;  [(parallel [(set (match_operand:DF 0 "register_operand" "")
+;;		   (float:DF (match_operand:DI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (DImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:DF 0 "register_operand" "=f,f")
+;;	(float:DF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:DI 2 "memory_operand" "m,o"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:DF 0 "register_operand" "")
+;;	(float:DF (match_operand:DI 1 "memory_operand" "")))
+;;   (clobber (match_operand:DI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:DF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:DF 0 "register_operand" "")
+;;	(float:DF (match_operand:DI 1 "register_operand" "")))
+;;   (clobber (match_operand:DI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:DF (match_dup 2)))]
+;;  "")
+
+;;(define_insn ""
+;;  [(set (match_operand:DF 0 "register_operand" "=f")
+;;	(float:DF (match_operand:DI 1 "memory_operand" "m")))]
+;;  "TARGET_80387"
+;;  "* return AS1 (fild%z1,%1);"
+;;  [(set_attr "type" "fpop")])
+
+;;(define_expand "floatsixf2"
+;;  [(parallel [(set (match_operand:XF 0 "register_operand" "")
+;;		   (float:XF (match_operand:SI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (SImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:XF 0 "register_operand" "=f,f")
+;;	(float:XF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:SI 2 "memory_operand" "m,m"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:XF 0 "register_operand" "")
+;;	(float:XF (match_operand:SI 1 "memory_operand" "")))
+;;   (clobber (match_operand:SI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:XF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:XF 0 "register_operand" "")
+;;	(float:XF (match_operand:SI 1 "register_operand" "")))
+;;   (clobber (match_operand:SI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:XF (match_dup 2)))]
+;;  "")
+
+(define_insn "floatsixf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(float:XF (match_operand:SI 1 "register_operand" "r")))]
+  "TARGET_80387"
+  "*
+{
+  output_asm_insn (AS1 (push%z1,%1), operands);
+  output_asm_insn (AS1 (fild%z1,(%%esp)), operands);
+  output_asm_insn (AS2 (add%L0,$4,%%esp), operands);
+  RET;
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_expand "floathixf2"
+;;  [(parallel [(set (match_operand:XF 0 "register_operand" "")
+;;		   (float:XF (match_operand:HI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (HImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:XF 0 "register_operand" "=f,f")
+;;	(float:XF (match_operand:HI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:HI 2 "memory_operand" "m,m"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:XF 0 "register_operand" "")
+;;	(float:XF (match_operand:HI 1 "memory_operand" "")))
+;;   (clobber (match_operand:HI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:XF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:XF 0 "register_operand" "")
+;;	(float:XF (match_operand:HI 1 "register_operand" "")))
+;;   (clobber (match_operand:HI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:XF (match_dup 2)))]
+;;  "")
+
+(define_insn "floathixf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(float:XF (match_operand:HI 1 "register_operand" "r")))]
+  "TARGET_80387"
+  "*
+{
+  output_asm_insn (AS1 (push%z1,%1), operands);
+  output_asm_insn (AS1 (fild%z1,(%%esp)), operands);
+  output_asm_insn (AS2 (add%L0,$2,%%esp), operands);
+  RET;
+}"
+  [(set_attr "type" "fpop")])
+
+;;(define_expand "floatdixf2"
+;;  [(parallel [(set (match_operand:XF 0 "register_operand" "")
+;;		   (float:XF (match_operand:DI 1 "nonimmediate_operand" "")))
+;;	      (clobber (match_dup 2))])]
+;;  "TARGET_80387"
+;;  "operands[2] = assign_386_stack_local (DImode, 0);")
+
+;;(define_insn ""
+;;  [(set (match_operand:XF 0 "register_operand" "=f,f")
+;;	(float:XF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
+;;   (clobber (match_operand:DI 2 "memory_operand" "m,o"))]
+;;  "TARGET_80387"
+;;  "#")
+
+;;(define_split
+;;  [(set (match_operand:XF 0 "register_operand" "")
+;;	(float:XF (match_operand:DI 1 "memory_operand" "")))
+;;   (clobber (match_operand:DI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 0)
+;;	(float:XF (match_dup 1)))]
+;;  "")
+
+;;(define_split
+;;  [(set (match_operand:XF 0 "register_operand" "")
+;;	(float:XF (match_operand:DI 1 "register_operand" "")))
+;;   (clobber (match_operand:DI 2 "memory_operand" ""))]
+;;  "TARGET_80387 && reload_completed"
+;;  [(set (match_dup 2)
+;;	(match_dup 1))
+;;   (set (match_dup 0)
+;;	(float:XF (match_dup 2)))]
+;;  "")
+
+;;(define_insn ""
+;;  [(set (match_operand:XF 0 "register_operand" "=f")
+;;	(float:XF (match_operand:DI 1 "register_operand" "")))]
+;;  "TARGET_80387"
+;;  "* return AS1 (fild%z1,%1);"
+;;  [(set_attr "type" "fpop")])
+
+;;- add instructions
+
+;;(define_insn "*addsidi3_1"
+;;  [(set (match_operand:DI 0 "nonimmediate_operand" "=&r,r,o,!&r,!r,o,!o")
+;;	(plus:DI (match_operand:DI 1 "general_operand" "0,0,0,o,riF,riF,o")
+;;		 (zero_extend:DI (match_operand:SI 2 "general_operand" "o,ri,ri,roi,roi,ri,ri"))))
+;;   (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,&r"))]
+(define_insn "*addsidi3_1"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,!r")
+	(plus:DI (match_operand:DI 1 "general_operand" "0,riF")
+		 (zero_extend:DI (match_operand:SI 2 "general_operand" "ri,ri"))))
+   (clobber (match_scratch:SI 3 "=X,X"))]
+  ""
+  "*
+{
+  rtx low[3], high[3], xops[7];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 2, low, high);
+  high[2] = const0_rtx;
+  low[2]  = operands[2];
+
+  if (!rtx_equal_p (operands[0], operands[1]))
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[1];
+      xops[3] = low[1];
+
+      if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
+	{
+	  output_asm_insn (AS2 (mov%L1,%3,%1), xops);
+	  output_asm_insn (AS2 (mov%L0,%2,%0), xops);
+	}
+      else
+	{
+	  xops[4] = high[2];
+	  xops[5] = low[2];
+	  xops[6] = operands[3];
+	  output_asm_insn (AS2 (mov%L6,%3,%6), xops);
+	  output_asm_insn (AS2 (add%L6,%5,%6), xops);
+	  output_asm_insn (AS2 (mov%L1,%6,%1), xops);
+	  output_asm_insn (AS2 (mov%L6,%2,%6), xops);
+	  output_asm_insn (AS2 (adc%L6,%4,%6), xops);
+	  output_asm_insn (AS2 (mov%L0,%6,%0), xops);
+	  RET;
+	}
+    }
+
+  output_asm_insn (AS2 (add%L0,%2,%0), low);
+  output_asm_insn (AS2 (adc%L0,%2,%0), high);
+  cc_status.value1 = high[0];
+  cc_status.flags = CC_NO_OVERFLOW;
+  RET;
+}"
+  [(set_attr "type" "binary")])
+
+;;(define_insn "addsidi3_2"
+;;  [(set (match_operand:DI 0 "nonimmediate_operand" "=&r,r,o,&r,!&r,&r,o,o,!o")
+;;	(plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "o,ri,ri,o,o,ri,ri,i,r"))
+;;		 (match_operand:DI 1 "general_operand" "0,0,0,iF,ro,roiF,riF,o,o")))
+;;   (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,X,&r,&r"))]
+(define_insn "addsidi3_2"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r")
+	(plus:DI (zero_extend:DI (match_operand:SI 2 "general_operand" "ri"))
+		 (match_operand:DI 1 "general_operand" "0")))
+   (clobber (match_scratch:SI 3 "=X"))]
+  ""
+  "*
+{
+  rtx low[3], high[3], xops[7];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 2, low, high);
+  high[2] = const0_rtx;
+  low[2]  = operands[2];
+
+  if (!rtx_equal_p (operands[0], operands[1]))
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[1];
+      xops[3] = low[1];
+
+      if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
+	{
+	  if (rtx_equal_p (low[0], operands[2]))
+	    {
+	      output_asm_insn (AS2 (mov%L0,%2,%0), high);
+	      output_asm_insn (AS2 (add%L0,%1,%0), low);
+	      output_asm_insn (AS2 (adc%L0,%1,%0), high);
+	      RET;
+	    }
+	  if (rtx_equal_p (high[0], operands[2]))
+	    {
+	      if (GET_CODE (operands[0]) != MEM)
+		{
+		  output_asm_insn (AS2 (mov%L0,%2,%0), low);
+		  output_asm_insn (AS2 (mov%L0,%2,%0), high);
+		  output_asm_insn (AS2 (add%L0,%1,%0), low);
+		  output_asm_insn (AS2 (adc%L0,%1,%0), high);
+		}
+	      else
+		{
+		  /* It's too late to ask for a scratch now - but this
+		     will probably not happen too often.  */
+		  output_asm_insn (AS2 (add%L1,%2,%1), low);
+		  output_asm_insn (AS2 (mov%L0,%1,%0), low);
+		  output_asm_insn (AS2 (mov%L1,%2,%1), low);
+		  output_asm_insn (AS2 (mov%L0,%2,%0), high);
+		  output_asm_insn (AS2 (adc%L0,%1,%0), high);
+		  output_asm_insn (AS2 (sub%L1,%0,%1), low);
+		  output_asm_insn (AS1 (neg%L1,%1), low);
+		}
+	      RET;
+	    }
+	  output_asm_insn (AS2 (mov%L1,%3,%1), xops);
+	  output_asm_insn (AS2 (mov%L0,%2,%0), xops);
+	}
+      else
+	{
+	  xops[4] = high[2];
+	  xops[5] = low[2];
+	  xops[6] = operands[3];
+	  output_asm_insn (AS2 (mov%L6,%3,%6), xops);
+	  output_asm_insn (AS2 (add%L6,%5,%6), xops);
+	  output_asm_insn (AS2 (mov%L1,%6,%1), xops);
+	  output_asm_insn (AS2 (mov%L6,%2,%6), xops);
+	  output_asm_insn (AS2 (adc%L6,%4,%6), xops);
+	  output_asm_insn (AS2 (mov%L0,%6,%0), xops);
+	  RET;
+	}
+    }
+
+  output_asm_insn (AS2 (add%L0,%2,%0), low);
+  output_asm_insn (AS2 (adc%L0,%2,%0), high);
+  cc_status.value1 = high[0];
+  cc_status.flags = CC_NO_OVERFLOW;
+  RET;
+}"
+  [(set_attr "type" "binary")])
+
+;;(define_insn "adddi3"
+;;  [(set (match_operand:DI 0 "general_operand" "=&r,&ro,!r,o,!&r,!o,!o")
+;;	(plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,0iF,or,riF,o")
+;;		 (match_operand:DI 2 "general_operand" "o,riF,0,or,or,oriF,o")))
+;;   (clobber (match_scratch:SI 3 "=X,X,X,&r,X,&r,&r"))]
+(define_insn "adddi3"
+  [(set (match_operand:DI 0 "general_operand" "=&r,!r,!&r")
+	(plus:DI (match_operand:DI 1 "general_operand" "%0,0,r")
+		 (match_operand:DI 2 "general_operand" "riF,0,r")))
+   (clobber (match_scratch:SI 3 "=X,X,X"))]
+  ""
+  "*
+{
+  rtx low[3], high[3], xops[7], temp;
+
+  CC_STATUS_INIT;
+
+  if (rtx_equal_p (operands[0], operands[2]))
+    {
+      temp = operands[1];
+      operands[1] = operands[2];
+      operands[2] = temp;
+    }
+
+  split_di (operands, 3, low, high);
+  if (!rtx_equal_p (operands[0], operands[1]))
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[1];
+      xops[3] = low[1];
+
+      if (GET_CODE (operands[0]) != MEM)
+	{
+	  output_asm_insn (AS2 (mov%L1,%3,%1), xops);
+	  output_asm_insn (AS2 (mov%L0,%2,%0), xops);
+	}
+      else
+	{
+	  xops[4] = high[2];
+	  xops[5] = low[2];
+	  xops[6] = operands[3];
+	  output_asm_insn (AS2 (mov%L6,%3,%6), xops);
+	  output_asm_insn (AS2 (add%L6,%5,%6), xops);
+	  output_asm_insn (AS2 (mov%L1,%6,%1), xops);
+	  output_asm_insn (AS2 (mov%L6,%2,%6), xops);
+	  output_asm_insn (AS2 (adc%L6,%4,%6), xops);
+	  output_asm_insn (AS2 (mov%L0,%6,%0), xops);
+	  RET;
+	}
+    }
+
+  cc_status.value1 = high[0];
+  cc_status.flags = CC_NO_OVERFLOW;
+
+  if (GET_CODE (operands[3]) == REG && GET_CODE (operands[2]) != REG)
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[2];
+      xops[3] = low[2];
+      xops[4] = operands[3];
+
+      output_asm_insn (AS2 (mov%L4,%3,%4), xops);
+      output_asm_insn (AS2 (add%L1,%4,%1), xops);
+      output_asm_insn (AS2 (mov%L4,%2,%4), xops);
+      output_asm_insn (AS2 (adc%L0,%4,%0), xops);
+    }
+
+  else if (GET_CODE (low[2]) != CONST_INT || INTVAL (low[2]) != 0)
+    {
+      output_asm_insn (AS2 (add%L0,%2,%0), low);
+      output_asm_insn (AS2 (adc%L0,%2,%0), high);
+    }
+
+  else
+    output_asm_insn (AS2 (add%L0,%2,%0), high);
+
+  RET;
+}"
+  [(set_attr "type" "binary")])
+
+;; On a 486, it is faster to do movl/addl than to do a single leal if
+;; operands[1] and operands[2] are both registers.
+
+(define_expand "addsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "")
+	(plus:SI (match_operand:SI 1 "nonimmediate_operand" "")
+		 (match_operand:SI 2 "general_operand" "")))]
+  ""
+  "IX86_EXPAND_BINARY_OPERATOR (PLUS, SImode, operands);")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r")
+	(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,r")
+		 (match_operand:SI 2 "general_operand" "ri,ri,ri")))]
+  "ix86_binary_operator_ok (PLUS, SImode, operands)"
+  "*
+{
+  if (REG_P (operands[0]) && REG_P (operands[1])
+      && (REG_P (operands[2]) || CONSTANT_P (operands[2]))
+      && REGNO (operands[0]) != REGNO (operands[1]))
+    {
+      if (REG_P (operands[2]) && REGNO (operands[0]) == REGNO (operands[2]))
+	return AS2 (add%L0,%1,%0);
+
+      if (operands[2] == stack_pointer_rtx)
+	{
+	  rtx temp;
+
+	  temp = operands[1];
+	  operands[1] = operands[2];
+	  operands[2] = temp;
+	}
+
+      if (operands[2] != stack_pointer_rtx)
+	{
+	  CC_STATUS_INIT;
+	  operands[1] = SET_SRC (PATTERN (insn));
+	  return AS2 (lea%L0,%a1,%0);
+	}
+    }
+
+  if (!rtx_equal_p (operands[0], operands[1]))
+    output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+
+  if (operands[2] == const1_rtx)
+    return AS1 (inc%L0,%0);
+
+  if (operands[2] == constm1_rtx)
+    return AS1 (dec%L0,%0);
+
+  /* subl $-128,%ebx is smaller than addl $128,%ebx. */
+  if (GET_CODE (operands[2]) == CONST_INT
+      && INTVAL (operands[2]) == 128)
+    {
+      /* This doesn't compute the carry bit in the same way
+       * as add%L0, but we use inc and dec above and they
+       * don't set the carry bit at all.  If inc/dec don't need
+       * a CC_STATUS_INIT, this doesn't either... */
+      operands[2] = GEN_INT (-128);
+      return AS2 (sub%L0,%2,%0);
+    }
+
+  return AS2 (add%L0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+;; addsi3 is faster, so put this after.
+
+(define_insn "movsi_lea"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+        (match_operand:QI 1 "address_operand" "p"))]
+  ""
+  "*
+{
+  /* Adding a constant to a register is faster with an add.  */
+  /* ??? can this ever happen? */
+  if (GET_CODE (operands[1]) == PLUS
+      && GET_CODE (XEXP (operands[1], 1)) == CONST_INT
+      && rtx_equal_p (operands[0], XEXP (operands[1], 0)))
+    {
+      operands[1] = XEXP (operands[1], 1);
+
+      if (operands[1] == const1_rtx)
+        return AS1 (inc%L0,%0);
+
+      if (operands[1] == constm1_rtx)
+        return AS1 (dec%L0,%0);
+
+      return AS2 (add%L0,%1,%0);
+    }
+
+  CC_STATUS_INIT;
+  return AS2 (lea%L0,%a1,%0);
+}"
+  [(set_attr "type" "lea")])
+
+;; ??? `lea' here, for three operand add?  If leaw is used, only %bx,
+;; %si and %di can appear in SET_SRC, and output_asm_insn might not be
+;; able to handle the operand.  But leal always works?
+
+(define_expand "addhi3"
+  [(set (match_operand:HI 0 "general_operand" "")
+	(plus:HI (match_operand:HI 1 "nonimmediate_operand" "")
+		 (match_operand:HI 2 "general_operand" "")))]
+  ""
+  "IX86_EXPAND_BINARY_OPERATOR (PLUS, HImode, operands);")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,?r")
+	(plus:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0,r")
+		 (match_operand:HI 2 "general_operand" "ri,r,ri")))]
+  "ix86_binary_operator_ok (PLUS, HImode, operands)"
+  "*
+{
+  if (REG_P (operands[0]) && REG_P (operands[1])
+      && (REG_P (operands[2]) || CONSTANT_P (operands[2]))
+      && REGNO (operands[0]) != REGNO (operands[1]))
+    {
+      if (operands[2] == stack_pointer_rtx) 
+	abort ();
+
+      CC_STATUS_INIT;
+      operands[1]
+	= gen_rtx_PLUS (SImode,
+			gen_rtx_REG (SImode, REGNO (operands[1])),
+			(! REG_P (operands[2])
+			 ? operands[2]
+			 : gen_rtx_REG (SImode, REGNO (operands[2]))));
+      operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));
+      return AS2 (lea%L0,%a1,%0);
+    }
+
+  /* ??? what about offsettable memory references? */
+  if (!TARGET_PENTIUMPRO /* partial stalls are just too painful to risk. */
+      && QI_REG_P (operands[0])
+      && GET_CODE (operands[2]) == CONST_INT
+      && (INTVAL (operands[2]) & 0xff) == 0
+      && i386_cc_probably_useless_p (insn))
+    {
+      int byteval = (INTVAL (operands[2]) >> 8) & 0xff;
+      CC_STATUS_INIT;
+
+      if (byteval == 1)
+	return AS1 (inc%B0,%h0);
+      else if (byteval == 255)
+	return AS1 (dec%B0,%h0);
+
+      operands[2] = GEN_INT (byteval);
+      return AS2 (add%B0,%2,%h0);
+    }
+
+  /* Use a 32-bit operation when possible, to avoid the prefix penalty. */
+  if (REG_P (operands[0])
+      && i386_aligned_p (operands[2])
+      && i386_cc_probably_useless_p (insn))
+    {
+      CC_STATUS_INIT;
+
+      if (GET_CODE (operands[2]) == CONST_INT)
+	{
+	  HOST_WIDE_INT intval = 0xffff & INTVAL (operands[2]);
+
+	  if (intval == 1)
+	    return AS1 (inc%L0,%k0);
+
+	  if (intval == 0xffff)
+	    return AS1 (dec%L0,%k0);
+
+	  operands[2] = i386_sext16_if_const (operands[2]);
+	}
+      return AS2 (add%L0,%k2,%k0);
+    }
+
+  if (operands[2] == const1_rtx)
+    return AS1 (inc%W0,%0);
+
+  if (operands[2] == constm1_rtx
+      || (GET_CODE (operands[2]) == CONST_INT
+	  && INTVAL (operands[2]) == 65535))
+    return AS1 (dec%W0,%0);
+
+  return AS2 (add%W0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_expand "addqi3"
+  [(set (match_operand:QI 0 "general_operand" "")
+	(plus:QI (match_operand:QI 1 "general_operand" "")
+		 (match_operand:QI 2 "general_operand" "")))]
+  ""
+  "IX86_EXPAND_BINARY_OPERATOR (PLUS, QImode, operands);")
+
+(define_insn ""
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q,?q")
+	(plus:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0,q")
+		 (match_operand:QI 2 "general_operand" "qn,qn,qn")))]
+  "ix86_binary_operator_ok (PLUS, QImode, operands)"
+  "*
+{
+  if (REG_P (operands[0]) && REG_P (operands[1])
+      && (REG_P (operands[2]) || CONSTANT_P (operands[2]))
+      && (REGNO (operands[0]) != REGNO (operands[1])
+	  || NON_QI_REG_P (operands[1])
+	  || (REG_P (operands[2]) && NON_QI_REG_P (operands[2]))))
+    {
+      if (operands[2] == stack_pointer_rtx) 
+	abort ();
+
+      CC_STATUS_INIT;
+      operands[1]
+	= gen_rtx_PLUS (SImode,
+			gen_rtx_REG (SImode, REGNO (operands[1])),
+			(! REG_P (operands[2])
+			 ? operands[2]
+			 : gen_rtx_REG (SImode, REGNO (operands[2]))));
+      operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));
+      return AS2 (lea%L0,%a1,%0);
+    }
+  if (operands[2] == const1_rtx)
+    return AS1 (inc%B0,%0);
+
+  if (operands[2] == constm1_rtx
+      || (GET_CODE (operands[2]) == CONST_INT
+	  && INTVAL (operands[2]) == 255))
+    return AS1 (dec%B0,%0);
+
+  return AS2 (add%B0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+;Lennart Augustsson <augustss@cs.chalmers.se>
+;says this pattern just makes slower code:
+;	pushl	%ebp
+;	addl	$-80,(%esp)
+;instead of
+;	leal	-80(%ebp),%eax
+;	pushl	%eax
+;
+;(define_insn ""
+;  [(set (match_operand:SI 0 "push_operand" "=<")
+;	(plus:SI (match_operand:SI 1 "register_operand" "%r")
+;		 (match_operand:SI 2 "nonmemory_operand" "ri")))]
+;  ""
+;  "*
+;{
+;  rtx xops[4];
+;  xops[0] = operands[0];
+;  xops[1] = operands[1];
+;  xops[2] = operands[2];
+;  xops[3] = gen_rtx_MEM (SImode, stack_pointer_rtx);
+;  output_asm_insn (\"push%z1 %1\", xops);
+;  output_asm_insn (AS2 (add%z3,%2,%3), xops);
+;  RET;
+;}")
+
+;; The patterns that match these are at the end of this file.
+
+(define_expand "addxf3"
+  [(set (match_operand:XF 0 "register_operand" "")
+	(plus:XF (match_operand:XF 1 "register_operand" "")
+		 (match_operand:XF 2 "register_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "adddf3"
+  [(set (match_operand:DF 0 "register_operand" "")
+	(plus:DF (match_operand:DF 1 "nonimmediate_operand" "")
+		 (match_operand:DF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "addsf3"
+  [(set (match_operand:SF 0 "register_operand" "")
+	(plus:SF (match_operand:SF 1 "nonimmediate_operand" "")
+		 (match_operand:SF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+;;- subtract instructions
+
+;;(define_insn "subsidi3"
+;;  [(set (match_operand:DI 0 "general_operand" "=&r,&ro,&r,!&r,o,o,!o")
+;;	(minus:DI (match_operand:DI 1 "general_operand" "0iF,0,roiF,roiF,riF,o,o")
+;;		  (zero_extend:DI (match_operand:SI 2 "general_operand" "o,ri,ri,o,ri,i,r"))))
+;;   (clobber (match_scratch:SI 3 "=X,X,X,X,X,&r,&r"))]
+(define_insn "subsidi3"
+  [(set (match_operand:DI 0 "general_operand" "=&r,&r")
+	(minus:DI (match_operand:DI 1 "general_operand" "0,riF")
+		  (zero_extend:DI (match_operand:SI 2 "general_operand" "ri,ri"))))
+   (clobber (match_scratch:SI 3 "=X,X"))]
+  ""
+  "*
+{
+  rtx low[3], high[3], xops[7];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 2, low, high);
+  high[2] = const0_rtx;
+  low[2]  = operands[2];
+
+  if (!rtx_equal_p (operands[0], operands[1]))
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[1];
+      xops[3] = low[1];
+
+      if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
+	{
+	  output_asm_insn (AS2 (mov%L1,%3,%1), xops);
+	  output_asm_insn (AS2 (mov%L0,%2,%0), xops);
+	}
+      else
+	{
+	  xops[4] = high[2];
+	  xops[5] = low[2];
+	  xops[6] = operands[3];
+	  output_asm_insn (AS2 (mov%L6,%3,%6), xops);
+	  output_asm_insn (AS2 (sub%L6,%5,%6), xops);
+	  output_asm_insn (AS2 (mov%L1,%6,%1), xops);
+	  output_asm_insn (AS2 (mov%L6,%2,%6), xops);
+	  output_asm_insn (AS2 (sbb%L6,%4,%6), xops);
+	  output_asm_insn (AS2 (mov%L0,%6,%0), xops);
+	  RET;
+	}
+    }
+
+  output_asm_insn (AS2 (sub%L0,%2,%0), low);
+  output_asm_insn (AS2 (sbb%L0,%2,%0), high);
+  cc_status.value1 = high[0];
+  cc_status.flags = CC_NO_OVERFLOW;
+
+  RET;
+}"
+  [(set_attr "type" "binary")])
+
+;;(define_insn "subdi3"
+;;  [(set (match_operand:DI 0 "general_operand" "=&r,&ro,o,o,!&r,!o")
+;;	(minus:DI (match_operand:DI 1 "general_operand" "0,0,0iF,or,roiF,roiF")
+;;		  (match_operand:DI 2 "general_operand" "or,riF,or,iF,roiF,roiF")))
+;;   (clobber (match_scratch:SI 3 "=X,X,&r,&r,X,&r"))]
+(define_insn "subdi3"
+  [(set (match_operand:DI 0 "general_operand" "=&r,&r,!&r")
+	(minus:DI (match_operand:DI 1 "general_operand" "0,0,riF")
+		  (match_operand:DI 2 "general_operand" "r,riF,riF")))
+   (clobber (match_scratch:SI 3 "=X,X,X"))]
+  ""
+  "*
+{
+  rtx low[3], high[3], xops[7];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 3, low, high);
+
+  if (!rtx_equal_p (operands[0], operands[1]))
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[1];
+      xops[3] = low[1];
+
+      if (GET_CODE (operands[0]) != MEM)
+	{
+	  output_asm_insn (AS2 (mov%L1,%3,%1), xops);
+	  output_asm_insn (AS2 (mov%L0,%2,%0), xops);
+	}
+      else
+	{
+	  xops[4] = high[2];
+	  xops[5] = low[2];
+	  xops[6] = operands[3];
+	  output_asm_insn (AS2 (mov%L6,%3,%6), xops);
+	  output_asm_insn (AS2 (sub%L6,%5,%6), xops);
+	  output_asm_insn (AS2 (mov%L1,%6,%1), xops);
+	  output_asm_insn (AS2 (mov%L6,%2,%6), xops);
+	  output_asm_insn (AS2 (sbb%L6,%4,%6), xops);
+	  output_asm_insn (AS2 (mov%L0,%6,%0), xops);
+	  RET;
+	}
+    }
+
+  cc_status.value1 = high[0];
+  cc_status.flags = CC_NO_OVERFLOW;
+
+  if (GET_CODE (operands[3]) == REG)
+    {
+      xops[0] = high[0];
+      xops[1] = low[0];
+      xops[2] = high[2];
+      xops[3] = low[2];
+      xops[4] = operands[3];
+
+      output_asm_insn (AS2 (mov%L4,%3,%4), xops);
+      output_asm_insn (AS2 (sub%L1,%4,%1), xops);
+      output_asm_insn (AS2 (mov%L4,%2,%4), xops);
+      output_asm_insn (AS2 (sbb%L0,%4,%0), xops);
+    }
+
+  else if (GET_CODE (low[2]) != CONST_INT || INTVAL (low[2]) != 0)
+    {
+      output_asm_insn (AS2 (sub%L0,%2,%0), low);
+      output_asm_insn (AS2 (sbb%L0,%2,%0), high);
+    }
+
+  else
+      output_asm_insn (AS2 (sub%L0,%2,%0), high);
+
+
+  RET;
+}"
+  [(set_attr "type" "binary")])
+
+(define_expand "subsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "")
+	(minus:SI (match_operand:SI 1 "nonimmediate_operand" "")
+		  (match_operand:SI 2 "general_operand" "")))]
+  ""
+  "IX86_EXPAND_BINARY_OPERATOR (MINUS, SImode, operands);")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r")
+	(minus:SI (match_operand:SI 1 "nonimmediate_operand" "0,0")
+		  (match_operand:SI 2 "general_operand" "ri,r")))]
+  "ix86_binary_operator_ok (MINUS, SImode, operands)"
+  "* return AS2 (sub%L0,%2,%0);"
+  [(set_attr "type" "binary")])
+
+(define_expand "subhi3"
+  [(set (match_operand:HI 0 "general_operand" "")
+	(minus:HI (match_operand:HI 1 "nonimmediate_operand" "")
+		  (match_operand:HI 2 "general_operand" "")))]
+  ""
+  "IX86_EXPAND_BINARY_OPERATOR (MINUS, HImode, operands);")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r")
+	(minus:HI (match_operand:HI 1 "nonimmediate_operand" "0,0")
+		  (match_operand:HI 2 "general_operand" "ri,r")))]
+  "ix86_binary_operator_ok (MINUS, HImode, operands)"
+  "*
+{
+  if (REG_P (operands[0])
+      && i386_aligned_p (operands[2])
+      && i386_cc_probably_useless_p (insn))
+    {
+      CC_STATUS_INIT;
+      operands[2] = i386_sext16_if_const (operands[2]);
+      return AS2 (sub%L0,%k2,%k0);
+    }
+ return AS2 (sub%W0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_expand "subqi3"
+  [(set (match_operand:QI 0 "general_operand" "")
+	(minus:QI (match_operand:QI 1 "general_operand" "")
+		  (match_operand:QI 2 "general_operand" "")))]
+  ""
+  "IX86_EXPAND_BINARY_OPERATOR (MINUS, QImode, operands);")
+
+(define_insn ""
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q")
+	(minus:QI (match_operand:QI 1 "nonimmediate_operand" "0,0")
+		  (match_operand:QI 2 "general_operand" "qn,qn")))]
+  "ix86_binary_operator_ok (MINUS, QImode, operands)"
+  "* return AS2 (sub%B0,%2,%0);"
+  [(set_attr "type" "binary")])
+
+;; The patterns that match these are at the end of this file.
+
+(define_expand "subxf3"
+  [(set (match_operand:XF 0 "register_operand" "")
+	(minus:XF (match_operand:XF 1 "register_operand" "")
+		  (match_operand:XF 2 "register_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "subdf3"
+  [(set (match_operand:DF 0 "register_operand" "")
+	(minus:DF (match_operand:DF 1 "nonimmediate_operand" "")
+		  (match_operand:DF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "subsf3"
+  [(set (match_operand:SF 0 "register_operand" "")
+	(minus:SF (match_operand:SF 1 "nonimmediate_operand" "")
+		  (match_operand:SF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+;;- multiply instructions
+
+;(define_insn "mulqi3"
+;  [(set (match_operand:QI 0 "register_operand" "=a")
+;	(mult:QI (match_operand:QI 1 "register_operand" "%0")
+;		 (match_operand:QI 2 "nonimmediate_operand" "qm")))]
+;  ""
+;  "imul%B0 %2,%0")
+
+(define_insn "mulhi3"
+  [(set (match_operand:HI 0 "register_operand" "=r,r")
+	(mult:HI (match_operand:HI 1 "nonimmediate_operand" "%0,r")
+		 (match_operand:HI 2 "general_operand" "r,i")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[1]) == REG
+      && REGNO (operands[1]) == REGNO (operands[0])
+      && (GET_CODE (operands[2]) == MEM || GET_CODE (operands[2]) == REG))
+    /* Assembler has weird restrictions.  */
+    return AS2 (imul%W0,%2,%0);
+  return AS3 (imul%W0,%2,%1,%0);
+}"
+  [(set_attr "type" "imul")])
+
+(define_insn "mulsi3"
+  [(set (match_operand:SI 0 "register_operand" "=r,r")
+	(mult:SI (match_operand:SI 1 "nonimmediate_operand" "%0,r")
+		 (match_operand:SI 2 "general_operand" "r,i")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[1]) == REG
+      && REGNO (operands[1]) == REGNO (operands[0])
+      && (GET_CODE (operands[2]) == MEM || GET_CODE (operands[2]) == REG))
+    /* Assembler has weird restrictions.  */
+    return AS2 (imul%L0,%2,%0);
+  return AS3 (imul%L0,%2,%1,%0);
+}"
+  [(set_attr "type" "imul")])
+
+(define_insn "umulqihi3"
+  [(set (match_operand:HI 0 "register_operand" "=a")
+	(mult:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "%0"))
+		 (zero_extend:HI (match_operand:QI 2 "nonimmediate_operand" "qm"))))]
+  ""
+  "mul%B0 %2"
+  [(set_attr "type" "imul")])
+
+(define_insn "mulqihi3"
+  [(set (match_operand:HI 0 "register_operand" "=a")
+	(mult:HI (sign_extend:HI (match_operand:QI 1 "register_operand" "%0"))
+		 (sign_extend:HI (match_operand:QI 2 "nonimmediate_operand" "qm"))))]
+  ""
+  "imul%B0 %2"
+  [(set_attr "type" "imul")])
+
+(define_insn "umulsidi3"
+  [(set (match_operand:DI 0 "register_operand" "=A")
+	(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%0"))
+		 (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))]
+  "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY"
+  "mul%L0 %2"
+  [(set_attr "type" "imul")])
+
+(define_insn "mulsidi3"
+  [(set (match_operand:DI 0 "register_operand" "=A")
+	(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "%0"))
+		 (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))]
+  "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY"
+  "imul%L0 %2"
+  [(set_attr "type" "imul")])
+
+(define_insn "umulsi3_highpart"
+  [(set (match_operand:SI 0 "register_operand" "=a")
+	(truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "%a"))
+					   (zero_extend:DI (match_operand:SI 2 "nonimmediate_operand" "rm")))
+				  (const_int 32))))
+   (clobber (match_scratch:SI 3 "=a"))]
+  "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY"
+  "mul%L0 %2"
+  [(set_attr "type" "imul")])
+
+(define_insn "smulsi3_highpart"
+  [(set (match_operand:SI 0 "register_operand" "=a")
+	(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "%a"))
+					   (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "rm")))
+				  (const_int 32))))
+   (clobber (match_scratch:SI 3 "=a"))]
+  "!WORDS_BIG_ENDIAN && TARGET_WIDE_MULTIPLY"
+  "imul%L0 %2"
+  [(set_attr "type" "imul")])
+
+;; The patterns that match these are at the end of this file.
+
+(define_expand "mulxf3"
+  [(set (match_operand:XF 0 "register_operand" "")
+	(mult:XF (match_operand:XF 1 "register_operand" "")
+		 (match_operand:XF 2 "register_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "muldf3"
+  [(set (match_operand:DF 0 "register_operand" "")
+	(mult:DF (match_operand:DF 1 "register_operand" "")
+		 (match_operand:DF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "mulsf3"
+  [(set (match_operand:SF 0 "register_operand" "")
+	(mult:SF (match_operand:SF 1 "register_operand" "")
+		 (match_operand:SF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+;;- divide instructions
+
+(define_insn "divqi3"
+  [(set (match_operand:QI 0 "register_operand" "=a")
+	(div:QI (match_operand:HI 1 "register_operand" "0")
+		(match_operand:QI 2 "nonimmediate_operand" "q")))]
+  ""
+  "idiv%B0 %2")
+
+(define_insn "udivqi3"
+  [(set (match_operand:QI 0 "register_operand" "=a")
+	(udiv:QI (match_operand:HI 1 "register_operand" "0")
+		 (match_operand:QI 2 "nonimmediate_operand" "q")))]
+  ""
+  "div%B0 %2"
+  [(set_attr "type" "idiv")])
+
+;; The patterns that match these are at the end of this file.
+
+(define_expand "divxf3"
+  [(set (match_operand:XF 0 "register_operand" "")
+	(div:XF (match_operand:XF 1 "register_operand" "")
+		(match_operand:XF 2 "register_operand" "")))]
+  "TARGET_80387"
+  "")
+
+(define_expand "divdf3"
+  [(set (match_operand:DF 0 "register_operand" "")
+ 	(div:DF (match_operand:DF 1 "register_operand" "")
+ 		(match_operand:DF 2 "nonimmediate_operand" "")))]
+   "TARGET_80387"
+   "")
+ 
+(define_expand "divsf3"
+  [(set (match_operand:SF 0 "register_operand" "")
+	(div:SF (match_operand:SF 1 "register_operand" "")
+		(match_operand:SF 2 "nonimmediate_operand" "")))]
+  "TARGET_80387"
+  "")
+
+;; Remainder instructions.
+
+(define_insn "divmodsi4"
+  [(set (match_operand:SI 0 "register_operand" "=a")
+	(div:SI (match_operand:SI 1 "register_operand" "0")
+		(match_operand:SI 2 "nonimmediate_operand" "r")))
+   (set (match_operand:SI 3 "register_operand" "=&d")
+	(mod:SI (match_dup 1) (match_dup 2)))]
+  ""
+  "*
+{
+#ifdef INTEL_SYNTAX
+  output_asm_insn (\"cdq\", operands);
+#else
+  output_asm_insn (\"cltd\", operands);
+#endif
+  return AS1 (idiv%L0,%2);
+}"
+  [(set_attr "type" "idiv")])
+
+(define_insn "divmodhi4"
+  [(set (match_operand:HI 0 "register_operand" "=a")
+	(div:HI (match_operand:HI 1 "register_operand" "0")
+		(match_operand:HI 2 "nonimmediate_operand" "r")))
+   (set (match_operand:HI 3 "register_operand" "=&d")
+	(mod:HI (match_dup 1) (match_dup 2)))]
+  ""
+  "cwtd\;idiv%W0 %2"
+  [(set_attr "type" "idiv")])
+
+;; ??? Can we make gcc zero extend operand[0]?
+(define_insn "udivmodsi4"
+  [(set (match_operand:SI 0 "register_operand" "=a")
+	(udiv:SI (match_operand:SI 1 "register_operand" "0")
+		 (match_operand:SI 2 "nonimmediate_operand" "r")))
+   (set (match_operand:SI 3 "register_operand" "=&d")
+	(umod:SI (match_dup 1) (match_dup 2)))]
+  ""
+  "*
+{
+  output_asm_insn (AS2 (xor%L3,%3,%3), operands);
+  return AS1 (div%L0,%2);
+}"
+  [(set_attr "type" "idiv")])
+
+;; ??? Can we make gcc zero extend operand[0]?
+(define_insn "udivmodhi4"
+  [(set (match_operand:HI 0 "register_operand" "=a")
+	(udiv:HI (match_operand:HI 1 "register_operand" "0")
+		 (match_operand:HI 2 "nonimmediate_operand" "r")))
+   (set (match_operand:HI 3 "register_operand" "=&d")
+	(umod:HI (match_dup 1) (match_dup 2)))]
+  ""
+  "*
+{
+  output_asm_insn (AS2 (xor%W0,%3,%3), operands);
+  return AS1 (div%W0,%2);
+}"
+  [(set_attr "type" "idiv")])
+
+/*
+;;this should be a valid double division which we may want to add
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=a")
+	(udiv:DI (match_operand:DI 1 "register_operand" "a")
+		 (match_operand:SI 2 "nonimmediate_operand" "rm")))
+   (set (match_operand:SI 3 "register_operand" "=d")
+	(umod:SI (match_dup 1) (match_dup 2)))]
+  ""
+  "div%L0 %2,%0"
+  [(set_attr "type" "idiv")])
+*/
+
+;;- and instructions
+
+;; On i386,
+;;			movzbl %bl,%ebx
+;; is faster than
+;;			andl $255,%ebx
+;;
+;; but if the reg is %eax, then the "andl" is faster.
+;;
+;; On i486, the "andl" is always faster than the "movzbl".
+;;
+;; On both i386 and i486, a three operand AND is as fast with movzbl or
+;; movzwl as with andl, if operands[0] != operands[1].
+
+;; The `r' in `rm' for operand 3 looks redundant, but it causes
+;; optional reloads to be generated if op 3 is a pseudo in a stack slot.
+
+(define_insn "andsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r")
+	(and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:SI 2 "general_operand" "ri,r")))]
+  ""
+  "*
+{
+  HOST_WIDE_INT intval;
+  if (!rtx_equal_p (operands[0], operands[1])
+      && rtx_equal_p (operands[0], operands[2]))
+    {
+      rtx tmp;
+      tmp = operands[1];
+      operands[1] = operands[2];
+      operands[2] = tmp;
+    }
+  switch (GET_CODE (operands[2]))
+    {
+    case CONST_INT:
+      if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))
+	break;
+      intval = INTVAL (operands[2]);
+      /* zero-extend 16->32? */
+      if (intval == 0xffff && REG_P (operands[0])
+	  && (! REG_P (operands[1])
+	      || REGNO (operands[0]) != 0 || REGNO (operands[1]) != 0)
+	  && (!TARGET_ZERO_EXTEND_WITH_AND || ! rtx_equal_p (operands[0], operands[1])))
+	{
+	  /* ??? tege: Should forget CC_STATUS only if we clobber a
+	     remembered operand.  Fix that later.  */
+	  CC_STATUS_INIT;
+#ifdef INTEL_SYNTAX
+	  return AS2 (movzx,%w1,%0);
+#else
+	  return AS2 (movz%W0%L0,%w1,%0);
+#endif
+	}
+
+      /* zero extend 8->32? */
+      if (intval == 0xff && REG_P (operands[0])
+	  && !(REG_P (operands[1]) && NON_QI_REG_P (operands[1]))
+	  && (! REG_P (operands[1])
+	      || REGNO (operands[0]) != 0 || REGNO (operands[1]) != 0)
+	  && (!TARGET_ZERO_EXTEND_WITH_AND || ! rtx_equal_p (operands[0], operands[1])))
+	{
+	  /* ??? tege: Should forget CC_STATUS only if we clobber a
+	     remembered operand.  Fix that later.  */
+	  CC_STATUS_INIT;
+#ifdef INTEL_SYNTAX
+	  return AS2 (movzx,%b1,%0);
+#else
+	  return AS2 (movz%B0%L0,%b1,%0);
+#endif
+	}
+
+      /* Check partial bytes.. non-QI-regs are not available */
+      if (REG_P (operands[0]) && ! QI_REG_P (operands[0]))
+	break;
+
+      /* only low byte has zero bits? */
+      if (~(intval | 0xff) == 0)
+	{
+	  intval &= 0xff;
+	  if (REG_P (operands[0]))
+	    {
+	      if (intval == 0)
+		{
+		  CC_STATUS_INIT;
+		  return AS2 (xor%B0,%b0,%b0);
+		}
+
+	      /* we're better off with the 32-bit version if reg != EAX */
+	      /* the value is sign-extended in 8 bits */
+	      if (REGNO (operands[0]) != 0 && (intval & 0x80))
+		break;
+	    }
+
+	  CC_STATUS_INIT;
+
+	  operands[2] = GEN_INT (intval);
+
+	  if (intval == 0)
+	    return AS2 (mov%B0,%2,%b0);
+
+	  return AS2 (and%B0,%2,%b0);
+	}
+
+      /* only second byte has zero? */
+      if (~(intval | 0xff00) == 0)
+	{
+	  CC_STATUS_INIT;
+
+	  intval = (intval >> 8) & 0xff;
+	  operands[2] = GEN_INT (intval);
+	  if (intval == 0)
+	    {
+	      if (REG_P (operands[0]))
+		return AS2 (xor%B0,%h0,%h0);
+	      operands[0] = adj_offsettable_operand (operands[0], 1);
+	      return AS2 (mov%B0,%2,%b0);
+	    }
+
+	  if (REG_P (operands[0]))
+	    return AS2 (and%B0,%2,%h0);
+
+	  operands[0] = adj_offsettable_operand (operands[0], 1);
+	  return AS2 (and%B0,%2,%b0);
+	}
+
+      if (REG_P (operands[0]))
+	break;
+
+      /* third byte has zero bits? */
+      if (~(intval | 0xff0000) == 0)
+	{
+	  intval = (intval >> 16) & 0xff;
+	  operands[0] = adj_offsettable_operand (operands[0], 2);
+byte_and_operation:
+	  CC_STATUS_INIT;
+	  operands[2] = GEN_INT (intval);
+	  if (intval == 0)
+	    return AS2 (mov%B0,%2,%b0);
+	  return AS2 (and%B0,%2,%b0);
+	}
+
+      /* fourth byte has zero bits? */
+      if (~(intval | 0xff000000) == 0)
+	{
+	  intval = (intval >> 24) & 0xff;
+	  operands[0] = adj_offsettable_operand (operands[0], 3);
+	  goto byte_and_operation;
+	}
+
+      /* Low word is zero? */
+      if (intval == 0xffff0000)
+        {
+word_zero_and_operation:
+	  CC_STATUS_INIT;
+	  operands[2] = const0_rtx;
+	  return AS2 (mov%W0,%2,%w0);
+	}
+
+      /* High word is zero? */
+      if (intval == 0x0000ffff)
+        {
+	  operands[0] = adj_offsettable_operand (operands[0], 2);
+	  goto word_zero_and_operation;
+	}
+
+    default:
+      break;
+    }
+
+  return AS2 (and%L0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_insn "andhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r")
+	(and:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:HI 2 "general_operand" "ri,r")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[2]) == CONST_INT
+      && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])))
+    {
+      /* Can we ignore the upper byte? */
+      if ((! REG_P (operands[0]) || QI_REG_P (operands[0]))
+	  && (INTVAL (operands[2]) & 0xff00) == 0xff00)
+	{
+	  CC_STATUS_INIT;
+
+	  if ((INTVAL (operands[2]) & 0xff) == 0)
+	    {
+	      operands[2] = const0_rtx;
+	      return AS2 (mov%B0,%2,%b0);
+	    }
+
+	  operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff);
+	  return AS2 (and%B0,%2,%b0);
+	}
+
+      /* Can we ignore the lower byte? */
+      /* ??? what about offsettable memory references? */
+      if (QI_REG_P (operands[0]) && (INTVAL (operands[2]) & 0xff) == 0xff)
+	{
+	  CC_STATUS_INIT;
+
+	  if ((INTVAL (operands[2]) & 0xff00) == 0)
+	    {
+	      operands[2] = const0_rtx;
+	      return AS2 (mov%B0,%2,%h0);
+	    }
+
+	  operands[2] = GEN_INT ((INTVAL (operands[2]) >> 8) & 0xff);
+	  return AS2 (and%B0,%2,%h0);
+	}
+
+      /* use 32-bit ops on registers when there are no sign issues.. */
+      if (REG_P (operands[0]))
+	{
+	  if (!(INTVAL (operands[2]) & ~0x7fff))
+	    return AS2 (and%L0,%2,%k0);
+	}
+    }
+
+  if (REG_P (operands[0])
+      && i386_aligned_p (operands[2]))
+    {
+      CC_STATUS_INIT;
+      /* If op[2] is constant, we should zero-extend it and */
+      /* make a note that op[0] has been zero-extended, so  */
+      /* that we could use 32-bit ops on it forthwith, but  */
+      /* there is no such reg-note available. Instead we do */
+      /* a sign extension as that can result in shorter asm */
+      operands[2] = i386_sext16_if_const (operands[2]);
+      return AS2 (and%L0,%k2,%k0);
+    }
+
+  /* Use a 32-bit word with the upper bits set, invalidate CC */
+  if (GET_CODE (operands[2]) == CONST_INT
+      && i386_aligned_p (operands[0]))
+    {
+      HOST_WIDE_INT val = INTVAL (operands[2]);
+      CC_STATUS_INIT;
+      val |= ~0xffff;
+      if (val != INTVAL (operands[2]))
+	operands[2] = GEN_INT (val);
+      return AS2 (and%L0,%k2,%k0);
+    }
+
+  return AS2 (and%W0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_insn "andqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q")
+	(and:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:QI 2 "general_operand" "qn,qn")))]
+  ""
+  "* return AS2 (and%B0,%2,%0);"
+  [(set_attr "type" "binary")])
+
+/* I am nervous about these two.. add them later..
+;I presume this means that we have something in say op0= eax which is small
+;and we want to and it with memory so we can do this by just an
+;andb m,%al  and have success.
+(define_insn ""
+  [(set (match_operand:SI 0 "general_operand" "=r")
+	(and:SI (zero_extend:SI
+		 (match_operand:HI 1 "nonimmediate_operand" "r"))
+		(match_operand:SI 2 "general_operand" "0")))]
+  "GET_CODE (operands[2]) == CONST_INT
+   && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (HImode))"
+  "and%W0 %1,%0")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=q")
+	(and:SI
+	 (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "q"))
+		(match_operand:SI 2 "register_operand" "0")))]
+  "GET_CODE (operands[2]) == CONST_INT
+   && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (QImode))"
+  "and%L0 %1,%0")
+
+*/
+
+;;- Bit set (inclusive or) instructions
+
+;; This optimizes known byte-wide operations to memory, and in some cases
+;; to QI registers.. Note that we don't want to use the QI registers too
+;; aggressively, because often the 32-bit register instruction is the same
+;; size, and likely to be faster on PentiumPro.
+(define_insn "iorsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r")
+	(ior:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:SI 2 "general_operand" "ri,r")))]
+  ""
+  "*
+{
+  HOST_WIDE_INT intval;
+  switch (GET_CODE (operands[2]))
+    {
+    case CONST_INT:
+
+      if (REG_P (operands[0]) && ! QI_REG_P (operands[0]))
+	break;
+
+      /* don't try to optimize volatile accesses */
+      if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))
+	break;
+
+      intval = INTVAL (operands[2]);
+      if ((intval & ~0xff) == 0)
+        {
+	  if (REG_P (operands[0]))
+	    {
+	      /* Do low byte access only for %eax or when high bit is set */
+	      if (REGNO (operands[0]) != 0 && !(intval & 0x80))
+	        break;
+	    }
+
+byte_or_operation:
+	    CC_STATUS_INIT;
+
+	    if (intval != INTVAL (operands[2]))
+	      operands[2] = GEN_INT (intval);
+
+	    if (intval == 0xff)
+	      return AS2 (mov%B0,%2,%b0);
+
+	    return AS2 (or%B0,%2,%b0);
+	}
+
+      /* second byte? */
+      if ((intval & ~0xff00) == 0)
+	{
+	  intval >>= 8;
+
+	  if (REG_P (operands[0]))
+	    {
+	      CC_STATUS_INIT;
+	      operands[2] = GEN_INT (intval);
+	      if (intval == 0xff)
+		return AS2 (mov%B0,%2,%h0);
+
+	      return AS2 (or%B0,%2,%h0);
+	    }
+
+	  operands[0] = adj_offsettable_operand (operands[0], 1);
+	  goto byte_or_operation;
+	}
+
+      if (REG_P (operands[0]))
+	break;
+
+      /* third byte? */
+      if ((intval & ~0xff0000) == 0)
+	{
+	  intval >>= 16;
+	  operands[0] = adj_offsettable_operand (operands[0], 2);
+	  goto byte_or_operation;
+	}
+
+      /* fourth byte? */
+      if ((intval & ~0xff000000) == 0)
+	{
+	  intval = (intval >> 24) & 0xff;
+	  operands[0] = adj_offsettable_operand (operands[0], 3);
+	  goto byte_or_operation;
+	}
+
+    default:
+      break;
+    }
+
+  return AS2 (or%L0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_insn "iorhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r")
+	(ior:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:HI 2 "general_operand" "ri,r")))]
+  ""
+  "*
+{
+  HOST_WIDE_INT intval;
+  switch (GET_CODE (operands[2]))
+    {
+    case CONST_INT:
+
+      if (REG_P (operands[0]) && ! QI_REG_P (operands[0]))
+	break;
+
+      /* don't try to optimize volatile accesses */
+      if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))
+	break;
+
+      intval = 0xffff & INTVAL (operands[2]);
+
+      if ((intval & 0xff00) == 0)
+        {
+	  if (REG_P (operands[0]))
+	    {
+	      /* Do low byte access only for %eax or when high bit is set */
+	      if (REGNO (operands[0]) != 0 && !(intval & 0x80))
+	        break;
+	    }
+
+byte_or_operation:
+	    CC_STATUS_INIT;
+
+	    if (intval == 0xff)
+	      return AS2 (mov%B0,%2,%b0);
+
+	    return AS2 (or%B0,%2,%b0);
+	}
+
+      /* high byte? */
+      if ((intval & 0xff) == 0)
+	{
+	  intval >>= 8;
+	  operands[2] = GEN_INT (intval);
+
+	  if (REG_P (operands[0]))
+	    {
+	      CC_STATUS_INIT;
+	      if (intval == 0xff)
+		return AS2 (mov%B0,%2,%h0);
+
+	      return AS2 (or%B0,%2,%h0);
+	    }
+
+	  operands[0] = adj_offsettable_operand (operands[0], 1);
+
+	  goto byte_or_operation;
+	}
+
+    default:
+      break;
+    }
+
+  if (REG_P (operands[0])
+      && i386_aligned_p (operands[2]))
+    {
+      CC_STATUS_INIT;
+      operands[2] = i386_sext16_if_const (operands[2]);
+      return AS2 (or%L0,%k2,%k0);
+    }
+
+  if (GET_CODE (operands[2]) == CONST_INT
+      && i386_aligned_p (operands[0]))
+    {
+      CC_STATUS_INIT;
+      intval = 0xffff & INTVAL (operands[2]);
+      if (intval != INTVAL (operands[2]))
+	operands[2] = GEN_INT (intval);
+      return AS2 (or%L0,%2,%k0);
+    }
+
+  return AS2 (or%W0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_insn "iorqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q")
+	(ior:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:QI 2 "general_operand" "qn,qn")))]
+  ""
+  "* return AS2 (or%B0,%2,%0);"
+  [(set_attr "type" "binary")])
+
+;;- xor instructions
+
+(define_insn "xorsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r")
+	(xor:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:SI 2 "general_operand" "ri,r")))]
+  ""
+  "*
+{
+  HOST_WIDE_INT intval;
+  switch (GET_CODE (operands[2]))
+    {
+    case CONST_INT:
+
+      if (REG_P (operands[0]) && ! QI_REG_P (operands[0]))
+	break;
+
+      /* don't try to optimize volatile accesses */
+      if (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))
+	break;
+
+      intval = INTVAL (operands[2]);
+      if ((intval & ~0xff) == 0)
+        {
+	  if (REG_P (operands[0]))
+	    {
+	      /* Do low byte access only for %eax or when high bit is set */
+	      if (REGNO (operands[0]) != 0 && !(intval & 0x80))
+	        break;
+	    }
+
+byte_xor_operation:
+	    CC_STATUS_INIT;
+	      
+	    if (intval == 0xff
+                && (!TARGET_PENTIUM || optimize_size
+                    || (GET_CODE (operands[0]) == MEM 
+                        && memory_address_info (XEXP (operands[0], 0), 1))))
+	      return AS1 (not%B0,%b0);
+
+	    if (intval != INTVAL (operands[2]))
+	      operands[2] = GEN_INT (intval);
+	    return AS2 (xor%B0,%2,%b0);
+	}
+
+      /* second byte? */
+      if ((intval & ~0xff00) == 0)
+	{
+	  intval >>= 8;
+
+	  if (REG_P (operands[0]))
+	    {
+	      CC_STATUS_INIT;
+	      if (intval == 0xff 
+                  && (!TARGET_PENTIUM || optimize_size
+                      || (GET_CODE (operands[0]) == MEM 
+                          && memory_address_info (XEXP (operands[0], 0), 1))))
+		return AS1 (not%B0,%h0);
+
+	      operands[2] = GEN_INT (intval);
+	      return AS2 (xor%B0,%2,%h0);
+	    }
+
+	  operands[0] = adj_offsettable_operand (operands[0], 1);
+
+	  goto byte_xor_operation;
+	}
+
+      if (REG_P (operands[0]))
+	break;
+
+      /* third byte? */
+      if ((intval & ~0xff0000) == 0)
+	{
+	  intval >>= 16;
+	  operands[0] = adj_offsettable_operand (operands[0], 2);
+	  goto byte_xor_operation;
+	}
+
+      /* fourth byte? */
+      if ((intval & ~0xff000000) == 0)
+	{
+	  intval = (intval >> 24) & 0xff;
+	  operands[0] = adj_offsettable_operand (operands[0], 3);
+	  goto byte_xor_operation;
+	}
+
+    default:
+      break;
+    }
+
+  return AS2 (xor%L0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_insn "xorhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r")
+	(xor:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:HI 2 "general_operand" "ri,r")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[2]) == CONST_INT
+      && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])))
+    {
+      /* Can we ignore the upper byte? */
+      if ((! REG_P (operands[0]) || QI_REG_P (operands[0]))
+	  && (INTVAL (operands[2]) & 0xff00) == 0)
+	{
+	  CC_STATUS_INIT;
+	  if (INTVAL (operands[2]) & 0xffff0000)
+	    operands[2] = GEN_INT (INTVAL (operands[2]) & 0xffff);
+
+	  if (INTVAL (operands[2]) == 0xff 
+              && (!TARGET_PENTIUM || optimize_size
+                  || (GET_CODE (operands[0]) == MEM 
+                      && memory_address_info (XEXP (operands[0], 0), 1))))
+	    return AS1 (not%B0,%b0);
+
+	  return AS2 (xor%B0,%2,%b0);
+	}
+
+      /* Can we ignore the lower byte? */
+      /* ??? what about offsettable memory references? */
+      if (QI_REG_P (operands[0])
+	  && (INTVAL (operands[2]) & 0xff) == 0)
+	{
+	  CC_STATUS_INIT;
+	  operands[2] = GEN_INT ((INTVAL (operands[2]) >> 8) & 0xff);
+
+	  if (INTVAL (operands[2]) == 0xff
+              && (!TARGET_PENTIUM || optimize_size
+                  || (GET_CODE (operands[0]) == MEM 
+                      && memory_address_info (XEXP (operands[0], 0), 1))))
+	    return AS1 (not%B0,%h0);
+
+	  return AS2 (xor%B0,%2,%h0);
+	}
+    }
+
+  if (REG_P (operands[0])
+      && i386_aligned_p (operands[2]))
+    {
+      CC_STATUS_INIT;
+      operands[2] = i386_sext16_if_const (operands[2]);
+      return AS2 (xor%L0,%k2,%k0);
+    }
+
+  if (GET_CODE (operands[2]) == CONST_INT
+      && i386_aligned_p (operands[0]))
+    {
+      HOST_WIDE_INT intval;
+      CC_STATUS_INIT;
+      intval = 0xffff & INTVAL (operands[2]);
+      if (intval != INTVAL (operands[2]))
+	operands[2] = GEN_INT (intval);
+      return AS2 (xor%L0,%2,%k0);
+    }
+
+  return AS2 (xor%W0,%2,%0);
+}"
+  [(set_attr "type" "binary")])
+
+(define_insn "xorqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q")
+	(xor:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0")
+		(match_operand:QI 2 "general_operand" "qn,qm")))]
+  ""
+  "* return AS2 (xor%B0,%2,%0);"
+  [(set_attr "type" "binary")])
+
+;; logical operations for DImode
+
+(define_insn "anddi3"
+  [(set (match_operand:DI 0 "general_operand" "=&r,&r")
+	(and:DI (match_operand:DI 1 "general_operand" "%0,0")
+		(match_operand:DI 2 "general_operand" "riF,riF")))]
+  ""
+  "#"
+  [(set_attr "type" "binary")])
+
+
+(define_insn "iordi3"
+  [(set (match_operand:DI 0 "general_operand" "=&r,&r")
+	(ior:DI (match_operand:DI 1 "general_operand" "%0,0")
+		(match_operand:DI 2 "general_operand" "riF,riF")))]
+  ""
+  "#"
+  [(set_attr "type" "binary")])
+
+(define_insn "xordi3"
+  [(set (match_operand:DI 0 "general_operand" "=&r,&r")
+	(xor:DI (match_operand:DI 1 "general_operand" "%0,0")
+		(match_operand:DI 2 "general_operand" "riF,riF")))]
+  ""
+  "#"
+  [(set_attr "type" "binary")])
+
+(define_split
+  [(set (match_operand:DI 0 "general_operand" "")
+	(match_operator:DI 3 "ix86_logical_operator"
+	  [(match_operand:DI 1 "general_operand" "")
+	   (match_operand:DI 2 "general_operand" "")]))]
+  ""
+  [(set (match_dup 4) (match_op_dup:SI 3 [(match_dup 6) (match_dup 8)]))
+   (set (match_dup 5) (match_op_dup:SI 3 [(match_dup 7) (match_dup 9)]))]
+  "split_di (&operands[0], 1, &operands[4], &operands[5]);
+   split_di (&operands[1], 1, &operands[6], &operands[7]);
+   split_di (&operands[2], 1, &operands[8], &operands[9]);")
+
+;;- negation instructions
+
+(define_insn "negdi2"
+  [(set (match_operand:DI 0 "general_operand" "=&r")
+	(neg:DI (match_operand:DI 1 "general_operand" "0")))]
+  ""
+  "*
+{
+  rtx xops[2], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = const0_rtx;
+  xops[1] = high[0];
+
+  output_asm_insn (AS1 (neg%L0,%0), low);
+  output_asm_insn (AS2 (adc%L1,%0,%1), xops);
+  output_asm_insn (AS1 (neg%L0,%0), high);
+  RET;
+}")
+
+(define_insn "negsi2"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(neg:SI (match_operand:SI 1 "nonimmediate_operand" "0")))]
+  ""
+  "neg%L0 %0")
+
+(define_insn "neghi2"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(neg:HI (match_operand:HI 1 "nonimmediate_operand" "0")))]
+  ""
+  "*
+    if (REG_P (operands[0]) && i386_cc_probably_useless_p (insn))
+      {
+	CC_STATUS_INIT;
+	return AS1(neg%L0,%k0);
+      }
+    return AS1(neg%W0,%0);")
+
+(define_insn "negqi2"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(neg:QI (match_operand:QI 1 "nonimmediate_operand" "0")))]
+  ""
+  "neg%B0 %0")
+
+(define_insn "negsf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(neg:SF (match_operand:SF 1 "register_operand" "0")))]
+  "TARGET_80387"
+  "fchs"
+  [(set_attr "type" "fpop")])
+
+(define_insn "negdf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(neg:DF (match_operand:DF 1 "register_operand" "0")))]
+  "TARGET_80387"
+  "fchs"
+  [(set_attr "type" "fpop")])
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(neg:DF (float_extend:DF (match_operand:SF 1 "register_operand" "0"))))]
+  "TARGET_80387"
+  "fchs"
+  [(set_attr "type" "fpop")])
+
+(define_insn "negxf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(neg:XF (match_operand:XF 1 "register_operand" "0")))]
+  "TARGET_80387"
+  "fchs"
+  [(set_attr "type" "fpop")])
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(neg:XF (float_extend:XF (match_operand:DF 1 "register_operand" "0"))))]
+  "TARGET_80387"
+  "fchs"
+  [(set_attr "type" "fpop")])
+
+;; Absolute value instructions
+
+(define_insn "abssf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(abs:SF (match_operand:SF 1 "register_operand" "0")))]
+  "TARGET_80387"
+  "fabs"
+  [(set_attr "type" "fpop")])
+
+(define_insn "absdf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(abs:DF (match_operand:DF 1 "register_operand" "0")))]
+  "TARGET_80387"
+  "fabs"
+  [(set_attr "type" "fpop")])
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(abs:DF (float_extend:DF (match_operand:SF 1 "register_operand" "0"))))]
+  "TARGET_80387"
+  "fabs"
+  [(set_attr "type" "fpop")])
+
+(define_insn "absxf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(abs:XF (match_operand:XF 1 "register_operand" "0")))]
+  "TARGET_80387"
+  "fabs"
+  [(set_attr "type" "fpop")])
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(abs:XF (float_extend:XF (match_operand:DF 1 "register_operand" "0"))))]
+  "TARGET_80387"
+  "fabs"
+  [(set_attr "type" "fpop")])
+
+(define_insn "sqrtsf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(sqrt:SF (match_operand:SF 1 "register_operand" "0")))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387"
+  "fsqrt")
+
+(define_insn "sqrtdf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(sqrt:DF (match_operand:DF 1 "register_operand" "0")))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387
+   && (TARGET_IEEE_FP || flag_fast_math) "
+  "fsqrt")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(sqrt:DF (float_extend:DF
+		  (match_operand:SF 1 "register_operand" "0"))))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387"
+  "fsqrt")
+
+(define_insn "sqrtxf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(sqrt:XF (match_operand:XF 1 "register_operand" "0")))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 
+   && (TARGET_IEEE_FP || flag_fast_math) "
+  "fsqrt")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(sqrt:XF (float_extend:XF
+		  (match_operand:DF 1 "register_operand" "0"))))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387"
+  "fsqrt")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(sqrt:XF (float_extend:XF
+		  (match_operand:SF 1 "register_operand" "0"))))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387"
+  "fsqrt")
+
+(define_insn "sindf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(unspec:DF [(match_operand:DF 1 "register_operand" "0")] 1))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fsin")
+
+(define_insn "sinsf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(unspec:SF [(match_operand:SF 1 "register_operand" "0")] 1))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fsin")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(unspec:DF [(float_extend:DF
+		     (match_operand:SF 1 "register_operand" "0"))] 1))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fsin")
+
+(define_insn "sinxf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(unspec:XF [(match_operand:XF 1 "register_operand" "0")] 1))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fsin")
+
+(define_insn "cosdf2"
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(unspec:DF [(match_operand:DF 1 "register_operand" "0")] 2))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fcos")
+
+(define_insn "cossf2"
+  [(set (match_operand:SF 0 "register_operand" "=f")
+	(unspec:SF [(match_operand:SF 1 "register_operand" "0")] 2))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fcos")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f")
+	(unspec:DF [(float_extend:DF
+		     (match_operand:SF 1 "register_operand" "0"))] 2))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fcos")
+
+(define_insn "cosxf2"
+  [(set (match_operand:XF 0 "register_operand" "=f")
+	(unspec:XF [(match_operand:XF 1 "register_operand" "0")] 2))]
+  "! TARGET_NO_FANCY_MATH_387 && TARGET_80387 && flag_fast_math"
+  "fcos")
+
+;;- one complement instructions
+
+(define_insn "one_cmplsi2"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(not:SI (match_operand:SI 1 "nonimmediate_operand" "0")))]
+  ""
+  "*
+{
+  /* A Pentium NOT is not pariable.  Output it only in case of complex
+     memory address, because XOR will be inpariable anyway because
+     of immediate/displacement rule.  */
+
+  if (TARGET_PENTIUM && !optimize_size
+      && (GET_CODE (operands[0]) != MEM 
+	  || memory_address_info (XEXP (operands[0], 0), 1) == 0))
+    {
+      rtx xops[2];
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xffffffff);
+      output_asm_insn (AS2 (xor%L0,%1,%0), xops);
+      RET;
+    }
+  else
+    return AS1 (not%L0,%0);
+}")
+
+(define_insn "one_cmplhi2"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(not:HI (match_operand:HI 1 "nonimmediate_operand" "0")))]
+  ""
+  "*
+{
+  /* A Pentium NOT is not pariable.  Output it only in case of complex
+     memory address, because XOR will be inpariable anyway because
+     of immediate/displacement rule.  */
+
+  if (TARGET_PENTIUM && !optimize_size
+      && (GET_CODE (operands[0]) != MEM 
+	  || memory_address_info (XEXP (operands[0], 0), 1) == 0))
+    {
+      rtx xops[2];
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xffff);
+      if (REG_P (operands[0])
+	  && i386_cc_probably_useless_p (insn))
+       {
+	  CC_STATUS_INIT;
+	  output_asm_insn (AS2 (xor%L0,%1,%k0), xops);
+       }
+      else
+	output_asm_insn (AS2 (xor%W0,%1,%0), xops);
+      RET;
+    }
+  else
+    {
+      if (REG_P (operands[0])
+	  && i386_cc_probably_useless_p (insn))
+	{
+	  CC_STATUS_INIT;
+	  return AS1 (not%L0,%k0);
+	}
+      return AS1 (not%W0,%0);
+    }
+}")
+
+(define_insn "one_cmplqi2"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(not:QI (match_operand:QI 1 "nonimmediate_operand" "0")))]
+  ""
+  "*
+{
+  /* A Pentium NOT is not pariable.  Output it only in case of complex
+     memory address, because XOR will be inpariable anyway because
+     of immediate/displacement rule.  */
+
+  if (TARGET_PENTIUM && !optimize_size
+      && (GET_CODE (operands[0]) != MEM 
+	  || memory_address_info (XEXP (operands[0], 0), 1) == 0))
+    {
+      rtx xops[2];
+      xops[0] = operands[0];
+      xops[1] = GEN_INT (0xff);
+      output_asm_insn (AS2 (xor%B0,%1,%0), xops);
+      RET;
+    }
+  else
+    return AS1 (not%B0,%0);
+}")
+
+;;- arithmetic shift instructions
+
+;; DImode shifts are implemented using the i386 "shift double" opcode,
+;; which is written as "sh[lr]d[lw] imm,reg,reg/mem".  If the shift count
+;; is variable, then the count is in %cl and the "imm" operand is dropped
+;; from the assembler input.
+
+;; This instruction shifts the target reg/mem as usual, but instead of
+;; shifting in zeros, bits are shifted in from reg operand.  If the insn
+;; is a left shift double, bits are taken from the high order bits of
+;; reg, else if the insn is a shift right double, bits are taken from the
+;; low order bits of reg.  So if %eax is "1234" and %edx is "5678",
+;; "shldl $8,%edx,%eax" leaves %edx unchanged and sets %eax to "2345".
+
+;; Since sh[lr]d does not change the `reg' operand, that is done
+;; separately, making all shifts emit pairs of shift double and normal
+;; shift.  Since sh[lr]d does not shift more than 31 bits, and we wish to
+;; support a 63 bit shift, each shift where the count is in a reg expands
+;; to a pair of shifts, a branch, a shift by 32 and a label.
+
+;; If the shift count is a constant, we need never emit more than one
+;; shift pair, instead using moves and sign extension for counts greater
+;; than 31.
+
+(define_expand "ashldi3"
+  [(set (match_operand:DI 0 "register_operand" "")
+	(ashift:DI (match_operand:DI 1 "register_operand" "")
+		   (match_operand:QI 2 "nonmemory_operand" "")))]
+  ""
+  "
+{
+  if (GET_CODE (operands[2]) != CONST_INT
+      || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))
+    {
+      operands[2] = copy_to_mode_reg (QImode, operands[2]);
+      emit_insn (gen_ashldi3_non_const_int (operands[0], operands[1],
+					    operands[2]));
+    }
+  else
+    emit_insn (gen_ashldi3_const_int (operands[0], operands[1], operands[2]));
+
+  DONE;
+}")
+
+(define_insn "ashldi3_const_int"
+  [(set (match_operand:DI 0 "register_operand" "=&r")
+	(ashift:DI (match_operand:DI 1 "register_operand" "0")
+		   (match_operand:QI 2 "const_int_operand" "J")))]
+  "CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')"
+  "*
+{
+  rtx xops[4], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = operands[2];
+  xops[1] = const1_rtx;
+  xops[2] = low[0];
+  xops[3] = high[0];
+
+  if (INTVAL (xops[0]) > 31)
+    {
+      output_asm_insn (AS2 (mov%L3,%2,%3), xops);	/* Fast shift by 32 */
+      output_asm_insn (AS2 (xor%L2,%2,%2), xops);
+
+      if (INTVAL (xops[0]) > 32)
+        {
+	  xops[0] = GEN_INT (INTVAL (xops[0]) - 32);
+	  output_asm_insn (AS2 (sal%L3,%0,%3), xops); /* Remaining shift */
+	}
+    }
+  else
+    {
+      output_asm_insn (AS3 (shld%L3,%0,%2,%3), xops);
+      output_asm_insn (AS2 (sal%L2,%0,%2), xops);
+    }
+  RET;
+}")
+
+(define_insn "ashldi3_non_const_int"
+  [(set (match_operand:DI 0 "register_operand" "=&r")
+	(ashift:DI (match_operand:DI 1 "register_operand" "0")
+		   (match_operand:QI 2 "register_operand" "c")))]
+  ""
+  "*
+{
+  rtx xops[5], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = operands[2];
+  xops[1] = GEN_INT (32);
+  xops[2] = low[0];
+  xops[3] = high[0];
+  xops[4] = gen_label_rtx ();
+
+  output_asm_insn (AS3_SHIFT_DOUBLE (shld%L3,%0,%2,%3), xops);
+  output_asm_insn (AS2 (sal%L2,%0,%2), xops);
+  output_asm_insn (AS2 (test%B0,%1,%b0), xops);
+  output_asm_insn (AS1 (je,%X4), xops);
+  output_asm_insn (AS2 (mov%L3,%2,%3), xops);	/* Fast shift by 32 */
+  output_asm_insn (AS2 (xor%L2,%2,%2), xops);
+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
+                             CODE_LABEL_NUMBER (xops[4]));
+  RET;
+}")
+
+(define_expand "ashlsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "")
+	(ashift:SI (match_operand:SI 1 "nonimmediate_operand" "")
+		   (match_operand:SI 2 "nonmemory_operand" "")))]
+  ""
+  "")
+
+(define_expand "ashlhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "")
+	(ashift:HI (match_operand:HI 1 "nonimmediate_operand" "")
+		   (match_operand:HI 2 "nonmemory_operand" "")))]
+  ""
+  "")
+
+(define_expand "ashlqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "")
+	(ashift:QI (match_operand:QI 1 "nonimmediate_operand" "")
+		   (match_operand:QI 2 "nonmemory_operand" "")))]
+  ""
+  "")
+
+;; Pattern for shifts which can be encoded into an lea instruction.
+;; This is kept as a separate pattern so that regmove can optimize cases
+;; where we know the source and destination must match.
+;;
+;; Do not expose this pattern when optimizing for size since we never want
+;; to use lea when optimizing for size since mov+sal is smaller than lea.
+
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r")
+	(ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0,r")
+		   (match_operand:SI 2 "small_shift_operand" "M,M")))]
+  "! optimize_size"
+  "* return output_ashl (insn, operands);")
+
+;; Generic left shift pattern to catch all cases not handled by the
+;; shift pattern above.
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0")
+		   (match_operand:SI 2 "nonmemory_operand" "cI")))]
+  ""
+  "* return output_ashl (insn, operands);")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r")
+	(ashift:HI (match_operand:HI 1 "nonimmediate_operand" "0,r")
+		   (match_operand:HI 2 "small_shift_operand" "M,M")))]
+  "! optimize_size"
+  "* return output_ashl (insn, operands);")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(ashift:HI (match_operand:HI 1 "nonimmediate_operand" "0")
+		   (match_operand:HI 2 "nonmemory_operand" "cI")))]
+  ""
+  "* return output_ashl (insn, operands);")
+
+(define_insn ""
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q,q")
+	(ashift:QI (match_operand:QI 1 "nonimmediate_operand" "0,q")
+		   (match_operand:QI 2 "small_shift_operand" "M,M")))]
+  "! optimize_size"
+  "* return output_ashl (insn, operands);")
+
+;; Generic left shift pattern to catch all cases not handled by the
+;; shift pattern above.
+(define_insn ""
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=q")
+	(ashift:QI (match_operand:QI 1 "nonimmediate_operand" "0")
+		   (match_operand:QI 2 "nonmemory_operand" "cI")))]
+  ""
+  "* return output_ashl (insn, operands);")
+
+;; See comment above `ashldi3' about how this works.
+
+(define_expand "ashrdi3"
+  [(set (match_operand:DI 0 "register_operand" "")
+	(ashiftrt:DI (match_operand:DI 1 "register_operand" "")
+		     (match_operand:QI 2 "nonmemory_operand" "")))]
+  ""
+  "
+{
+  if (GET_CODE (operands[2]) != CONST_INT
+      || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))
+    {
+      operands[2] = copy_to_mode_reg (QImode, operands[2]);
+      emit_insn (gen_ashrdi3_non_const_int (operands[0], operands[1],
+					    operands[2]));
+    }
+  else
+    emit_insn (gen_ashrdi3_const_int (operands[0], operands[1], operands[2]));
+
+  DONE;
+}")
+
+(define_insn "ashldi3_32"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r")
+	(ashift:DI (match_operand:DI 1 "nonimmediate_operand" "r")
+		   (const_int 32)))]
+  ""
+  "*
+{
+  rtx low[2], high[2], xops[4];
+
+  split_di (operands, 2, low, high);
+  xops[0] = high[0];
+  xops[1] = low[1];
+  xops[2] = low[0];
+  xops[3] = const0_rtx;
+  if (!rtx_equal_p (xops[0], xops[1]))
+    output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+
+  if (GET_CODE (low[0]) == MEM)
+    output_asm_insn (AS2 (mov%L2,%3,%2), xops);
+  else
+    output_asm_insn (AS2 (xor%L2,%2,%2), xops);
+
+  RET;
+}")
+
+(define_insn "ashrdi3_const_int"
+  [(set (match_operand:DI 0 "register_operand" "=&r")
+	(ashiftrt:DI (match_operand:DI 1 "register_operand" "0")
+		     (match_operand:QI 2 "const_int_operand" "J")))]
+  "CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')"
+  "*
+{
+  rtx xops[4], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = operands[2];
+  xops[1] = const1_rtx;
+  xops[2] = low[0];
+  xops[3] = high[0];
+
+  if (INTVAL (xops[0]) > 31)
+    {
+      xops[1] = GEN_INT (31);
+      output_asm_insn (AS2 (mov%L2,%3,%2), xops);
+      output_asm_insn (AS2 (sar%L3,%1,%3), xops);	/* shift by 32 */
+
+      if (INTVAL (xops[0]) > 32)
+        {
+	  xops[0] = GEN_INT (INTVAL (xops[0]) - 32);
+	  output_asm_insn (AS2 (sar%L2,%0,%2), xops); /* Remaining shift */
+	}
+    }
+  else
+    {
+      output_asm_insn (AS3 (shrd%L2,%0,%3,%2), xops);
+      output_asm_insn (AS2 (sar%L3,%0,%3), xops);
+    }
+
+  RET;
+}")
+
+(define_insn "ashrdi3_non_const_int"
+  [(set (match_operand:DI 0 "register_operand" "=&r")
+	(ashiftrt:DI (match_operand:DI 1 "register_operand" "0")
+		     (match_operand:QI 2 "register_operand" "c")))]
+  ""
+  "*
+{
+  rtx xops[5], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = operands[2];
+  xops[1] = GEN_INT (32);
+  xops[2] = low[0];
+  xops[3] = high[0];
+  xops[4] = gen_label_rtx ();
+
+  output_asm_insn (AS3_SHIFT_DOUBLE (shrd%L2,%0,%3,%2), xops);
+  output_asm_insn (AS2 (sar%L3,%0,%3), xops);
+  output_asm_insn (AS2 (test%B0,%1,%b0), xops);
+  output_asm_insn (AS1 (je,%X4), xops);
+  xops[1] = GEN_INT (31);
+  output_asm_insn (AS2 (mov%L2,%3,%2), xops);
+  output_asm_insn (AS2 (sar%L3,%1,%3), xops);	/* shift by 32 */
+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
+                             CODE_LABEL_NUMBER (xops[4]));
+  RET;
+}")
+
+(define_insn "ashrsi3_31"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,d")
+	(ashiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0,a")
+		     (const_int 31)))]
+  "!TARGET_PENTIUM || optimize_size"
+  "@
+    sar%L0 $31,%0
+    cltd")
+
+(define_insn "ashrsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(ashiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0")
+		     (match_operand:SI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (sar%L0,%b2,%0);
+  else
+    return AS2 (sar%L0,%2,%0);
+}")
+
+(define_insn "ashrhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(ashiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0")
+		     (match_operand:HI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (sar%W0,%b2,%0);
+  else
+    return AS2 (sar%W0,%2,%0);
+}")
+
+(define_insn "ashrqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
+		     (match_operand:QI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (sar%B0,%b2,%0);
+  else
+    return AS2 (sar%B0,%2,%0);
+}")
+
+;;- logical shift instructions
+
+;; See comment above `ashldi3' about how this works.
+
+(define_expand "lshrdi3"
+  [(set (match_operand:DI 0 "register_operand" "")
+	(lshiftrt:DI (match_operand:DI 1 "register_operand" "")
+		     (match_operand:QI 2 "nonmemory_operand" "")))]
+  ""
+  "
+{
+  if (GET_CODE (operands[2]) != CONST_INT
+      || ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))
+    {
+      operands[2] = copy_to_mode_reg (QImode, operands[2]);
+      emit_insn (gen_lshrdi3_non_const_int (operands[0], operands[1],
+					    operands[2]));
+    }
+  else
+    emit_insn (gen_lshrdi3_const_int (operands[0], operands[1], operands[2]));
+
+  DONE;
+}")
+
+(define_insn "lshrdi3_32"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r")
+	(lshiftrt:DI (match_operand:DI 1 "nonimmediate_operand" "r")
+		     (const_int 32)))]
+  ""
+  "*
+{
+  rtx low[2], high[2], xops[4];
+
+  split_di (operands, 2, low, high);
+  xops[0] = low[0];
+  xops[1] = high[1];
+  xops[2] = high[0];
+  xops[3] = const0_rtx;
+  if (!rtx_equal_p (xops[0], xops[1]))
+    output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+
+  if (GET_CODE (low[0]) == MEM)
+    output_asm_insn (AS2 (mov%L2,%3,%2), xops);
+  else
+    output_asm_insn (AS2 (xor%L2,%2,%2), xops);
+
+  RET;
+}")
+
+(define_insn "lshrdi3_const_int"
+  [(set (match_operand:DI 0 "register_operand" "=&r")
+	(lshiftrt:DI (match_operand:DI 1 "register_operand" "0")
+		     (match_operand:QI 2 "const_int_operand" "J")))]
+  "CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J')"
+  "*
+{
+  rtx xops[4], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = operands[2];
+  xops[1] = const1_rtx;
+  xops[2] = low[0];
+  xops[3] = high[0];
+
+  if (INTVAL (xops[0]) > 31)
+    {
+      output_asm_insn (AS2 (mov%L2,%3,%2), xops);	/* Fast shift by 32 */
+      output_asm_insn (AS2 (xor%L3,%3,%3), xops);
+
+      if (INTVAL (xops[0]) > 32)
+        {
+	  xops[0] = GEN_INT (INTVAL (xops[0]) - 32);
+	  output_asm_insn (AS2 (shr%L2,%0,%2), xops); /* Remaining shift */
+	}
+    }
+  else
+    {
+      output_asm_insn (AS3 (shrd%L2,%0,%3,%2), xops);
+      output_asm_insn (AS2 (shr%L3,%0,%3), xops);
+    }
+
+  RET;
+}")
+
+(define_insn "lshrdi3_non_const_int"
+  [(set (match_operand:DI 0 "register_operand" "=&r")
+	(lshiftrt:DI (match_operand:DI 1 "register_operand" "0")
+		     (match_operand:QI 2 "register_operand" "c")))]
+  ""
+  "*
+{
+  rtx xops[5], low[1], high[1];
+
+  CC_STATUS_INIT;
+
+  split_di (operands, 1, low, high);
+  xops[0] = operands[2];
+  xops[1] = GEN_INT (32);
+  xops[2] = low[0];
+  xops[3] = high[0];
+  xops[4] = gen_label_rtx ();
+
+  output_asm_insn (AS3_SHIFT_DOUBLE (shrd%L2,%0,%3,%2), xops);
+  output_asm_insn (AS2 (shr%L3,%0,%3), xops);
+  output_asm_insn (AS2 (test%B0,%1,%b0), xops);
+  output_asm_insn (AS1 (je,%X4), xops);
+  output_asm_insn (AS2 (mov%L2,%3,%2), xops);	/* Fast shift by 32 */
+  output_asm_insn (AS2 (xor%L3,%3,%3), xops);
+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
+                             CODE_LABEL_NUMBER (xops[4]));
+  RET;
+}")
+
+(define_insn "lshrsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(lshiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0")
+		     (match_operand:SI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (shr%L0,%b2,%0);
+  else
+    return AS2 (shr%L0,%2,%1);
+}")
+
+(define_insn "lshrhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(lshiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0")
+		     (match_operand:HI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (shr%W0,%b2,%0);
+  else
+    return AS2 (shr%W0,%2,%0);
+}")
+
+(define_insn "lshrqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
+		     (match_operand:QI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (shr%B0,%b2,%0);
+  else
+    return AS2 (shr%B0,%2,%0);
+}")
+
+;;- rotate instructions
+
+(define_insn "rotlsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(rotate:SI (match_operand:SI 1 "nonimmediate_operand" "0")
+		   (match_operand:SI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (rol%L0,%b2,%0);
+  else
+    return AS2 (rol%L0,%2,%0);
+}")
+
+(define_insn "rotlhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(rotate:HI (match_operand:HI 1 "nonimmediate_operand" "0")
+		   (match_operand:HI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (rol%W0,%b2,%0);
+  else
+    return AS2 (rol%W0,%2,%0);
+}")
+
+(define_insn "rotlqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(rotate:QI (match_operand:QI 1 "nonimmediate_operand" "0")
+		   (match_operand:QI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (rol%B0,%b2,%0);
+  else
+    return AS2 (rol%B0,%2,%0);
+}")
+
+(define_insn "rotrsi3"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(rotatert:SI (match_operand:SI 1 "nonimmediate_operand" "0")
+		     (match_operand:SI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (ror%L0,%b2,%0);
+  else
+    return AS2 (ror%L0,%2,%0);
+}")
+
+(define_insn "rotrhi3"
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r")
+	(rotatert:HI (match_operand:HI 1 "nonimmediate_operand" "0")
+		     (match_operand:HI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (ror%W0,%b2,%0);
+  else
+    return AS2 (ror%W0,%2,%0);
+}")
+
+(define_insn "rotrqi3"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(rotatert:QI (match_operand:QI 1 "nonimmediate_operand" "0")
+		     (match_operand:QI 2 "nonmemory_operand" "cI")))]
+  ""
+  "*
+{
+  if (REG_P (operands[2]))
+    return AS2 (ror%B0,%b2,%0);
+  else
+    return AS2 (ror%B0,%2,%0);
+}")
+
+/*
+;; This usually looses.  But try a define_expand to recognize a few case
+;; we can do efficiently, such as accessing the "high" QImode registers,
+;; %ah, %bh, %ch, %dh.
+;; ??? Note this has a botch on the mode of operand 0, which needs to be
+;; fixed if this is ever enabled.
+(define_insn "insv"
+  [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+&r")
+			 (match_operand:SI 1 "immediate_operand" "i")
+			 (match_operand:SI 2 "immediate_operand" "i"))
+	(match_operand:SI 3 "nonmemory_operand" "ri"))]
+  ""
+  "*
+{
+  if (INTVAL (operands[1]) + INTVAL (operands[2]) > GET_MODE_BITSIZE (SImode))
+    abort ();
+  if (GET_CODE (operands[3]) == CONST_INT)
+    {
+      unsigned int mask = (1 << INTVAL (operands[1])) - 1; 
+      operands[1] = GEN_INT (~(mask << INTVAL (operands[2])));
+      output_asm_insn (AS2 (and%L0,%1,%0), operands);
+      operands[3] = GEN_INT (INTVAL (operands[3]) << INTVAL (operands[2]));
+      output_asm_insn (AS2 (or%L0,%3,%0), operands);
+    }
+  else
+    {
+      operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]));
+      if (INTVAL (operands[2]))
+	output_asm_insn (AS2 (ror%L0,%2,%0), operands);
+      output_asm_insn (AS3 (shrd%L0,%1,%3,%0), operands);
+      operands[2] = GEN_INT (BITS_PER_WORD
+			     - INTVAL (operands[1]) - INTVAL (operands[2]));
+      if (INTVAL (operands[2]))
+	output_asm_insn (AS2 (ror%L0,%2,%0), operands);
+    }
+  RET;
+}")
+*/
+/*
+;; ??? There are problems with the mode of operand[3].  The point of this
+;; is to represent an HImode move to a "high byte" register.
+
+(define_expand "insv"
+  [(set (zero_extract:SI (match_operand:SI 0 "general_operand" "")
+			 (match_operand:SI 1 "immediate_operand" "")
+			 (match_operand:SI 2 "immediate_operand" ""))
+	(match_operand:QI 3 "nonmemory_operand" "ri"))]
+  ""
+  "
+{
+  if (GET_CODE (operands[1]) != CONST_INT
+      || GET_CODE (operands[2]) != CONST_INT)
+    FAIL;
+
+  if (! (INTVAL (operands[1]) == 8
+	 && (INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 0))
+      && ! INTVAL (operands[1]) == 1)
+    FAIL;
+}")
+*/
+
+;; On i386, the register count for a bit operation is *not* truncated,
+;; so SHIFT_COUNT_TRUNCATED must not be defined.
+
+;; On i486, the shift & or/and code is faster than bts or btr.  If
+;; operands[0] is a MEM, the bt[sr] is half as fast as the normal code.
+
+;; On i386, bts is a little faster if operands[0] is a reg, and a
+;; little slower if operands[0] is a MEM, than the shift & or/and code.
+;; Use bts & btr, since they reload better.
+
+;; General bit set and clear.
+(define_insn ""
+  [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r")
+			 (const_int 1)
+			 (match_operand:SI 2 "register_operand" "r"))
+	(match_operand:SI 3 "const_int_operand" "n"))]
+  "TARGET_USE_BIT_TEST && GET_CODE (operands[2]) != CONST_INT"
+  "*
+{
+  CC_STATUS_INIT;
+
+  if (INTVAL (operands[3]) == 1)
+    return AS2 (bts%L0,%2,%0);
+  else
+    return AS2 (btr%L0,%2,%0);
+}")
+
+;; Bit complement.  See comments on previous pattern.
+;; ??? Is this really worthwhile?
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(xor:SI (ashift:SI (const_int 1)
+			   (match_operand:SI 1 "register_operand" "r"))
+		(match_operand:SI 2 "nonimmediate_operand" "0")))]
+  "TARGET_USE_BIT_TEST && GET_CODE (operands[1]) != CONST_INT"
+  "*
+{
+  CC_STATUS_INIT;
+
+  return AS2 (btc%L0,%1,%0);
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r")
+	(xor:SI (match_operand:SI 1 "nonimmediate_operand" "0")
+		(ashift:SI (const_int 1)
+			   (match_operand:SI 2 "register_operand" "r"))))]
+  "TARGET_USE_BIT_TEST && GET_CODE (operands[2]) != CONST_INT"
+  "*
+{
+  CC_STATUS_INIT;
+
+  return AS2 (btc%L0,%2,%0);
+}")
+
+;; Recognizers for bit-test instructions.
+
+;; The bt opcode allows a MEM in operands[0].  But on both i386 and
+;; i486, it is faster to copy a MEM to REG and then use bt, than to use
+;; bt on the MEM directly.
+
+;; ??? The first argument of a zero_extract must not be reloaded, so
+;; don't allow a MEM in the operand predicate without allowing it in the
+;; constraint.
+
+(define_insn ""
+  [(set (cc0) (zero_extract (match_operand:SI 0 "register_operand" "r")
+			    (const_int 1)
+			    (match_operand:SI 1 "register_operand" "r")))]
+  "GET_CODE (operands[1]) != CONST_INT"
+  "*
+{
+  cc_status.flags |= CC_Z_IN_NOT_C;
+  return AS2 (bt%L0,%1,%0);
+}")
+
+(define_insn ""
+  [(set (cc0) (zero_extract (match_operand:SI 0 "register_operand" "r")
+			    (match_operand:SI 1 "const_int_operand" "n")
+			    (match_operand:SI 2 "const_int_operand" "n")))]
+  ""
+  "*
+{
+  unsigned int mask;
+
+  mask = ((1 << INTVAL (operands[1])) - 1) << INTVAL (operands[2]);
+  operands[1] = GEN_INT (mask);
+
+  if (QI_REG_P (operands[0])
+      /* A Pentium test is pairable only with eax. Not with ah or al.  */
+      && (! REG_P (operands[0]) || REGNO (operands[0]) || !TARGET_PENTIUM
+          || optimize_size))
+    {
+      if ((mask & ~0xff) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  return AS2 (test%B0,%1,%b0);
+	}
+
+      if ((mask & ~0xff00) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  operands[1] = GEN_INT (mask >> 8);
+	  return AS2 (test%B0,%1,%h0);
+	}
+    }
+
+  return AS2 (test%L0,%1,%0);
+}")
+
+;; ??? All bets are off if operand 0 is a volatile MEM reference.
+;; The CPU may access unspecified bytes around the actual target byte.
+;; lcs -- fix this!
+(define_insn ""
+  [(set (cc0) (zero_extract (match_operand:QI 0 "memory_operand" "m")
+			    (match_operand:SI 1 "const_int_operand" "n")
+			    (match_operand:SI 2 "const_int_operand" "n")))]
+  "GET_CODE (operands[0]) != MEM || ! MEM_VOLATILE_P (operands[0])"
+  "*
+{
+  unsigned int mask;
+
+  mask = ((1 << INTVAL (operands[1])) - 1) << INTVAL (operands[2]);
+  operands[1] = GEN_INT (mask);
+
+  if ((! REG_P (operands[0]) || QI_REG_P (operands[0]))
+      /* A Pentium test is pairable only with eax. Not with ah or al.  */
+      && (! REG_P (operands[0]) || REGNO (operands[0]) || !TARGET_PENTIUM
+          || optimize_size))
+    {
+      if ((mask & ~0xff) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  return AS2 (test%B0,%1,%b0);
+	}
+
+      if ((mask & ~0xff00) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  operands[1] = GEN_INT (mask >> 8);
+
+	  if (QI_REG_P (operands[0]))
+	    return AS2 (test%B0,%1,%h0);
+	  else
+	    {
+	      operands[0] = adj_offsettable_operand (operands[0], 1);
+	      return AS2 (test%B0,%1,%b0);
+	    }
+	}
+
+      if (GET_CODE (operands[0]) == MEM && (mask & ~0xff0000) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  operands[1] = GEN_INT (mask >> 16);
+	  operands[0] = adj_offsettable_operand (operands[0], 2);
+	  return AS2 (test%B0,%1,%b0);
+	}
+
+      if (GET_CODE (operands[0]) == MEM && (mask & ~0xff000000) == 0)
+        {
+	  cc_status.flags |= CC_NOT_NEGATIVE;
+	  operands[1] = GEN_INT (mask >> 24);
+	  operands[0] = adj_offsettable_operand (operands[0], 3);
+	  return AS2 (test%B0,%1,%b0);
+	}
+    }
+
+  if (CONSTANT_P (operands[1]) || GET_CODE (operands[0]) == MEM)
+    return AS2 (test%L0,%1,%0);
+
+  return AS2 (test%L1,%0,%1);
+}")
+
+;; Store-flag instructions.
+
+;; For all sCOND expanders, also expand the compare or test insn that
+;; generates cc0.  Generate an equality comparison if `seq' or `sne'.
+
+(define_expand "seq"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(eq:QI (cc0) (const_int 0)))]
+  ""
+  "
+{
+  if (TARGET_IEEE_FP
+      && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT)
+    operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1);
+  else
+    operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);
+}")
+
+(define_expand "sne"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(ne:QI (cc0) (const_int 0)))]
+  ""
+  "
+{
+  if (TARGET_IEEE_FP
+      && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT)
+    operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1);
+  else
+    operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);
+}")
+
+(define_expand "sgt"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(gt:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "sgtu"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(gtu:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "slt"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(lt:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "sltu"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(ltu:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "sge"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(ge:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "sgeu"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(geu:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "sle"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(le:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "sleu"
+  [(match_dup 1)
+   (set (match_operand:QI 0 "register_operand" "")
+	(leu:QI (cc0) (const_int 0)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+;; The 386 sCOND opcodes can write to memory.  But a gcc sCOND insn may
+;; not have any input reloads.  A MEM write might need an input reload
+;; for the address of the MEM.  So don't allow MEM as the SET_DEST.
+
+(define_insn "*setcc"
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
+	(match_operator:QI 1 "comparison_operator" [(cc0) (const_int 0)]))]
+  "reload_completed || register_operand (operands[0], QImode)"
+  "*
+{
+  enum rtx_code code = GET_CODE (operands[1]);
+  if (cc_prev_status.flags & CC_TEST_AX)
+    {
+      int eq;
+      HOST_WIDE_INT c;
+      operands[2] = gen_rtx_REG (SImode, 0);
+      switch (code)
+	{
+	case EQ:
+	  c = 0x4000;
+	  eq = 0;
+	  break;
+	case NE:
+	  c = 0x4000;
+	  eq = 1;
+	  break;
+	case GT:
+	  c = 0x4100;
+	  eq = 1;
+	  break;
+	case LT:
+	  c = 0x100;
+	  eq = 0;
+	  break;
+	case GE:
+	  c = 0x100;
+	  eq = 1;
+	  break;
+	case LE:
+	  c = 0x4100;
+	  eq = 0;
+	  break;
+	default:
+	  abort ();
+	}
+      if (!TARGET_PENTIUM || optimize_size)
+        {
+          operands[3] = GEN_INT (c >> 8);
+          output_asm_insn (AS2 (test%B0,%3,%h2), operands);
+        }
+      else
+        {
+          operands[3] = GEN_INT (c);
+          output_asm_insn (AS2 (test%L0,%3,%2), operands);
+        }
+      return eq ? AS1 (sete,%0) : AS1 (setne, %0);
+    }
+
+  if ((cc_status.flags & CC_NO_OVERFLOW) && (code == LE || code == GT))
+    return (char *)0;
+  return AS1(set%D1,%0);
+}")
+
+
+;; Basic conditional jump instructions.
+;; We ignore the overflow flag for signed branch instructions.
+
+;; For all bCOND expanders, also expand the compare or test insn that
+;; generates cc0.  Generate an equality comparison if `beq' or `bne'.
+
+(define_expand "beq"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (eq (cc0)
+			  (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "
+{
+  if (TARGET_IEEE_FP
+      && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT)
+    operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1);
+  else
+    operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);
+}")
+
+(define_expand "bne"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (ne (cc0)
+			  (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "
+{
+  if (TARGET_IEEE_FP
+      && GET_MODE_CLASS (GET_MODE (i386_compare_op0)) == MODE_FLOAT)
+    operands[1] = (*i386_compare_gen_eq)(i386_compare_op0, i386_compare_op1);
+  else
+    operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);
+}")
+
+
+(define_expand "bgt"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (gt (cc0)
+			  (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "bgtu"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (gtu (cc0)
+			   (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "blt"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (lt (cc0)
+			  (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+
+(define_expand "bltu"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (ltu (cc0)
+			   (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "bge"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (ge (cc0)
+			  (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "bgeu"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (geu (cc0)
+			   (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "ble"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (le (cc0)
+			  (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_expand "bleu"
+  [(match_dup 1)
+   (set (pc)
+	(if_then_else (leu (cc0)
+			   (const_int 0))
+		      (label_ref (match_operand 0 "" ""))
+		      (pc)))]
+  ""
+  "operands[1] = (*i386_compare_gen)(i386_compare_op0, i386_compare_op1);")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (match_operator 0 "comparison_operator"
+				      [(cc0) (const_int 0)])
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))]
+  ""
+  "*
+{
+  enum rtx_code code = GET_CODE (operands[0]);
+  if (cc_prev_status.flags & CC_TEST_AX)
+    {
+      int eq;
+      HOST_WIDE_INT c;
+      operands[2] = gen_rtx_REG (SImode, 0);
+      switch (code)
+	{
+	case EQ:
+	  c = 0x4000;
+	  eq = 0;
+	  break;
+	case NE:
+	  c = 0x4000;
+	  eq = 1;
+	  break;
+	case GT:
+	  c = 0x4100;
+	  eq = 1;
+	  break;
+	case LT:
+	  c = 0x100;
+	  eq = 0;
+	  break;
+	case GE:
+	  c = 0x100;
+	  eq = 1;
+	  break;
+	case LE:
+	  c = 0x4100;
+	  eq = 0;
+	  break;
+	default:
+	  abort ();
+	}
+      if (!TARGET_PENTIUM || optimize_size)
+        {
+          operands[3] = GEN_INT (c >> 8);
+          output_asm_insn (AS2 (test%B0,%3,%h2), operands);
+        }
+      else
+        {
+          operands[3] = GEN_INT (c);
+          output_asm_insn (AS2 (test%L0,%3,%2), operands);
+        }
+      return eq ? AS1 (je,%l1) : AS1 (jne, %l1);
+    }
+  if ((cc_status.flags & CC_NO_OVERFLOW) && (code == LE || code == GT))
+    return (char *)0;
+
+  return AS1(j%D0,%l1);
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (match_operator 0 "comparison_operator"
+				      [(cc0) (const_int 0)])
+		      (pc)
+		      (label_ref (match_operand 1 "" ""))))]
+  ""
+  "*
+{
+  enum rtx_code code = GET_CODE (operands[0]);
+  if (cc_prev_status.flags & CC_TEST_AX)
+    {
+      int eq;
+      HOST_WIDE_INT c;
+      operands[2] = gen_rtx_REG (SImode, 0);
+      switch (code)
+	{
+	case EQ:
+	  c = 0x4000;
+	  eq = 1;
+	  break;
+	case NE:
+	  c = 0x4000;
+	  eq = 0;
+	  break;
+	case GT:
+	  c = 0x4100;
+	  eq = 0;
+	  break;
+	case LT:
+	  c = 0x100;
+	  eq = 1;
+	  break;
+	case GE:
+	  c = 0x100;
+	  eq = 0;
+	  break;
+	case LE:
+	  c = 0x4100;
+	  eq = 1;
+	  break;
+	default:
+	  abort ();
+	}
+      if (!TARGET_PENTIUM || optimize_size)
+        {
+          operands[3] = GEN_INT (c >> 8);
+          output_asm_insn (AS2 (test%B0,%3,%h2), operands);
+        }
+      else
+        {
+          operands[3] = GEN_INT (c);
+          output_asm_insn (AS2 (test%L0,%3,%2), operands);
+        }
+      return eq ? AS1 (je,%l1) : AS1 (jne, %l1);
+    }
+  if ((cc_status.flags & CC_NO_OVERFLOW) && (code == LE || code == GT))
+    return (char *)0;
+
+  return AS1(j%d0,%l1);
+}")
+
+;; Unconditional and other jump instructions
+
+(define_insn "jump"
+  [(set (pc)
+	(label_ref (match_operand 0 "" "")))]
+  ""
+  "jmp %l0"
+  [(set_attr "memory" "none")])
+
+(define_insn "indirect_jump"
+  [(set (pc) (match_operand:SI 0 "nonimmediate_operand" "r"))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+
+  return AS1 (jmp,%*%0);
+}"
+  [(set_attr "memory" "none")])
+
+;; ??? could transform while(--i > 0) S; to if (--i > 0) do S; while(--i);
+;;     if S does not change i
+
+(define_expand "decrement_and_branch_until_zero"
+  [(parallel [(set (pc)
+		   (if_then_else (ge (plus:SI (match_operand:SI 0 "general_operand" "")
+					      (const_int -1))
+				     (const_int 0))
+				 (label_ref (match_operand 1 "" ""))
+				 (pc)))
+	      (set (match_dup 0)
+		   (plus:SI (match_dup 0)
+			    (const_int -1)))])]
+  ""
+  "")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (match_operator 0 "arithmetic_comparison_operator"
+				      [(plus:SI (match_operand:SI 1 "nonimmediate_operand" "+c*r,!m")
+						(match_operand:SI 2 "general_operand" "ri,ri"))
+				       (const_int 0)])
+		      (label_ref (match_operand 3 "" ""))
+		      (pc)))
+   (set (match_dup 1)
+	(plus:SI (match_dup 1)
+		 (match_dup 2)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+
+  if (GET_CODE (operands[1]) == REG && REGNO (operands[2]) == 2 &&
+      operands[2] == constm1_rtx && ix86_cpu == PROCESSOR_K6)
+    return \"loop %l3\";
+
+  if (GET_CODE (operands[1]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[1], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[1], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[1], 0), 0) ) == 0 ) ) )
+    {
+      operands[4] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[4] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L1,%4,%1), operands);
+    output_asm_insn (AS1 (bswap,%4), operands);
+    
+    if (operands[2] == constm1_rtx)
+      output_asm_insn (AS1 (dec%L4,%4), operands);
+
+    else if (operands[2] == const1_rtx)
+      output_asm_insn (AS1 (inc%L4,%4), operands);
+
+    else
+      output_asm_insn (AS2 (add%L4,%2,%4), operands);
+
+    output_asm_insn (AS1 (bswap,%4), operands);
+    output_asm_insn (AS2 (xchg%L1,%4,%1), operands);
+  }
+  else
+  {
+    if (operands[2] == constm1_rtx)
+      output_asm_insn (AS1 (dec%L1,%1), operands);
+
+    else if (operands[2] == const1_rtx)
+      output_asm_insn (AS1 (inc%L1,%1), operands);
+
+    else
+      output_asm_insn (AS2 (add%L1,%2,%1), operands);
+  }
+
+  return AS1 (%J0,%l3);
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (match_operator 0 "arithmetic_comparison_operator"
+				      [(minus:SI (match_operand:SI 1 "nonimmediate_operand" "+r,!m")
+						 (match_operand:SI 2 "general_operand" "ri,ri"))
+				       (const_int 0)])
+		      (label_ref (match_operand 3 "" ""))
+		      (pc)))
+   (set (match_dup 1)
+	(minus:SI (match_dup 1)
+		  (match_dup 2)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+
+  if (GET_CODE (operands[1]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[1], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[1], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[1], 0), 0) ) == 0 ) ) )
+    {
+      operands[4] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[4] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L1,%4,%1), operands);
+    output_asm_insn (AS1 (bswap,%4), operands);
+    
+    if (operands[2] == const1_rtx)
+      output_asm_insn (AS1 (dec%L4,%4), operands);
+
+    else if (operands[2] == constm1_rtx)
+      output_asm_insn (AS1 (inc%L4,%4), operands);
+
+    else
+      output_asm_insn (AS2 (sub%L4,%2,%4), operands);
+    
+    output_asm_insn (AS1 (bswap,%4), operands);
+    output_asm_insn (AS2 (xchg%L1,%4,%1), operands);
+  }
+  else
+  {
+    if (operands[2] == const1_rtx)
+      output_asm_insn (AS1 (dec%L1,%1), operands);
+
+    // lcs: the following was '(operands[1] == constm1_rtx)' ??!
+    else if (operands[2] == constm1_rtx)
+      output_asm_insn (AS1 (inc%L1,%1), operands);
+
+    else
+      output_asm_insn (AS2 (sub%L1,%2,%1), operands);
+  }
+
+  return AS1 (%J0,%l3);
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (ne (match_operand:SI 0 "general_operand" "+r,!g")
+			  (const_int 0))
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))
+   (set (match_dup 0)
+	(plus:SI (match_dup 0)
+		 (const_int -1)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+  operands[2] = const1_rtx;
+  if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) )
+    {
+      operands[3] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[3] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (sub%L3,%2,%3), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+  }
+  else
+  {
+    output_asm_insn (AS2 (sub%L0,%2,%0), operands);
+  }
+  return \"jnc %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (eq (match_operand:SI 0 "general_operand" "+r,!g")
+			  (const_int 0))
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))
+   (set (match_dup 0)
+	(plus:SI (match_dup 0)
+		 (const_int -1)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+  operands[2] = const1_rtx;
+  if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) )
+    {
+      operands[3] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[3] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (sub%L3,%2,%3), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+  }
+  else
+  {
+    output_asm_insn (AS2 (sub%L0,%2,%0), operands);
+  }
+  return \"jc %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (ne (match_operand:SI 0 "general_operand" "+r,!g")
+			  (const_int 1))
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))
+   (set (match_dup 0)
+	(plus:SI (match_dup 0)
+		 (const_int -1)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+  if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) )
+    {
+      operands[3] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[3] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS1 (dec%L3,%3), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+  }
+  else
+  {
+    output_asm_insn (AS1 (dec%L0,%0), operands);
+  }
+  return \"jnz %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (eq (match_operand:SI 0 "general_operand" "+r,!g")
+			  (const_int 1))
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))
+   (set (match_dup 0)
+	(plus:SI (match_dup 0)
+		 (const_int -1)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+  if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) )
+    {
+      operands[3] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[3] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS1 (dec%L3,%3), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+  }
+  else
+  {
+    output_asm_insn (AS1 (dec%L0,%0), operands);
+  }
+  return \"jz %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (ne (match_operand:SI 0 "general_operand" "+r,!g")
+			  (const_int -1))
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))
+   (set (match_dup 0)
+	(plus:SI (match_dup 0)
+		 (const_int 1)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+  if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) )
+    {
+      operands[3] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[3] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS1 (inc%L3,%3), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+  }
+  else
+  {
+    output_asm_insn (AS1 (inc%L0,%0), operands);
+  }
+  return \"jnz %l1\";
+}")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else (eq (match_operand:SI 0 "general_operand" "+r,!g")
+			  (const_int -1))
+		      (label_ref (match_operand 1 "" ""))
+		      (pc)))
+   (set (match_dup 0)
+	(plus:SI (match_dup 0)
+		 (const_int 1)))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+  if (GET_CODE (operands[0]) == MEM)
+  {
+    if (GET_CODE( XEXP( operands[0], 0 ) ) == PLUS &&
+	( ( REG_P( XEXP( XEXP( operands[0], 0), 0) ) &&
+	    REGNO( XEXP( XEXP( operands[0], 0), 0) ) == 0 ) ) )
+    {
+      operands[3] = gen_rtx_REG (SImode, 1); // edx
+    }
+    else
+    {
+      operands[3] = gen_rtx_REG (SImode, 0); // eax
+    }
+
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS1 (inc%L3,%3), operands);
+    output_asm_insn (AS1 (bswap,%3), operands);
+    output_asm_insn (AS2 (xchg%L0,%3,%0), operands);
+  }
+  else
+  {
+    output_asm_insn (AS1 (inc%L0,%0), operands);
+  }
+  return \"jz %l1\";
+}")
+
+;; Implement switch statements when generating PIC code.  Switches are
+;; implemented by `tablejump' when not using -fpic.
+
+;; Emit code here to do the range checking and make the index zero based.
+
+(define_expand "casesi"
+  [(set (match_dup 5)
+	(match_operand:SI 0 "general_operand" ""))
+   (set (match_dup 6)
+	(minus:SI (match_dup 5)
+		  (match_operand:SI 1 "general_operand" "")))
+   (set (cc0)
+	(compare:CC (match_dup 6)
+		    (match_operand:SI 2 "general_operand" "")))
+   (set (pc)
+	(if_then_else (gtu (cc0)
+			   (const_int 0))
+		      (label_ref (match_operand 4 "" ""))
+		      (pc)))
+   (parallel
+    [(set (pc)
+	  (minus:SI (reg:SI 3)
+		    (mem:SI (plus:SI (mult:SI (match_dup 6)
+					      (const_int 4))
+				     (label_ref (match_operand 3 "" ""))))))
+     (clobber (match_scratch:SI 7 ""))])]
+  "flag_pic"
+  "
+{
+  operands[5] = gen_reg_rtx (SImode);
+  operands[6] = gen_reg_rtx (SImode);
+  current_function_uses_pic_offset_table = 1;
+}")
+
+;; Implement a casesi insn.
+
+;; Each entry in the "addr_diff_vec" looks like this as the result of the
+;; two rules below:
+;; 
+;; 	.long _GLOBAL_OFFSET_TABLE_+[.-.L2]
+;; 
+;; 1. An expression involving an external reference may only use the
+;;    addition operator, and only with an assembly-time constant.
+;;    The example above satisfies this because ".-.L2" is a constant.
+;; 
+;; 2. The symbol _GLOBAL_OFFSET_TABLE_ is magic, and at link time is
+;;    given the value of "GOT - .", where GOT is the actual address of
+;;    the Global Offset Table.  Therefore, the .long above actually
+;;    stores the value "( GOT - . ) + [ . - .L2 ]", or "GOT - .L2".  The
+;;    expression "GOT - .L2" by itself would generate an error from as(1).
+;; 
+;; The pattern below emits code that looks like this:
+;; 
+;; 	movl %ebx,reg
+;; 	subl TABLE@GOTOFF(%ebx,index,4),reg
+;; 	jmp reg
+;; 
+;; The addr_diff_vec contents may be directly referenced with @GOTOFF, since
+;; the addr_diff_vec is known to be part of this module.
+;; 
+;; The subl above calculates "GOT - (( GOT - . ) + [ . - .L2 ])", which
+;; evaluates to just ".L2".
+
+(define_insn ""
+  [(set (pc)
+	(minus:SI (reg:SI 3)
+		  (mem:SI (plus:SI
+			   (mult:SI (match_operand:SI 0 "register_operand" "r")
+				    (const_int 4))
+			   (label_ref (match_operand 1 "" ""))))))
+   (clobber (match_scratch:SI 2 "=&r"))]
+  ""
+  "*
+{
+  rtx xops[4];
+
+  xops[0] = operands[0];
+  xops[1] = operands[1];
+  xops[2] = operands[2];
+  xops[3] = pic_offset_table_rtx;
+//lcs -- fix this
+  output_asm_insn (AS2 (mov%L2,%3,%2), xops);
+  output_asm_insn (\"sub%L2 %l1@GOTOFF(%3,%0,4),%2\", xops);
+  output_asm_insn (AS1 (jmp,%*%2), xops);
+  ASM_OUTPUT_ALIGN (asm_out_file, i386_align_jumps);
+  RET;
+}")
+
+(define_insn "tablejump"
+  [(set (pc) (match_operand:SI 0 "nonimmediate_operand" "r"))
+   (use (label_ref (match_operand 1 "" "")))]
+  ""
+  "*
+{
+  CC_STATUS_INIT;
+
+  return AS1 (jmp,%*%0);
+}")
+
+;; Call insns.
+
+;; If generating PIC code, the predicate indirect_operand will fail
+;; for operands[0] containing symbolic references on all of the named
+;; call* patterns.  Each named pattern is followed by an unnamed pattern
+;; that matches any call to a symbolic CONST (ie, a symbol_ref).  The
+;; unnamed patterns are only used while generating PIC code, because
+;; otherwise the named patterns match.
+
+;; Call subroutine returning no value.
+
+(define_expand "call_pop"
+  [(parallel [(call (match_operand:QI 0 "indirect_operand" "")
+		    (match_operand:SI 1 "general_operand" ""))
+	      (set (reg:SI 7)
+		   (plus:SI (reg:SI 7)
+			    (match_operand:SI 3 "immediate_operand" "")))])]
+  ""
+  "
+{
+  rtx addr;
+
+  if (operands[3] == const0_rtx)
+    {
+      emit_insn (gen_call (operands[0], operands[1]));
+      DONE;
+    }
+
+  if (flag_pic)
+    current_function_uses_pic_offset_table = 1;
+
+  /* With half-pic, force the address into a register.  */
+  addr = XEXP (operands[0], 0);
+  if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr))
+    XEXP (operands[0], 0) = force_reg (Pmode, addr);
+
+  if (! expander_call_insn_operand (operands[0], QImode))
+    operands[0]
+      = change_address (operands[0], VOIDmode,
+			copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(call (match_operand:QI 0 "call_insn_operand" "m")
+	 (match_operand:SI 1 "general_operand" "g"))
+   (set (reg:SI 7) (plus:SI (reg:SI 7)
+			    (match_operand:SI 3 "immediate_operand" "i")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[0]) == MEM
+      && ! CONSTANT_ADDRESS_P (XEXP (operands[0], 0)))
+    {
+      operands[0] = XEXP (operands[0], 0);
+      return AS1 (call,%*%0);
+    }
+  else
+    return AS1 (call,%P0);
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(call (mem:QI (match_operand:SI 0 "symbolic_operand" ""))
+	 (match_operand:SI 1 "general_operand" "g"))
+   (set (reg:SI 7) (plus:SI (reg:SI 7)
+			    (match_operand:SI 3 "immediate_operand" "i")))]
+  "!HALF_PIC_P ()"
+  "call %P0")
+
+(define_expand "call"
+  [(call (match_operand:QI 0 "indirect_operand" "")
+	 (match_operand:SI 1 "general_operand" ""))]
+  ;; Operand 1 not used on the i386.
+  ""
+  "
+{
+  rtx addr;
+
+  if (flag_pic)
+    current_function_uses_pic_offset_table = 1;
+
+  /* With half-pic, force the address into a register.  */
+  addr = XEXP (operands[0], 0);
+  if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr))
+    XEXP (operands[0], 0) = force_reg (Pmode, addr);
+
+  if (! expander_call_insn_operand (operands[0], QImode))
+    operands[0]
+      = change_address (operands[0], VOIDmode,
+			copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(call (match_operand:QI 0 "call_insn_operand" "m")
+	 (match_operand:SI 1 "general_operand" "g"))]
+  ;; Operand 1 not used on the i386.
+  ""
+  "*
+{
+  if (GET_CODE (operands[0]) == MEM
+      && ! CONSTANT_ADDRESS_P (XEXP (operands[0], 0)))
+    {
+      operands[0] = XEXP (operands[0], 0);
+      return AS1 (call,%*%0);
+    }
+  else
+    return AS1 (call,%P0);
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(call (mem:QI (match_operand:SI 0 "symbolic_operand" ""))
+	 (match_operand:SI 1 "general_operand" "g"))]
+  ;; Operand 1 not used on the i386.
+  "!HALF_PIC_P ()"
+  "call %P0")
+
+;; Call subroutine, returning value in operand 0
+;; (which must be a hard register).
+
+(define_expand "call_value_pop"
+  [(parallel [(set (match_operand 0 "" "")
+		   (call (match_operand:QI 1 "indirect_operand" "")
+			 (match_operand:SI 2 "general_operand" "")))
+	      (set (reg:SI 7)
+		   (plus:SI (reg:SI 7)
+			    (match_operand:SI 4 "immediate_operand" "")))])]
+  ""
+  "
+{
+  rtx addr;
+
+  if (operands[4] == const0_rtx)
+    {
+      emit_insn (gen_call_value (operands[0], operands[1], operands[2]));
+      DONE;
+    }
+
+  if (flag_pic)
+    current_function_uses_pic_offset_table = 1;
+
+  /* With half-pic, force the address into a register.  */
+  addr = XEXP (operands[1], 0);
+  if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr))
+    XEXP (operands[1], 0) = force_reg (Pmode, addr);
+
+  if (! expander_call_insn_operand (operands[1], QImode))
+    operands[1]
+      = change_address (operands[1], VOIDmode,
+			copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(set (match_operand 0 "" "=rf")
+	(call (match_operand:QI 1 "call_insn_operand" "m")
+	      (match_operand:SI 2 "general_operand" "g")))
+   (set (reg:SI 7) (plus:SI (reg:SI 7)
+			    (match_operand:SI 4 "immediate_operand" "i")))]
+  ""
+  "*
+{
+  if (GET_CODE (operands[1]) == MEM
+      && ! CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
+    {
+      operands[1] = XEXP (operands[1], 0);
+      output_asm_insn (AS1 (call,%*%1), operands);
+    }
+  else
+    output_asm_insn (AS1 (call,%P1), operands);
+
+  RET;
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(set (match_operand 0 "" "=rf")
+	(call (mem:QI (match_operand:SI 1 "symbolic_operand" ""))
+	      (match_operand:SI 2 "general_operand" "g")))
+   (set (reg:SI 7) (plus:SI (reg:SI 7)
+			    (match_operand:SI 4 "immediate_operand" "i")))]
+  "!HALF_PIC_P ()"
+  "call %P1")
+
+(define_expand "call_value"
+  [(set (match_operand 0 "" "")
+	(call (match_operand:QI 1 "indirect_operand" "")
+	      (match_operand:SI 2 "general_operand" "")))]
+  ;; Operand 2 not used on the i386.
+  ""
+  "
+{
+  rtx addr;
+
+  if (flag_pic)
+    current_function_uses_pic_offset_table = 1;
+
+  /* With half-pic, force the address into a register.  */
+  addr = XEXP (operands[1], 0);
+  if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr))
+    XEXP (operands[1], 0) = force_reg (Pmode, addr);
+
+  if (! expander_call_insn_operand (operands[1], QImode))
+    operands[1]
+      = change_address (operands[1], VOIDmode,
+			copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(set (match_operand 0 "" "=rf")
+	(call (match_operand:QI 1 "call_insn_operand" "m")
+	      (match_operand:SI 2 "general_operand" "g")))]
+  ;; Operand 2 not used on the i386.
+  ""
+  "*
+{
+  if (GET_CODE (operands[1]) == MEM
+      && ! CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
+    {
+      operands[1] = XEXP (operands[1], 0);
+      output_asm_insn (AS1 (call,%*%1), operands);
+    }
+  else
+    output_asm_insn (AS1 (call,%P1), operands);
+
+  RET;
+}")
+;;lcs -- don't know
+(define_insn ""
+  [(set (match_operand 0 "" "=rf")
+	(call (mem:QI (match_operand:SI 1 "symbolic_operand" ""))
+	      (match_operand:SI 2 "general_operand" "g")))]
+  ;; Operand 2 not used on the i386.
+  "!HALF_PIC_P ()"
+  "call %P1")
+
+;; Call subroutine returning any type.
+
+(define_expand "untyped_call"
+  [(parallel [(call (match_operand 0 "" "")
+		    (const_int 0))
+	      (match_operand 1 "" "")
+	      (match_operand 2 "" "")])]
+  ""
+  "
+{
+  int i;
+
+  /* In order to give reg-stack an easier job in validating two
+     coprocessor registers as containing a possible return value,
+     simply pretend the untyped call returns a complex long double
+     value.  */
+
+  emit_call_insn (TARGET_80387
+                  ? gen_call_value (gen_rtx_REG (XCmode, FIRST_FLOAT_REG),
+				    operands[0], const0_rtx)
+                  : gen_call (operands[0], const0_rtx));
+
+  for (i = 0; i < XVECLEN (operands[2], 0); i++)
+    {
+      rtx set = XVECEXP (operands[2], 0, i);
+      emit_move_insn (SET_DEST (set), SET_SRC (set));
+    }
+
+  /* The optimizer does not know that the call sets the function value
+     registers we stored in the result block.  We avoid problems by
+     claiming that all hard registers are used and clobbered at this
+     point.  */
+  emit_insn (gen_blockage ());
+
+  DONE;
+}")
+
+;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
+;; all of memory.  This blocks insns from being moved across this point.
+
+(define_insn "blockage"
+  [(unspec_volatile [(const_int 0)] 0)]
+  ""
+  ""
+  [(set_attr "memory" "none")])
+
+;; Insn emitted into the body of a function to return from a function.
+;; This is only done if the function's epilogue is known to be simple.
+;; See comments for simple_386_epilogue in i386.c.
+
+(define_expand "return"
+  [(return)]
+  "ix86_can_use_return_insn_p ()"
+  "")
+
+(define_insn "return_internal"
+  [(return)]
+  "reload_completed"
+  "ret"
+  [(set_attr "memory" "none")])
+
+(define_insn "return_pop_internal"
+  [(return)
+   (use (match_operand:SI 0 "const_int_operand" ""))]
+  "reload_completed"
+  "ret %0"
+  [(set_attr "memory" "none")])
+
+(define_insn "nop"
+  [(const_int 0)]
+  ""
+  "nop"
+  [(set_attr "memory" "none")])
+
+(define_expand "prologue"
+  [(const_int 1)]
+  ""
+  "
+{
+  ix86_expand_prologue ();
+  DONE;
+}")
+
+;; The use of UNSPEC here is currently not necessary - a simple SET of ebp
+;; to itself would be enough. But this way we are safe even if some optimizer
+;; becomes too clever in the future.
+(define_insn "prologue_set_stack_ptr"
+  [(set (reg:SI 7)
+	(minus:SI (reg:SI 7) (match_operand:SI 0 "immediate_operand" "i")))
+   (set (reg:SI 6) (unspec:SI [(reg:SI 6)] 4))]
+  ""
+  "*
+{
+  rtx xops [2];
+
+  xops[0] = operands[0];
+  xops[1] = stack_pointer_rtx;
+  output_asm_insn (AS2 (sub%L1,%0,%1), xops);
+  RET;
+}"
+  [(set_attr "memory" "none")])
+
+(define_insn "prologue_set_got"
+  [(set (match_operand:SI 0 "" "")
+	(unspec_volatile
+	 [(plus:SI (match_dup 0)
+		   (plus:SI (match_operand:SI 1 "symbolic_operand" "")
+			    (minus:SI (pc) (match_operand 2 "" ""))))] 1))]
+  ""
+  "*
+{
+  char buffer[64];
+
+  if (TARGET_DEEP_BRANCH_PREDICTION) 
+    {
+      sprintf (buffer, \"addl %s,%%0\", XSTR (operands[1], 0));
+      output_asm_insn (buffer, operands);
+    }
+  else  
+    {
+      sprintf (buffer, \"addl %s+[.-%%X2],%%0\", XSTR (operands[1], 0));
+      output_asm_insn (buffer, operands);
+    }    
+  RET;
+}")
+
+(define_insn "prologue_get_pc"
+  [(set (match_operand:SI 0 "" "")
+    (unspec_volatile [(plus:SI (pc) (match_operand 1 "" ""))] 2))]
+  ""
+  "*
+{
+  output_asm_insn (AS1 (call,%X1), operands);
+  if (! TARGET_DEEP_BRANCH_PREDICTION) 
+    {
+      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[1]));
+    }    
+  RET;
+}"
+  [(set_attr "memory" "none")])
+
+(define_insn "prologue_get_pc_and_set_got"
+  [(unspec_volatile [(match_operand:SI 0 "" "")] 3)]
+  ""
+  "*
+{
+  operands[1] = gen_label_rtx ();
+  output_asm_insn (AS1 (call,%X1), operands);
+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
+			     CODE_LABEL_NUMBER (operands[1]));
+  output_asm_insn (AS1 (pop%L0,%0), operands);
+  output_asm_insn (\"addl $%__GLOBAL_OFFSET_TABLE_+[.-%X1],%0\", operands);
+  RET;
+}"
+  [(set_attr "memory" "none")])
+
+(define_expand "epilogue"
+  [(const_int 1)]
+  ""
+  "
+{
+  ix86_expand_epilogue ();
+  DONE;
+}")
+
+(define_insn "epilogue_set_stack_ptr"
+  [(set (reg:SI 7) (reg:SI 6))
+	(clobber (reg:SI 6))]
+  ""
+  "*
+{
+  rtx xops [2];
+
+    xops[0] = frame_pointer_rtx;
+    xops[1] = stack_pointer_rtx;
+    output_asm_insn (AS2 (mov%L0,%0,%1), xops);
+    RET;
+}"
+  [(set_attr "memory" "none")])
+
+(define_insn "leave"
+  [(const_int 2)
+      (clobber (reg:SI 6))
+      (clobber (reg:SI 7))]
+  ""
+  "*
+{
+  rtx xops[1];
+
+  xops[0] = frame_pointer_rtx;
+
+  output_asm_insn (\"leave\", xops);
+  output_asm_insn (AS1 (bswap,%0), xops );
+  RET;
+}"
+  [(set_attr "memory" "none")])
+
+(define_insn "pop"
+  [(set (match_operand:SI 0 "register_operand" "r")
+	(mem:SI (reg:SI 7)))
+   (set (reg:SI 7) (plus:SI (reg:SI 7) (const_int 4)))]
+  ""
+  "*
+{
+    output_asm_insn (AS1 (pop%L0,%P0), operands);
+    output_asm_insn (AS1 (bswap,%P0), operands );
+    RET;
+}"
+  [(set_attr "memory" "load")])
+
+(define_expand "movstrsi"
+  [(parallel [(set (match_operand:BLK 0 "memory_operand" "")
+		   (match_operand:BLK 1 "memory_operand" ""))
+	      (use (match_operand:SI 2 "const_int_operand" ""))
+	      (use (match_operand:SI 3 "const_int_operand" ""))
+	      (clobber (match_scratch:SI 4 ""))
+	      (clobber (match_dup 5))
+	      (clobber (match_dup 6))])]
+  ""
+  "
+{
+  rtx addr0, addr1;
+
+  if (GET_CODE (operands[2]) != CONST_INT)
+    FAIL;
+
+  addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
+  addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
+
+  operands[5] = addr0;
+  operands[6] = addr1;
+
+  operands[0] = change_address (operands[0], VOIDmode, addr0);
+  operands[1] = change_address (operands[1], VOIDmode, addr1);
+}")
+
+;; It might seem that operands 0 & 1 could use predicate register_operand.
+;; But strength reduction might offset the MEM expression.  So we let
+;; reload put the address into %edi & %esi.
+
+(define_insn ""
+  [(set (mem:BLK (match_operand:SI 0 "address_operand" "D"))
+	(mem:BLK (match_operand:SI 1 "address_operand" "S")))
+   (use (match_operand:SI 2 "const_int_operand" "n"))
+   (use (match_operand:SI 3 "immediate_operand" "i"))
+   (clobber (match_scratch:SI 4 "=&c"))
+   (clobber (match_dup 0))
+   (clobber (match_dup 1))]
+  ""
+  "*
+{
+  rtx xops[2];
+
+  output_asm_insn (\"cld\", operands);
+  if (GET_CODE (operands[2]) == CONST_INT)
+    {
+      if (INTVAL (operands[2]) & ~0x03)
+	{
+	  xops[0] = GEN_INT ((INTVAL (operands[2]) >> 2) & 0x3fffffff);
+	  xops[1] = operands[4];
+
+	  output_asm_insn (AS2 (mov%L1,%0,%1), xops);
+#ifdef INTEL_SYNTAX
+	  output_asm_insn (\"rep movsd\", xops);
+#else
+	  output_asm_insn (\"rep\;movsl\", xops);
+#endif
+	}
+      if (INTVAL (operands[2]) & 0x02)
+	output_asm_insn (\"movsw\", operands);
+      if (INTVAL (operands[2]) & 0x01)
+	output_asm_insn (\"movsb\", operands);
+    }
+  else
+    abort ();
+  RET;
+}")
+
+(define_expand "clrstrsi"
+  [(set (match_dup 3) (const_int 0))
+   (parallel [(set (match_operand:BLK 0 "memory_operand" "")
+		   (const_int 0))
+	      (use (match_operand:SI 1 "const_int_operand" ""))
+	      (use (match_operand:SI 2 "const_int_operand" ""))
+	      (use (match_dup 3))
+	      (clobber (match_scratch:SI 4 ""))
+	      (clobber (match_dup 5))])]
+  ""
+  "
+{
+  rtx addr0;
+
+  if (GET_CODE (operands[1]) != CONST_INT)
+    FAIL;
+
+  addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
+
+  operands[3] = gen_reg_rtx (SImode);
+  operands[5] = addr0;
+
+  operands[0] = gen_rtx_MEM (BLKmode, addr0);
+}")
+
+;; It might seem that operand 0 could use predicate register_operand.
+;; But strength reduction might offset the MEM expression.  So we let
+;; reload put the address into %edi.
+
+(define_insn "*bzero"
+  [(set (mem:BLK (match_operand:SI 0 "address_operand" "D"))
+	(const_int 0))
+   (use (match_operand:SI 1 "const_int_operand" "n"))
+   (use (match_operand:SI 2 "immediate_operand" "i"))
+   (use (match_operand:SI 3 "register_operand" "a"))
+   (clobber (match_scratch:SI 4 "=&c"))
+   (clobber (match_dup 0))]
+  ""
+  "*
+{
+  rtx xops[2];
+
+  output_asm_insn (\"cld\", operands);
+  if (GET_CODE (operands[1]) == CONST_INT)
+    {
+      unsigned int count = INTVAL (operands[1]) & 0xffffffff;
+      if (count & ~0x03)
+	{
+	  xops[0] = GEN_INT (count / 4);
+	  xops[1] = operands[4];
+
+	  /* K6: stos takes 1 cycle, rep stos takes 8 + %ecx cycles.
+	     80386: 4/5+5n (+2 for set of ecx)
+	     80486: 5/7+5n (+1 for set of ecx)
+	     */
+	  if (count / 4 < ((int) ix86_cpu < (int)PROCESSOR_PENTIUM ? 4 : 6))
+	    {
+	      do
+#ifdef INTEL_SYNTAX
+		output_asm_insn (\"stosd\", xops);
+#else
+		output_asm_insn (\"stosl\", xops);
+#endif
+	      while ((count -= 4) > 3);
+	    }
+	  else
+	    {
+	      output_asm_insn (AS2 (mov%L1,%0,%1), xops);
+#ifdef INTEL_SYNTAX
+	      output_asm_insn (\"rep stosd\", xops);
+#else
+	      output_asm_insn (\"rep\;stosl\", xops);
+#endif
+	    }
+	}
+      if (INTVAL (operands[1]) & 0x02)
+	output_asm_insn (\"stosw\", operands);
+      if (INTVAL (operands[1]) & 0x01)
+	output_asm_insn (\"stosb\", operands);
+    }
+  else
+    abort ();
+  RET;
+}")
+
+(define_expand "cmpstrsi"
+  [(parallel [(set (match_operand:SI 0 "general_operand" "")
+		   (compare:SI (match_operand:BLK 1 "general_operand" "")
+			       (match_operand:BLK 2 "general_operand" "")))
+	      (use (match_operand:SI 3 "general_operand" ""))
+	      (use (match_operand:SI 4 "immediate_operand" ""))
+	      (clobber (match_dup 5))
+	      (clobber (match_dup 6))
+	      (clobber (match_dup 3))])]
+  ""
+  "
+{
+  rtx addr1, addr2;
+
+  addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
+  addr2 = copy_to_mode_reg (Pmode, XEXP (operands[2], 0));
+  operands[3] = copy_to_mode_reg (SImode, operands[3]);
+
+  operands[5] = addr1;
+  operands[6] = addr2;
+
+  operands[1] = gen_rtx_MEM (BLKmode, addr1);
+  operands[2] = gen_rtx_MEM (BLKmode, addr2);
+
+}")
+
+;; memcmp recognizers.  The `cmpsb' opcode does nothing if the count is
+;; zero.  Emit extra code to make sure that a zero-length compare is EQ.
+
+;; It might seem that operands 0 & 1 could use predicate register_operand.
+;; But strength reduction might offset the MEM expression.  So we let
+;; reload put the address into %edi & %esi.
+
+;; ??? Most comparisons have a constant length, and it's therefore
+;; possible to know that the length is non-zero, and to avoid the extra
+;; code to handle zero-length compares.
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=&r")
+	(compare:SI (mem:BLK (match_operand:SI 1 "address_operand" "S"))
+		    (mem:BLK (match_operand:SI 2 "address_operand" "D"))))
+   (use (match_operand:SI 3 "register_operand" "c"))
+   (use (match_operand:SI 4 "immediate_operand" "i"))
+   (clobber (match_dup 1))
+   (clobber (match_dup 2))
+   (clobber (match_dup 3))]
+  ""
+  "*
+{
+  rtx xops[2], label;
+
+  label = gen_label_rtx ();
+
+  output_asm_insn (\"cld\", operands);
+  output_asm_insn (AS2 (xor%L0,%0,%0), operands);
+  output_asm_insn (\"repz\;cmps%B2\", operands);
+  output_asm_insn (\"je %l0\", &label);
+
+  xops[0] = operands[0];
+  xops[1] = const1_rtx;
+  output_asm_insn (AS2 (sbb%L0,%0,%0), xops);
+  if (QI_REG_P (xops[0]))
+     output_asm_insn (AS2 (or%B0,%1,%b0), xops);
+  else
+     output_asm_insn (AS2 (or%L0,%1,%0), xops);
+	
+  ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (label));
+  RET;
+}")
+
+(define_insn ""
+  [(set (cc0)
+	(compare:SI (mem:BLK (match_operand:SI 0 "address_operand" "S"))
+		    (mem:BLK (match_operand:SI 1 "address_operand" "D"))))
+   (use (match_operand:SI 2 "register_operand" "c"))
+   (use (match_operand:SI 3 "immediate_operand" "i"))
+   (clobber (match_dup 0))
+   (clobber (match_dup 1))
+   (clobber (match_dup 2))]
+  ""
+  "*
+{
+  rtx xops[2];
+
+  cc_status.flags |= CC_NOT_SIGNED;
+
+  xops[0] = gen_rtx_REG (QImode, 0);
+  xops[1] = CONST0_RTX (QImode);
+
+  output_asm_insn (\"cld\", operands);
+  output_asm_insn (AS2 (test%B0,%1,%0), xops);
+  return \"repz\;cmps%B2\";
+}")
+
+
+;; Note, you cannot optimize away the branch following the bsfl by assuming
+;; that the destination is not modified if the input is 0, since not all
+;; x86 implementations do this.
+
+(define_expand "ffssi2"
+  [(set (match_operand:SI 0 "general_operand" "") 
+	(ffs:SI (match_operand:SI 1 "general_operand" "")))]
+  ""
+  "
+{
+  rtx label = gen_label_rtx (), temp = gen_reg_rtx (SImode);
+
+  emit_insn (gen_ffssi_1 (temp, operands[1]));
+  emit_cmp_insn (operands[1], const0_rtx, NE, NULL_RTX, SImode, 0, 0);
+  emit_jump_insn (gen_bne (label));
+  emit_move_insn (temp, constm1_rtx);
+  emit_label (label);
+  temp = expand_binop (SImode, add_optab, temp, const1_rtx,
+		       operands[0], 0, OPTAB_WIDEN);
+
+  if (temp != operands[0])
+    emit_move_insn (operands[0], temp);
+  DONE;  
+}")
+
+(define_insn "ffssi_1"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(unspec:SI [(match_operand:SI 1 "nonimmediate_operand" "r")] 5))]
+  ""
+  "* return AS2 (bsf%L0,%1,%0);")
+
+(define_expand "ffshi2"
+  [(set (match_operand:SI 0 "general_operand" "") 
+	(ffs:HI (match_operand:HI 1 "general_operand" "")))]
+  ""
+  "
+{
+  rtx label = gen_label_rtx (), temp = gen_reg_rtx (HImode);
+
+  emit_insn (gen_ffshi_1 (temp, operands[1]));
+  emit_cmp_insn (operands[1], const0_rtx, NE, NULL_RTX, HImode, 0, 0);
+  emit_jump_insn (gen_bne (label));
+  emit_move_insn (temp, constm1_rtx);
+  emit_label (label);
+  temp = expand_binop (HImode, add_optab, temp, const1_rtx,
+		       operands[0], 0, OPTAB_WIDEN);
+
+  if (temp != operands[0])
+    emit_move_insn (operands[0], temp);
+  DONE;  
+}")
+
+(define_insn "ffshi_1"
+  [(set (match_operand:HI 0 "register_operand" "=r")
+	(unspec:HI [(match_operand:SI 1 "nonimmediate_operand" "r")] 5))]
+  ""
+  "* return AS2 (bsf%W0,%1,%0);")
+
+;; These patterns match the binary 387 instructions for addM3, subM3,
+;; mulM3 and divM3.  There are three patterns for each of DFmode and
+;; SFmode.  The first is the normal insn, the second the same insn but
+;; with one operand a conversion, and the third the same insn but with
+;; the other operand a conversion.
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+	(match_operator:DF 3 "binary_387_op"
+			[(match_operand:DF 1 "nonimmediate_operand" "0,fm")
+			 (match_operand:DF 2 "nonimmediate_operand" "fm,0")]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f,f")
+	(match_operator:XF 3 "binary_387_op"
+			[(match_operand:XF 1 "register_operand" "0,f")
+			 (match_operand:XF 2 "register_operand" "f,0")]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f,f")
+	(match_operator:XF 3 "binary_387_op"
+	   [(float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "fm,0"))
+	    (match_operand:XF 2 "register_operand" "0,f")]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f,f")
+	(match_operator:XF 3 "binary_387_op"
+	  [(match_operand:XF 1 "register_operand" "0,f")
+	   (float_extend:XF
+	    (match_operand:SF 2 "nonimmediate_operand" "fm,0"))]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+	(match_operator:DF 3 "binary_387_op"
+	   [(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,0"))
+	    (match_operand:DF 2 "register_operand" "0,f")]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+	(match_operator:DF 3 "binary_387_op"
+	  [(match_operand:DF 1 "register_operand" "0,f")
+	   (float_extend:DF
+	    (match_operand:SF 2 "nonimmediate_operand" "fm,0"))]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f,f")
+	(match_operator:SF 3 "binary_387_op"
+			[(match_operand:SF 1 "nonimmediate_operand" "0,fm")
+			 (match_operand:SF 2 "nonimmediate_operand" "fm,0")]))]
+  "TARGET_80387"
+  "* return output_387_binary_op (insn, operands);"
+  [(set (attr "type") 
+        (cond [(match_operand:DF 3 "is_mul" "") 
+                 (const_string "fpmul")
+               (match_operand:DF 3 "is_div" "") 
+                 (const_string "fpdiv")
+              ]
+               (const_string "fpop")
+        )
+  )])
+
+(define_expand "strlensi"
+  [(parallel [(set (match_dup 4)
+		   (unspec:SI [(mem:BLK (match_operand:BLK 1 "general_operand" ""))
+			       (match_operand:QI 2 "immediate_operand" "")
+			       (match_operand:SI 3 "immediate_operand" "")] 0))
+	      (clobber (match_dup 1))])
+   (set (match_dup 5)
+	(not:SI (match_dup 4)))
+   (set (match_operand:SI 0 "register_operand" "")
+	(plus:SI (match_dup 5)
+	         (const_int -1)))]
+  ""
+  "
+{
+  if (TARGET_UNROLL_STRLEN && operands[2] == const0_rtx && optimize > 1)
+    {
+      rtx address;
+      rtx scratch;
+
+	/* well it seems that some optimizer does not combine a call like
+	     foo(strlen(bar), strlen(bar));
+	   when the move and the subtraction is done here.  It does calculate
+	   the length just once when these instructions are done inside of
+	   output_strlen_unroll().  But I think since &bar[strlen(bar)] is
+	   often used and I use one fewer register for the lifetime of
+	   output_strlen_unroll() this is better.  */
+      scratch = gen_reg_rtx (SImode);
+      address = force_reg (SImode, XEXP (operands[1], 0));
+
+	/* move address to scratch-register
+	   this is done here because the i586 can do the following and
+	   in the same cycle with the following move.  */
+      if (GET_CODE (operands[3]) != CONST_INT || INTVAL (operands[3]) < 4)
+	  emit_insn (gen_movsi (scratch, address));
+
+      emit_insn (gen_movsi (operands[0], address));
+
+      if(TARGET_USE_Q_REG)
+	emit_insn (gen_strlensi_unroll5 (operands[0],
+					operands[3],
+					scratch,
+					operands[0]));
+      else
+	emit_insn (gen_strlensi_unroll4 (operands[0],
+					operands[3],
+					scratch,
+					operands[0]));
+
+        /* gen_strlensi_unroll[45] returns the address of the zero
+           at the end of the string, like memchr(), so compute the
+           length by subtracting the startaddress.  */
+      emit_insn (gen_subsi3 (operands[0], operands[0], address));
+      DONE;
+    }
+
+  operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
+  operands[4] = gen_reg_rtx (SImode);
+  operands[5] = gen_reg_rtx (SImode);
+}")
+
+;; It might seem that operands 0 & 1 could use predicate register_operand.
+;; But strength reduction might offset the MEM expression.  So we let
+;; reload put the address into %edi.
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=&c")
+	(unspec:SI [(mem:BLK (match_operand:SI 1 "address_operand" "D"))
+		    (match_operand:QI 2 "immediate_operand" "a")
+		    (match_operand:SI 3 "immediate_operand" "i")] 0))
+   (clobber (match_dup 1))]
+  ""
+  "*
+{
+  rtx xops[2];
+
+  xops[0] = operands[0];
+  xops[1] = constm1_rtx;
+  output_asm_insn (\"cld\", operands);
+  output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+  return \"repnz\;scas%B2\";
+}")
+
+/* Conditional move define_insns.  */
+
+(define_expand "movsicc"
+  [(set (match_operand:SI 0 "register_operand" "")
+	(if_then_else:SI (match_operand 1 "comparison_operator" "")
+			 (match_operand:SI 2 "nonimmediate_operand" "")
+			 (match_operand:SI 3 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE"
+  "
+{
+  if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
+    FAIL;
+
+  operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+			GET_MODE (i386_compare_op0),
+			i386_compare_op0, i386_compare_op1);
+}")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+	(if_then_else:SI (match_operator 1 "comparison_operator" 
+	      [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m")
+		(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")])
+	      (match_operand:SI 4 "nonimmediate_operand" "rm,rm,0,0")
+	      (match_operand:SI 5 "nonimmediate_operand" "0,0,rm,rm")))]
+  "TARGET_CMOVE"
+  "#")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+	(if_then_else:SI (match_operator 1 "comparison_operator" 
+	      [(match_operand 2 "nonimmediate_operand" "r,m,r,m")
+		(match_operand 3 "general_operand" "rmi,ri,rmi,ri")])
+	      (match_operand:SI 4 "nonimmediate_operand" "rm,rm,0,0")
+	      (match_operand:SI 5 "nonimmediate_operand" "0,0,rm,rm")))]
+  "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT"
+  "#")
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(if_then_else:SI (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (const_int 0)])
+		      (match_operand:SI 3 "nonimmediate_operand" "")
+		      (match_operand:SI 4 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(match_dup 2))
+   (set (match_dup 0)
+	(if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 3) (match_dup 4)))]
+  "")
+
+(define_split
+  [(set (match_operand:SI 0 "register_operand" "")
+	(if_then_else:SI (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (match_operand 3 "general_operand" "")])
+		      (match_operand:SI 4 "nonimmediate_operand" "")
+		      (match_operand:SI 5 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0) (compare (match_dup 2) (match_dup 3)))
+   (set (match_dup 0)
+	(if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 4) (match_dup 5)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:SI 0 "register_operand" "=r,r")
+	(if_then_else:SI (match_operator 1 "comparison_operator" 
+				[(cc0) (const_int 0)])
+		      (match_operand:SI 2 "nonimmediate_operand" "rm,0")
+		      (match_operand:SI 3 "nonimmediate_operand" "0,rm")))]
+  "TARGET_CMOVE && reload_completed"
+  "* return output_int_conditional_move (which_alternative, operands);")
+
+(define_expand "movhicc"
+  [(set (match_operand:HI 0 "register_operand" "")
+	(if_then_else:HI (match_operand 1 "comparison_operator" "")
+			 (match_operand:HI 2 "nonimmediate_operand" "")
+			 (match_operand:HI 3 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE"
+  "
+{
+  if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
+    FAIL;
+
+  operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+			GET_MODE (i386_compare_op0),
+			i386_compare_op0, i386_compare_op1);
+}")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "register_operand" "=r,r,r,r")
+	(if_then_else:HI (match_operator 1 "comparison_operator" 
+	      [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m")
+		(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")])
+	      (match_operand:HI 4 "nonimmediate_operand" "rm,rm,0,0")
+	      (match_operand:HI 5 "nonimmediate_operand" "0,0,rm,rm")))]
+  "TARGET_CMOVE"
+  "#")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "register_operand" "=r,r,r,r")
+	(if_then_else:HI (match_operator 1 "comparison_operator" 
+	      [(match_operand 2 "nonimmediate_operand" "r,m,r,m")
+		(match_operand 3 "general_operand" "rmi,ri,rmi,ri")])
+	      (match_operand:HI 4 "nonimmediate_operand" "rm,rm,0,0")
+	      (match_operand:HI 5 "nonimmediate_operand" "0,0,rm,rm")))]
+  "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT"
+  "#")
+
+(define_split
+  [(set (match_operand:HI 0 "register_operand" "")
+	(if_then_else:HI (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (const_int 0)])
+		      (match_operand:HI 3 "nonimmediate_operand" "")
+		      (match_operand:HI 4 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(match_dup 2))
+   (set (match_dup 0)
+	(if_then_else:HI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 3) (match_dup 4)))]
+  "")
+
+(define_split
+  [(set (match_operand:HI 0 "register_operand" "")
+	(if_then_else:HI (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (match_operand 3 "general_operand" "")])
+		      (match_operand:HI 4 "nonimmediate_operand" "")
+		      (match_operand:HI 5 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(compare (match_dup 2) (match_dup 3)))
+   (set (match_dup 0)
+	(if_then_else:HI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 4) (match_dup 5)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:HI 0 "register_operand" "=r,r")
+	(if_then_else:HI (match_operator 1 "comparison_operator" 
+				[(cc0) (const_int 0)])
+		      (match_operand:HI 2 "nonimmediate_operand" "rm,0")
+		      (match_operand:HI 3 "nonimmediate_operand" "0,rm")))]
+  "TARGET_CMOVE && reload_completed"
+  "* return output_int_conditional_move (which_alternative, operands);")
+
+(define_expand "movsfcc"
+  [(set (match_operand:SF 0 "register_operand" "")
+	(if_then_else:SF (match_operand 1 "comparison_operator" "")
+			 (match_operand:SF 2 "register_operand" "")
+			 (match_operand:SF 3 "register_operand" "")))]
+  "TARGET_CMOVE"
+  "
+{
+  rtx temp;
+
+  if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
+    FAIL;
+
+  /* The floating point conditional move instructions don't directly
+     support conditions resulting from a signed integer comparison. */
+
+  switch (GET_CODE (operands[1]))
+    {
+    case LT:
+    case LE:
+    case GE:
+    case GT:
+      temp = emit_store_flag (gen_reg_rtx (QImode),
+		GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1,
+		VOIDmode, 0, 0);
+
+      if (!temp)
+        FAIL;
+
+      operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx);
+      break;
+
+    default:
+      operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+			GET_MODE (i386_compare_op0),
+			i386_compare_op0, i386_compare_op1);
+      break;
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f,f,f,f")
+	(if_then_else:SF (match_operator 1 "comparison_operator" 
+	      [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m")
+		(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")])
+	      (match_operand:SF 4 "register_operand" "f,f,0,0")
+	      (match_operand:SF 5 "register_operand" "0,0,f,f")))]
+  "TARGET_CMOVE
+    && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+    && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
+  "#")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f,f,f,f")
+	(if_then_else:SF (match_operator 1 "comparison_operator" 
+		[(match_operand 2 "nonimmediate_operand" "r,m,r,m")
+		 (match_operand 3 "general_operand" "rmi,ri,rmi,ri")])
+	      (match_operand:SF 4 "register_operand" "f,f,0,0")
+	      (match_operand:SF 5 "register_operand" "0,0,f,f")))]
+  "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
+    && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+    && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
+  "#")
+
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "")
+	(if_then_else:SF (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (const_int 0)])
+		      (match_operand:SF 3 "register_operand" "")
+		      (match_operand:SF 4 "register_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(match_dup 2))
+   (set (match_dup 0)
+	(if_then_else:SF (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 3) (match_dup 4)))]
+  "")
+
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "")
+	(if_then_else:SF (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (match_operand 3 "general_operand" "")])
+		      (match_operand:SF 4 "register_operand" "")
+		      (match_operand:SF 5 "register_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0) (compare (match_dup 2) (match_dup 3)))
+   (set (match_dup 0)
+	(if_then_else:SF (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 4) (match_dup 5)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f,f")
+	(if_then_else:SF (match_operator 1 "comparison_operator" 
+				[(cc0) (const_int 0)])
+		      (match_operand:SF 2 "register_operand" "f,0")
+		      (match_operand:SF 3 "register_operand" "0,f")))]
+  "TARGET_CMOVE && reload_completed"
+  "* return output_fp_conditional_move (which_alternative, operands);")
+
+(define_expand "movdfcc"
+  [(set (match_operand:DF 0 "register_operand" "")
+	(if_then_else:DF (match_operand 1 "comparison_operator" "")
+			 (match_operand:DF 2 "register_operand" "")
+			 (match_operand:DF 3 "register_operand" "")))]
+  "TARGET_CMOVE"
+  "
+{
+  rtx temp;
+
+  if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
+    FAIL;
+
+  /* The floating point conditional move instructions don't directly
+     support conditions resulting from a signed integer comparison. */
+
+  switch (GET_CODE (operands[1]))
+    {
+    case LT:
+    case LE:
+    case GE:
+    case GT:
+      temp = emit_store_flag (gen_reg_rtx (QImode),
+		GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1,
+		VOIDmode, 0, 0);
+
+      if (!temp)
+        FAIL;
+
+      operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx);
+      break;
+
+    default:
+      operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+			GET_MODE (i386_compare_op0),
+			i386_compare_op0, i386_compare_op1);
+      break;
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f,f,f")
+	(if_then_else:DF (match_operator 1 "comparison_operator" 
+	      [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m")
+		(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")])
+	      (match_operand:DF 4 "register_operand" "f,f,0,0")
+	      (match_operand:DF 5 "register_operand" "0,0,f,f")))]
+  "TARGET_CMOVE
+    && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+    && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
+  "#")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f,f,f")
+	(if_then_else:DF (match_operator 1 "comparison_operator" 
+	      [(match_operand 2 "nonimmediate_operand" "r,m,r,m")
+		(match_operand 3 "general_operand" "rmi,ri,rmi,ri")])
+	      (match_operand:DF 4 "register_operand" "f,f,0,0")
+	      (match_operand:DF 5 "register_operand" "0,0,f,f")))]
+  "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
+    && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+    && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
+  "#")
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "")
+	(if_then_else:DF (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (const_int 0)])
+		      (match_operand:DF 3 "register_operand" "")
+		      (match_operand:DF 4 "register_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(match_dup 2))
+   (set (match_dup 0)
+	(if_then_else:DF (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 3) (match_dup 4)))]
+  "")
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "")
+	(if_then_else:DF (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (match_operand 3 "general_operand" "")])
+		      (match_operand:DF 4 "register_operand" "")
+		      (match_operand:DF 5 "register_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0) (compare (match_dup 2) (match_dup 3)))
+   (set (match_dup 0)
+	(if_then_else:DF (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 4) (match_dup 5)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+	(if_then_else:DF (match_operator 1 "comparison_operator" 
+				[(cc0) (const_int 0)])
+		      (match_operand:DF 2 "register_operand" "f,0")
+		      (match_operand:DF 3 "register_operand" "0,f")))]
+  "TARGET_CMOVE && reload_completed"
+  "* return output_fp_conditional_move (which_alternative, operands);")
+
+(define_expand "movxfcc"
+  [(set (match_operand:XF 0 "register_operand" "")
+	(if_then_else:XF (match_operand 1 "comparison_operator" "")
+			 (match_operand:XF 2 "register_operand" "")
+			 (match_operand:XF 3 "register_operand" "")))]
+  "TARGET_CMOVE"
+  "
+{
+  rtx temp;
+
+  if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
+    FAIL;
+
+  /* The floating point conditional move instructions don't directly
+     support conditions resulting from a signed integer comparison. */
+
+  switch (GET_CODE (operands[1]))
+    {
+    case LT:
+    case LE:
+    case GE:
+    case GT:
+      temp = emit_store_flag (gen_reg_rtx (QImode),
+		GET_CODE (operands[1]), i386_compare_op0, i386_compare_op1,
+		VOIDmode, 0, 0);
+
+      if (!temp)
+        FAIL;
+
+      operands[1] = gen_rtx_fmt_ee (NE, QImode, temp, const0_rtx);
+      break;
+
+    default:
+      operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+			GET_MODE (i386_compare_op0),
+			i386_compare_op0, i386_compare_op1);
+      break;
+    }
+}")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f,f,f,f")
+	(if_then_else:XF (match_operator 1 "comparison_operator" 
+	      [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m")
+		(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")])
+	      (match_operand:XF 4 "register_operand" "f,f,0,0")
+	      (match_operand:XF 5 "register_operand" "0,0,f,f")))]
+  "TARGET_CMOVE
+    && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+    && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
+  "#")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f,f,f,f")
+	(if_then_else:XF (match_operator 1 "comparison_operator" 
+	      [(match_operand 2 "nonimmediate_operand" "r,m,r,m")
+		(match_operand 3 "general_operand" "rmi,ri,rmi,ri")])
+	      (match_operand:XF 4 "register_operand" "f,f,0,0")
+	      (match_operand:XF 5 "register_operand" "0,0,f,f")))]
+  "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
+    && GET_CODE (operands[1]) != LT && GET_CODE (operands[1]) != LE
+    && GET_CODE (operands[1]) != GE && GET_CODE (operands[1]) != GT"
+  "#")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "")
+	(if_then_else:XF (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (const_int 0)])
+		      (match_operand:XF 3 "register_operand" "")
+		      (match_operand:XF 4 "register_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(match_dup 2))
+   (set (match_dup 0)
+	(if_then_else:XF (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 3) (match_dup 4)))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "")
+	(if_then_else:XF (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (match_operand 3 "general_operand" "")])
+		      (match_operand:XF 4 "register_operand" "")
+		      (match_operand:XF 5 "register_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0) (compare (match_dup 2) (match_dup 3)))
+   (set (match_dup 0)
+	(if_then_else:XF (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 4) (match_dup 5)))]
+  "")
+
+(define_insn ""
+  [(set (match_operand:XF 0 "register_operand" "=f,f")
+	(if_then_else:XF (match_operator 1 "comparison_operator" 
+				[(cc0) (const_int 0)])
+		      (match_operand:XF 2 "register_operand" "f,0")
+		      (match_operand:XF 3 "register_operand" "0,f")))]
+  "TARGET_CMOVE && reload_completed"
+  "* return output_fp_conditional_move (which_alternative, operands);")
+
+(define_expand "movdicc"
+  [(set (match_operand:DI 0 "register_operand" "")
+	(if_then_else:DI (match_operand 1 "comparison_operator" "")
+			 (match_operand:DI 2 "nonimmediate_operand" "")
+			 (match_operand:DI 3 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE"
+  "
+{
+  if (GET_MODE_CLASS (GET_MODE (i386_compare_op0)) != MODE_INT)
+    FAIL;
+
+  operands[1] = gen_rtx_fmt_ee (GET_CODE (operands[1]),
+			GET_MODE (i386_compare_op0),
+			i386_compare_op0, i386_compare_op1);
+}")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "register_operand" "=&r,&r,&r,&r")
+	(if_then_else:DI (match_operator 1 "comparison_operator" 
+	      [(match_operand:QI 2 "nonimmediate_operand" "q,m,q,m")
+		(match_operand:QI 3 "general_operand" "qmn,qn,qmn,qn")])
+	      (match_operand:DI 4 "nonimmediate_operand" "ro,ro,0,0")
+	      (match_operand:DI 5 "nonimmediate_operand" "0,0,ro,ro")))]
+  "TARGET_CMOVE"
+  "#")
+
+(define_insn ""
+  [(set (match_operand:DI 0 "register_operand" "=&r,&r,&r,&r")
+	(if_then_else:DI (match_operator 1 "comparison_operator" 
+	      [(match_operand 2 "nonimmediate_operand" "r,m,r,m")
+		(match_operand 3 "general_operand" "rmi,ri,rmi,ri")])
+	      (match_operand:DI 4 "nonimmediate_operand" "ro,ro,0,0")
+	      (match_operand:DI 5 "nonimmediate_operand" "0,0,ro,ro")))]
+  "TARGET_CMOVE && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT"
+  "#")
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+	(if_then_else:DI (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (const_int 0)])
+		      (match_operand:DI 3 "nonimmediate_operand" "")
+		      (match_operand:DI 4 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0)
+	(match_dup 2))
+   (set (match_dup 5)
+	(if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 7) (match_dup 9)))
+   (set (match_dup 6)
+	(if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 8) (match_dup 10)))]
+  "split_di (&operands[0], 1, &operands[5], &operands[6]);
+   split_di (&operands[3], 1, &operands[7], &operands[8]);
+   split_di (&operands[4], 1, &operands[9], &operands[10]);")
+
+(define_split
+  [(set (match_operand:DI 0 "register_operand" "")
+	(if_then_else:DI (match_operator 1 "comparison_operator" 
+				[(match_operand 2 "nonimmediate_operand" "")
+				 (match_operand 3 "general_operand" "")])
+		      (match_operand:DI 4 "nonimmediate_operand" "")
+		      (match_operand:DI 5 "nonimmediate_operand" "")))]
+  "TARGET_CMOVE && reload_completed"
+  [(set (cc0) (compare (match_dup 2) (match_dup 3)))
+   (set (match_dup 6)
+	(if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 8) (match_dup 10)))
+   (set (match_dup 7)
+	(if_then_else:SI (match_op_dup 1 [(cc0) (const_int 0)])
+		      (match_dup 9) (match_dup 11)))]
+  "split_di (&operands[0], 1, &operands[6], &operands[7]);
+   split_di (&operands[4], 1, &operands[8], &operands[9]);
+   split_di (&operands[5], 1, &operands[10], &operands[11]);")
+
+(define_insn "strlensi_unroll"
+  [(set (match_operand:SI 0 "register_operand" "=&r,&r")
+	(unspec:SI [(mem:BLK (match_operand:SI 1 "address_operand" "r,r"))
+		    (match_operand:SI 2 "immediate_operand" "i,i")] 0))
+   (clobber (match_scratch:SI 3 "=&q,&r"))]
+  "optimize > 1"
+  "* return output_strlen_unroll (operands);")
+
+;; the only difference between the following patterns is the register preference
+;; on a pentium using a q-register saves one clock cycle per 4 characters
+
+(define_insn "strlensi_unroll4"
+  [(set (match_operand:SI 0 "register_operand" "=r,r")
+		   (unspec:SI [(mem:BLK (match_operand:SI 3 "register_operand" "0,0"))
+			       (match_operand:SI 1 "immediate_operand" "i,i")
+			       (match_operand:SI 2 "register_operand" "+q,!r")] 0))
+   (clobber (match_dup 2))]
+  "(TARGET_USE_ANY_REG && optimize > 1)"
+  "* return output_strlen_unroll (operands);")
+
+(define_insn "strlensi_unroll5"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+		   (unspec:SI [(mem:BLK (match_operand:SI 3 "register_operand" "0"))
+			       (match_operand:SI 1 "immediate_operand" "i")
+			       (match_operand:SI 2 "register_operand" "+q")] 0))
+   (clobber (match_dup 2))]
+  "(TARGET_USE_Q_REG && optimize > 1)"
+  "* return output_strlen_unroll (operands);"
+)
+
+(define_insn "allocate_stack_worker"
+  [(unspec:SI [(match_operand:SI 0 "register_operand" "a")] 3)
+   (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
+   (clobber (match_dup 0))]
+  "TARGET_STACK_PROBE"
+  "* return AS1(call,__alloca);"
+  [(set_attr "memory" "none")])
+
+(define_expand "allocate_stack"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+  	(minus:SI (reg:SI 7) (match_operand:SI 1 "general_operand" "")))
+   (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 1)))]
+   "TARGET_STACK_PROBE"
+  "
+{
+#ifdef CHECK_STACK_LIMIT
+  if (GET_CODE (operands[1]) == CONST_INT
+      && INTVAL (operands[1]) < CHECK_STACK_LIMIT)
+    emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx,
+			   operands[1]));
+  else 
+#endif
+    emit_insn (gen_allocate_stack_worker (copy_to_mode_reg (SImode,
+							    operands[1])));
+
+  emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
+  DONE;
+}")
+
+(define_expand "exception_receiver"
+  [(const_int 0)]
+  "flag_pic"
+  "
+{
+  load_pic_register (1);
+  DONE;
+}")
+
+(define_expand "builtin_setjmp_receiver"
+  [(label_ref (match_operand 0 "" ""))]
+  "flag_pic"
+  "
+{
+  load_pic_register (1);
+  DONE;
+}")
--- gcc-2.95.3/gcc/config/i386/i386.c	Tue Sep  7 09:38:56 1999
+++ gcc/gcc/config/i386/i386.c	Fri Apr 12 18:07:31 2002
@@ -876,21 +876,84 @@
      rtx *operands;
 {
   rtx x;
+
   if (GET_CODE (operands[0]) == MEM
       && GET_CODE (x = XEXP (operands[0], 0)) == PRE_DEC)
     {
       if (XEXP (x, 0) != stack_pointer_rtx)
 	abort ();
-      return "push%L1 %1";
+
+      if (BYTES_BIG_ENDIAN)
+        {
+	  if (REG_P (operands[1]))
+            {
+	      // lcs: AFAIK, we never push a half-word with this function
+	      output_asm_insn (AS1 (bswap,%1), operands);
+	      output_asm_insn (AS1 (push%L1,%1), operands);
+	      output_asm_insn (AS1 (bswap,%1), operands);
+	      RET;
+	    }
+	  else if (GET_CODE (operands[1]) == CONST_INT )
+	    {
+	      operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1])));
+	      return "push%L1 %1";
+	    }
+	  else
+	    {
+	      abort ();
+	    }
+      }
+      else
+	return "push%L1 %1";
     }
   else if (GET_CODE (operands[1]) == CONST_DOUBLE)
+  {
     return output_move_const_single (operands);
+  }
   else if (GET_CODE (operands[0]) == REG || GET_CODE (operands[1]) == REG)
-    return AS2 (mov%L0,%1,%0);
+    {
+      if (!BYTES_BIG_ENDIAN ||
+	   (GET_CODE (operands[0]) == REG && GET_CODE (operands[1]) == REG))
+	return AS2 (mov%L0,%1,%0);
+      else
+      {
+	if (GET_CODE (operands[0]) == REG)
+	{
+	  output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+
+	  if (GET_CODE (operands[1]) == MEM)
+	  {
+	    output_asm_insn (AS1 (bswap,%0), operands);
+	  }
+	  RET;
+	}
+	else
+	{
+	  output_asm_insn (AS1 (bswap,%1), operands);
+	  output_asm_insn (AS2 (mov%L0,%1,%0), operands);
+	  output_asm_insn (AS1 (bswap,%1), operands);
+	  RET;
+	}
+      }
+    }
+  else if (BYTES_BIG_ENDIAN && GET_CODE (operands[1]) == CONST_INT)
+    {
+      operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) );
+      return AS2 (mov%L0,%1,%0);      
+    }
   else if (CONSTANT_P (operands[1]))
-    return AS2 (mov%L0,%1,%0);
+    {
+      // lcs: What is this? a label/symbol move to memory?  Symbols
+      // should be fine, I suppose, but labels will be little endian?
+      if (BYTES_BIG_ENDIAN && GET_CODE (operands[0]) != GET_CODE (operands[1]))
+	abort();
+
+      return AS2 (mov%L0,%1,%0);
+      RET;
+    }
   else
     {
+      // lcs: WTF is this? Memory to memory move? Floating point move?
       output_asm_insn ("push%L1 %1", operands);
       return "pop%L0 %0";
     }
@@ -1056,9 +1119,21 @@
 
 	      REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
 	      REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);
-	      operands[1] = GEN_INT (l[0]);
-	      middlehalf[1] = GEN_INT (l[1]);
-	      latehalf[1] = GEN_INT (l[2]);
+
+	      if (BYTES_BIG_ENDIAN)
+	        {
+		  // lcs: We have changed the data type from double to interger:
+		  // we have to compensate for the different byte order
+		  operands[1] = GEN_INT (bswap_32 (l[0]));
+		  middlehalf[1] = GEN_INT (bswap_32 (l[1]));
+		  latehalf[1] = GEN_INT (bswap_32 (l[2]));
+		}
+	      else
+	        {
+		  operands[1] = GEN_INT (l[0]);
+		  middlehalf[1] = GEN_INT (l[1]);
+		  latehalf[1] = GEN_INT (l[2]);
+		}
 	    }
 	  else if (CONSTANT_P (operands[1]))
 	    /* No non-CONST_DOUBLE constant should ever appear here.  */
@@ -1076,18 +1151,81 @@
       /* Size is not 12. */
 
       if (optype0 == REGOP)
-	latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
+      {
+//	printf( "move double src: reg %d\n", REGNO (operands[0]));
+	if (0 && WORDS_BIG_ENDIAN)
+	{
+	  latehalf[0] = operands[0];
+	  operands[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
+	}
+	else
+	{
+	  latehalf[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
+	}
+      }
       else if (optype0 == OFFSOP)
-	latehalf[0] = adj_offsettable_operand (operands[0], 4);
+      {
+//	printf( "move double src: mem\n");
+	if (0 && WORDS_BIG_ENDIAN)
+	{
+	  latehalf[0] = operands[0];
+	  operands[0] = adj_offsettable_operand (operands[0], 4);
+	}
+	else
+	{
+	  latehalf[0] = adj_offsettable_operand (operands[0], 4);
+	}
+      }
       else
 	latehalf[0] = operands[0];
 
       if (optype1 == REGOP)
-	latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
+      {
+//	printf( "move double dst: reg %d\n", REGNO (operands[0]));
+	if (0 && WORDS_BIG_ENDIAN)
+	{
+	  latehalf[1] = operands[1];
+	  operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
+	}
+	else
+	{
+	  latehalf[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
+	}
+      }
       else if (optype1 == OFFSOP)
-	latehalf[1] = adj_offsettable_operand (operands[1], 4);
+      {
+//	printf( "move double dst: mem\n");
+	if (0 && WORDS_BIG_ENDIAN)
+	{
+	  latehalf[1] = operands[1];
+	  operands[1] = adj_offsettable_operand (operands[1], 4);
+	}
+	else
+	{
+	  latehalf[1] = adj_offsettable_operand (operands[1], 4);
+	}
+      }
       else if (optype1 == CNSTOP)
-	split_double (operands[1], &operands[1], &latehalf[1]);
+      {
+	if (BYTES_BIG_ENDIAN && GET_CODE (operands[1]) == CONST_DOUBLE)
+	{
+	  split_double (operands[1], &operands[1], &latehalf[1]);
+	  
+	  // lcs: We have changed the data type from double to interger:
+	  // we have to compensate for the different byte order
+	  operands[1] = GEN_INT ( bswap_32 (INTVAL (operands[1]) ) );
+	  latehalf[1] = GEN_INT ( bswap_32 (INTVAL (latehalf[1]) ) );
+	}
+	else
+	if (0 && WORDS_BIG_ENDIAN)
+	{
+	  split_double (operands[1], &latehalf[1], &operands[1]);
+	}
+	else
+	{
+	  split_double (operands[1], &operands[1], &latehalf[1]);
+	}
+      }
       else
 	latehalf[1] = operands[1];
     }
@@ -1126,6 +1264,9 @@
 	    }
 	  else
 	    {
+	      if (0 && WORDS_BIG_ENDIAN)
+		abort (); // lcs: I have no idea what to do here, so I abort!
+	      
 	      operands[1] = gen_rtx_MEM (DImode, latehalf[0]);
 	      latehalf[1] = adj_offsettable_operand (operands[1], size-4);
 	    }
@@ -1335,8 +1476,14 @@
 
       REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
       REAL_VALUE_TO_TARGET_SINGLE (r, l);
-      operands[1] = GEN_INT (l);
+
+      if (BYTES_BIG_ENDIAN) // Compensate for bswap in singlemove_string();
+	operands[1] = GEN_INT (bswap_32(l)); 
+      else
+	operands[1] = GEN_INT (l);
     }
+  else if (BYTES_BIG_ENDIAN)
+    abort ();
 
   return singlemove_string (operands);
 }
@@ -3793,24 +3940,52 @@
   while (num--)
     {
       rtx op = operands[num];
+
       if (! reload_completed)
-	{
+        {
 	  lo_half[num] = gen_lowpart (SImode, op);
 	  hi_half[num] = gen_highpart (SImode, op);
 	}
       else if (GET_CODE (op) == REG)
 	{
-	  lo_half[num] = gen_rtx_REG (SImode, REGNO (op));
-	  hi_half[num] = gen_rtx_REG (SImode, REGNO (op) + 1);
+	  if (WORDS_BIG_ENDIAN)
+	  {
+	    lo_half[num] = gen_rtx_REG (SImode, REGNO (op) + 1);
+	    hi_half[num] = gen_rtx_REG (SImode, REGNO (op));
+	  }
+	  else
+	  {
+	    lo_half[num] = gen_rtx_REG (SImode, REGNO (op));
+	    hi_half[num] = gen_rtx_REG (SImode, REGNO (op) + 1);
+	  }
 	}
       else if (CONSTANT_P (op))
-	split_double (op, &lo_half[num], &hi_half[num]);
+      {
+	if (WORDS_BIG_ENDIAN)
+	{
+	  split_double (op, &hi_half[num], &lo_half[num]);
+	}
+	else
+	{
+	  split_double (op, &lo_half[num], &hi_half[num]);
+	}
+      }
       else if (offsettable_memref_p (op))
 	{
-	  rtx lo_addr = XEXP (op, 0);
-	  rtx hi_addr = XEXP (adj_offsettable_operand (op, 4), 0);
-	  lo_half[num] = change_address (op, SImode, lo_addr);
-	  hi_half[num] = change_address (op, SImode, hi_addr);
+	  if (WORDS_BIG_ENDIAN)
+	    {
+	      rtx lo_addr = XEXP (adj_offsettable_operand (op, 4), 0);
+	      rtx hi_addr = XEXP (op, 0);
+	      lo_half[num] = change_address (op, SImode, lo_addr);
+	      hi_half[num] = change_address (op, SImode, hi_addr);
+	    }
+	  else
+	    {
+	      rtx lo_addr = XEXP (op, 0);
+	      rtx hi_addr = XEXP (adj_offsettable_operand (op, 4), 0);
+	      lo_half[num] = change_address (op, SImode, lo_addr);
+	      hi_half[num] = change_address (op, SImode, hi_addr);
+	    }
 	}
       else
 	abort();
@@ -4033,11 +4208,43 @@
 	output_asm_insn (AS2 (mov%L0,%4,%0), operands);
       else
 	{
-	  xops[0] = operands[0];
-	  xops[1] = operands[4];
-	  output_asm_insn (output_move_double (xops), xops);
+	  if( WORDS_BIG_ENDIAN )
+	  {
+	    if( REG_P ((operands[0])))
+	    {
+	      // Move LITTLE ENDIAN double word
+
+	      xops[0] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
+	      xops[1] = operands[4];
+	      output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+
+	      xops[0] = operands[0];
+	      xops[1] = adj_offsettable_operand (operands[4], 4);
+	      output_asm_insn (AS2 (mov%L0,%1,%0), xops);
+	    }
+	    else
+	    {
+	      // Should not happen?
+	      abort();
+	    }
+	  }
+	  else
+	  {
+	    xops[0] = operands[0];
+	    xops[1] = operands[4];
+	    output_asm_insn (output_move_double (xops), xops);
+	  }
 	}
     }
+  else
+  {
+    if (WORDS_BIG_ENDIAN)
+    {
+      // Can this ever happen?
+      
+      abort();
+    }
+  }
 
   return AS1 (fldc%W2,%2);
 }
@@ -5739,3 +5946,31 @@
 
   return len;
 }
+
+/* Functions to convert between little and endian modes */
+
+short
+bswap_16( x )
+  short x;
+{
+  return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8));
+}
+
+long
+bswap_32( x )
+  long x;
+{
+  return ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |
+	  (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24));
+}
+
+/* Return 1 is the operand is either a non-special register or ANY
+   constant integer.  */
+
+int
+reg_or_cint_operand (op, mode)
+    register rtx op;
+    enum machine_mode mode;
+{
+     return (GET_CODE (op) == CONST_INT || register_operand (op, mode));
+}
--- gcc-2.95.3/gcc/config/i386/i386.h	Sun Apr 25 13:43:49 1999
+++ gcc/gcc/config/i386/i386.h	Mon Sep 24 12:24:43 2001
@@ -2766,6 +2766,9 @@
 extern int small_shift_operand ();
 extern char *output_ashl ();
 extern int memory_address_info ();
+extern short bswap_16 ();
+extern long bswap_32 ();
+extern int reg_or_cint_operand ();
 
 #ifdef NOTYET
 extern struct rtx_def *copy_all_rtx ();
--- gcc-2.95.3/gcc/config/i386/t-amithlon	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/i386/t-amithlon	Sat Dec  1 14:23:42 2001
@@ -0,0 +1,28 @@
+# Makefile fragment for AmigaOS target.
+
+# Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
+# own equivalent of the UNIX /usr/include tree.  For gcc, the standard headers
+# are in /gg/include and system specific headers are in /gg/os-include.
+# Use these paths for fixincludes.
+
+SYSTEM_HEADER_DIR = /gg/include
+
+# We don't need a libgcc1, it's all in ixemul.library and LibNIX
+
+LIBGCC1 = 
+CROSS_LIBGCC1 =
+LIBGCC1_TEST =
+
+#LIBGCC1 = libgcc1.null
+#CROSS_LIBGCC1 = libgcc1.null
+
+### begin-GG-local: dynamic libraries
+# Extra objects that get compiled and linked to collect2
+
+EXTRA_COLLECT2_OBJS = amigacollect2.o
+
+# Build supplimentary AmigaOS target support file for collect2
+amigacollect2.o: amigacollect2.c
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	-DA2IXDIR_PREFIX=\"$(prefix)/share/a2ixlibrary\" $(srcdir)/amigacollect2.c
+### end-GG-local
--- gcc-2.95.3/gcc/config/i386/xm-amithlon.h	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/i386/xm-amithlon.h	Thu Sep 20 20:12:23 2001
@@ -0,0 +1,102 @@
+/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS.
+   Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
+   Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* First include the generic header, then modify some parts.  */
+
+#include "i386/xm-i386.h"
+
+#ifndef _FCNTL_H_
+#include <fcntl.h>
+#endif
+
+/* Define various things that the AmigaOS host has.  */
+
+#define HAVE_ATEXIT
+#define HAVE_RENAME
+
+/* AmigaOS specific headers, such as from the Native Developer Update kits,
+   go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
+   Unix "/usr/include".  All other include paths are set in Makefile.  */
+
+#define SYSTEM_INCLUDE_DIR	"/gg/os-include"
+#define STANDARD_INCLUDE_DIR	"/gg/include"
+
+#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/"
+#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/"
+
+/* The AmigaOS stores file names with regard to upper/lower case, but actions
+   on existing files are case independent on the standard filesystems.
+
+   A good example of where this causes problems is the conflict between the C
+   include file <string.h> and the C++ include file <String.h>, where the C++
+   include file dir is searched first and thus causes includes of <string.h>
+   to include <String.h> instead.
+
+   In order to solve this problem we define the macro OPEN_CASE_SENSITIVE as
+   the name of the function that takes the same args as open() and does case
+   dependent opens.  */
+
+#define OPEN_CASE_SENSITIVE(NAME, FLAGS, MODE) open ((NAME), (FLAGS) | O_CASE, (MODE))
+
+/* On the AmigaOS, there are two pathname separators, '/' (DIR_SEPARATOR)
+   and ':' (VOL_SEPARATOR).  DIR_SEPARATOR defaults to the correct
+   character, so we don't have to explicitly set it.  */
+
+#define DIR_SEPARATOR '/'
+#define VOL_SEPARATOR ':'
+
+/* Do *not* use this define, otherwise Amiga-devicesnames ('DEV:') won't 
+   work:  */
+// #define DIR_SEPARATOR_2 VOL_SEPARATOR
+
+
+/* Determine whether a '\0'-terminated file name is absolute or not.
+
+   This checks for both, '/' as the first character, since we're running under
+   ixemul.library which provides for this unix'ism, and for the usual 
+   logical-terminator, ':', somewhere in the filename.  */
+
+#define FILE_NAME_ABSOLUTE_P(NAME) ((NAME)[0] == '/' || index ((NAME), ':'))
+
+/* Like the above, but the file name is not '\0'-terminated.  */
+
+#define FILE_NAME_ABSOLUTE_N_P(NAME, LEN) amigaos_file_name_absolute_n ((NAME), (LEN))
+
+/* Return the file name part of the path name.  */
+
+#define FILE_NAME_NONDIRECTORY(NAME)					\
+  (rindex ((NAME), '/') ? rindex ((NAME), '/') + 1			\
+			: (rindex ((NAME), ':') ? rindex ((NAME), ':') + 1 \
+						: (NAME)))
+
+/* Generate the name of the cross reference file.  */
+
+#define XREF_FILE_NAME(BUFF, NAME)					\
+do									\
+  {									\
+    char *filesrc, *filedst;						\
+    strcpy ((BUFF), (NAME));						\
+    filesrc = FILE_NAME_NONDIRECTORY (NAME);				\
+    filedst = (BUFF) + (filesrc - (NAME));				\
+    sprintf (filedst, ".%s.gxref", filesrc);				\
+  }									\
+while (0)
--- gcc-2.95.3/gcc/config.in	Fri Mar 16 15:13:48 2001
+++ gcc/gcc/config.in	Fri Nov  2 10:39:24 2001
@@ -130,237 +130,267 @@
 /* Define to the version of the distribution.  */
 #undef VERSION
 
-/* Define if using alloca.c.  */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work.  */
-#undef const
 
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
-   This function is required for alloca.c support on those systems.  */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
 #undef CRAY_STACKSEG_END
 
-/* Define if you have alloca, as a function or macro.  */
+/* Define if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define if you have `alloca', as a function or macro. */
 #undef HAVE_ALLOCA
 
-/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
 #undef HAVE_ALLOCA_H
 
-/* Define if you don't have vprintf but do have _doprnt.  */
-#undef HAVE_DOPRNT
-
-/* Define if you have a working `mmap' system call.  */
-#undef HAVE_MMAP
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
-#undef HAVE_SYS_WAIT_H
-
-/* Define if you have <vfork.h>.  */
-#undef HAVE_VFORK_H
-
-/* Define if you have the vprintf function.  */
-#undef HAVE_VPRINTF
-
-/* Define as __inline if that's what the C compiler calls it.  */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef pid_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if `sys_siglist' is declared by <signal.h>.  */
-#undef SYS_SIGLIST_DECLARED
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#undef TIME_WITH_SYS_TIME
-
-/* Define vfork as fork if vfork does not work.  */
-#undef vfork
-
-/* Define if you have the __argz_count function.  */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function.  */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function.  */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
 
-/* Define if you have the atoll function.  */
+/* Define if you have the `atoll' function. */
 #undef HAVE_ATOLL
 
-/* Define if you have the atoq function.  */
+/* Define if you have the `atoq' function. */
 #undef HAVE_ATOQ
 
-/* Define if you have the bcmp function.  */
+/* Define if you have the `bcmp' function. */
 #undef HAVE_BCMP
 
-/* Define if you have the bcopy function.  */
+/* Define if you have the `bcopy' function. */
 #undef HAVE_BCOPY
 
-/* Define if you have the bsearch function.  */
+/* Define if you have the `bsearch' function. */
 #undef HAVE_BSEARCH
 
-/* Define if you have the bzero function.  */
+/* Define if you have the `bzero' function. */
 #undef HAVE_BZERO
 
-/* Define if you have the dcgettext function.  */
+/* Define if you have the `dcgettext' function. */
 #undef HAVE_DCGETTEXT
 
-/* Define if you have the fputc_unlocked function.  */
+/* Define if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define if you have the `fputc_unlocked' function. */
 #undef HAVE_FPUTC_UNLOCKED
 
-/* Define if you have the fputs_unlocked function.  */
+/* Define if you have the `fputs_unlocked' function. */
 #undef HAVE_FPUTS_UNLOCKED
 
-/* Define if you have the getcwd function.  */
+/* Define if you have the `getcwd' function. */
 #undef HAVE_GETCWD
 
-/* Define if you have the getpagesize function.  */
+/* Define if you have the `getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 
-/* Define if you have the getrlimit function.  */
+/* Define if you have the `getrlimit' function. */
 #undef HAVE_GETRLIMIT
 
-/* Define if you have the gettimeofday function.  */
+/* Define if you have the `gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 
-/* Define if you have the index function.  */
+/* Define if you have the `index' function. */
 #undef HAVE_INDEX
 
-/* Define if you have the isascii function.  */
+/* Define if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the `isascii' function. */
 #undef HAVE_ISASCII
 
-/* Define if you have the kill function.  */
+/* Define if you have the `kill' function. */
 #undef HAVE_KILL
 
-/* Define if you have the munmap function.  */
+/* Define if you have the `i' library (-li). */
+#undef HAVE_LIBI
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define if you have the `munmap' function. */
 #undef HAVE_MUNMAP
 
-/* Define if you have the popen function.  */
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the `popen' function. */
 #undef HAVE_POPEN
 
-/* Define if you have the putc_unlocked function.  */
+/* Define if you have the `putc_unlocked' function. */
 #undef HAVE_PUTC_UNLOCKED
 
-/* Define if you have the putenv function.  */
+/* Define if you have the `putenv' function. */
 #undef HAVE_PUTENV
 
-/* Define if you have the rindex function.  */
+/* Define if you have the `rindex' function. */
 #undef HAVE_RINDEX
 
-/* Define if you have the setenv function.  */
+/* Define if you have the `setenv' function. */
 #undef HAVE_SETENV
 
-/* Define if you have the setlocale function.  */
+/* Define if you have the `setlocale' function. */
 #undef HAVE_SETLOCALE
 
-/* Define if you have the setrlimit function.  */
+/* Define if you have the `setrlimit' function. */
 #undef HAVE_SETRLIMIT
 
-/* Define if you have the stpcpy function.  */
+/* Define if you have the <stab.h> header file. */
+#undef HAVE_STAB_H
+
+/* Define if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the `stpcpy' function. */
 #undef HAVE_STPCPY
 
-/* Define if you have the strcasecmp function.  */
+/* Define if you have the `strcasecmp' function. */
 #undef HAVE_STRCASECMP
 
-/* Define if you have the strchr function.  */
+/* Define if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
-/* Define if you have the strdup function.  */
+/* Define if you have the `strdup' function. */
 #undef HAVE_STRDUP
 
-/* Define if you have the strerror function.  */
+/* Define if you have the `strerror' function. */
 #undef HAVE_STRERROR
 
-/* Define if you have the strrchr function.  */
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the `strrchr' function. */
 #undef HAVE_STRRCHR
 
-/* Define if you have the strsignal function.  */
+/* Define if you have the `strsignal' function. */
 #undef HAVE_STRSIGNAL
 
-/* Define if you have the strtoul function.  */
+/* Define if you have the `strtoul' function. */
 #undef HAVE_STRTOUL
 
-/* Define if you have the sysconf function.  */
+/* Define if you have the `sysconf' function. */
 #undef HAVE_SYSCONF
 
-/* Define if you have the <argz.h> header file.  */
-#undef HAVE_ARGZ_H
+/* Define if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
 
-/* Define if you have the <direct.h> header file.  */
-#undef HAVE_DIRECT_H
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
 
-/* Define if you have the <fcntl.h> header file.  */
-#undef HAVE_FCNTL_H
+/* Define if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
 
-/* Define if you have the <limits.h> header file.  */
-#undef HAVE_LIMITS_H
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
 
-/* Define if you have the <locale.h> header file.  */
-#undef HAVE_LOCALE_H
+/* Define if you have the <sys/times.h> header file. */
+#undef HAVE_SYS_TIMES_H
 
-/* Define if you have the <malloc.h> header file.  */
-#undef HAVE_MALLOC_H
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
 
-/* Define if you have the <nl_types.h> header file.  */
-#undef HAVE_NL_TYPES_H
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
 
-/* Define if you have the <stab.h> header file.  */
-#undef HAVE_STAB_H
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
 
-/* Define if you have the <stddef.h> header file.  */
-#undef HAVE_STDDEF_H
+/* Define if you have the <time.h> header file. */
+#undef HAVE_TIME_H
 
-/* Define if you have the <stdlib.h> header file.  */
-#undef HAVE_STDLIB_H
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
 
-/* Define if you have the <string.h> header file.  */
-#undef HAVE_STRING_H
+/* Define if you have the `vfork' function. */
+#undef HAVE_VFORK
 
-/* Define if you have the <strings.h> header file.  */
-#undef HAVE_STRINGS_H
+/* Define if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
 
-/* Define if you have the <sys/file.h> header file.  */
-#undef HAVE_SYS_FILE_H
+/* Define if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
 
-/* Define if you have the <sys/param.h> header file.  */
-#undef HAVE_SYS_PARAM_H
+/* Define if `fork' works. */
+#undef HAVE_WORKING_FORK
 
-/* Define if you have the <sys/resource.h> header file.  */
-#undef HAVE_SYS_RESOURCE_H
+/* Define if `vfork' works. */
+#undef HAVE_WORKING_VFORK
 
-/* Define if you have the <sys/stat.h> header file.  */
-#undef HAVE_SYS_STAT_H
+/* Define if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
 
-/* Define if you have the <sys/time.h> header file.  */
-#undef HAVE_SYS_TIME_H
+/* Define if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
 
-/* Define if you have the <sys/times.h> header file.  */
-#undef HAVE_SYS_TIMES_H
+/* Define if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
 
-/* Define if you have the <time.h> header file.  */
-#undef HAVE_TIME_H
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+        STACK_DIRECTION > 0 => grows toward higher addresses
+        STACK_DIRECTION < 0 => grows toward lower addresses
+        STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
 
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
 
-/* Define if you have the i library (-li).  */
-#undef HAVE_LIBI
+/* Define if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
+#undef SYS_SIGLIST_DECLARED
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.
+   */
+#undef YYTEXT_POINTER
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+   if it is not supported. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
--- gcc-2.95.3/gcc/config/m68k/amigaos.c	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/m68k/amigaos.c	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,419 @@
+/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS.
+   Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
+   Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+   Heavily modified by Kamil Iskra (iskra@student.uci.agh.edu.pl).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "config.h"
+#include "system.h"
+#include "rtl.h"
+#include "output.h"
+#include "tree.h"
+#include "flags.h"
+#include "expr.h"
+
+/* Baserel support.  */
+
+/* Does operand (which is a symbolic_operand) live in text space? If
+   so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
+
+   This function is used in base relative code generation. */
+
+int
+read_only_operand (operand)
+     rtx operand;
+{
+  if (GET_CODE (operand) == CONST)
+    operand = XEXP (XEXP (operand, 0), 0);
+  if (GET_CODE (operand) == SYMBOL_REF)
+    return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
+  return 1;
+}
+
+/* This function is used while generating a base relative code.
+   It returns 1 if a decl is not relocatable, i. e., if it can be put
+   in the text section.
+   Currently, it's very primitive: it just checks if the object size
+   is less than 4 bytes (i. e., if it can hold a pointer).  It also
+   supports arrays and floating point types.  */
+
+int
+amigaos_put_in_text (decl)
+     tree decl;
+{
+  tree type = TREE_TYPE (decl);
+  if (TREE_CODE (type) == ARRAY_TYPE)
+    type = TREE_TYPE (type);
+  return (TREE_INT_CST_HIGH (TYPE_SIZE (type)) == 0
+	  && TREE_INT_CST_LOW (TYPE_SIZE (type)) < 32)
+	 || FLOAT_TYPE_P (type);
+}
+
+/* Common routine used to check if a4 should be preserved/restored.  */
+
+int
+amigaos_restore_a4 ()
+{
+  return (flag_pic >= 3 &&
+	  (TARGET_RESTORE_A4 || TARGET_ALWAYS_RESTORE_A4
+	   || lookup_attribute ("saveds",
+				TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))));
+}
+
+void
+amigaos_alternate_pic_setup (stream)
+     FILE *stream;
+{
+  if (TARGET_RESTORE_A4 || TARGET_ALWAYS_RESTORE_A4)
+    asm_fprintf (stream, "\tjbsr %U__restore_a4\n");
+  else if (lookup_attribute ("saveds",
+			     TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
+    asm_fprintf (stream, "\tlea %U__a4_init,%Ra4\n");
+}
+
+/* Attributes support.  */
+
+#define AMIGA_CHIP_SECTION_NAME ".datachip"
+
+/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine
+   specific attribute for DECL.  The attributes in ATTRIBUTES have previously
+   been assigned to DECL. */
+
+int
+valid_amigaos_decl_attribute (decl, identifier)
+     tree decl, identifier;
+{
+  if (TREE_CODE (decl) == VAR_DECL)
+    if (is_attribute_p ("chip", identifier))
+#ifdef ASM_OUTPUT_SECTION_NAME
+      {
+	if (! TREE_STATIC (decl) && ! DECL_EXTERNAL (decl))
+	  error ("`chip' attribute cannot be specified for local variables");
+	else
+	  {
+	    /* The decl may have already been given a section attribute from
+	       a previous declaration.  Ensure they match.  */
+	    if (DECL_SECTION_NAME (decl) == NULL_TREE)
+	      DECL_SECTION_NAME (decl) =
+		build_string (strlen (AMIGA_CHIP_SECTION_NAME) + 1,
+			      AMIGA_CHIP_SECTION_NAME);
+	    else if (strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
+			     AMIGA_CHIP_SECTION_NAME) != 0)
+	      {
+		error_with_decl (decl,
+			"`chip' for `%s' conflicts with previous declaration");
+		return 0;
+	      }
+	    return 1;
+	  }
+      }
+#else
+      error ("`chip' attribute is not supported for this target");
+#endif
+
+  return 0;
+}
+
+/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine
+   specific attribute for TYPE.  The attributes in ATTRIBUTES have previously
+   been assigned to TYPE.  */
+
+int
+valid_amigaos_type_attribute (type, attributes, identifier, args)
+     tree type, attributes, identifier, args;
+{
+  if (valid_m68k_type_attribute (type, attributes, identifier, args))
+    return 1;
+  else if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE)
+    {
+      if (is_attribute_p ("stackext", identifier))
+	{
+	  if (lookup_attribute ("interrupt", attributes))
+	    {
+	      error ("`stackext' and `interrupt' are mutually exclusive");
+	      return 0;
+	    }
+	  return 1;
+	}
+      if (is_attribute_p ("interrupt", identifier))
+	{
+	  if (lookup_attribute ("stackext", attributes))
+	    {
+	      error ("`stackext' and `interrupt' are mutually exclusive");
+	      return 0;
+	    }
+	  return 1;
+	}
+      if (is_attribute_p ("saveds", identifier))
+	return 1;
+    }
+
+  return 0;
+}
+
+/* Stack checking and automatic extension support.  */
+
+void
+amigaos_prologue_begin_hook (stream, fsize)
+     FILE *stream;
+     int fsize;
+{
+  if (TARGET_STACKCHECK)
+    {
+      if (fsize < 256)
+	asm_fprintf (stream, "\tcmpl %s,%Rsp\n"
+			     "\tjcc 0f\n"
+			     "\tjra %U__stkovf\n"
+			     "\t0:\n",
+		     (flag_pic == 3 ? "a4@(___stk_limit:W)" :
+				      (flag_pic == 4 ? "a4@(___stk_limit:L)" :
+						       "___stk_limit")));
+      else if (fsize < 0x8000)
+	asm_fprintf (stream, "\tmovel #%d:W,%Rd0\n\tjbsr %U__stkchk_d0\n",
+		     fsize);
+      else
+	asm_fprintf (stream, "\tmovel #%d,%Rd0\n\tjbsr %U__stkchk_d0\n",
+		     fsize);
+    }
+}
+
+void
+amigaos_alternate_frame_setup_f (stream, fsize)
+     FILE *stream;
+     int fsize;
+{
+  if (fsize < 128)
+    asm_fprintf (stream, "\tcmpl %s,%Rsp\n"
+			 "\tjcc 0f\n"
+			 "\tmoveq #%d,%Rd0\n"
+			 "\tmoveq #0,%Rd1\n"
+			 "\tjbsr %U__stkext_f\n"
+			 "0:\tlink %Ra5,#%d:W\n",
+		 (flag_pic == 3 ? "a4@(___stk_limit:W)" :
+				  (flag_pic == 4 ? "a4@(___stk_limit:L)" :
+						   "___stk_limit")),
+		 fsize, -fsize);
+  else if (fsize < 0x8000)
+    asm_fprintf (stream, "\tmovel #%d:W,%Rd0\n\tjbsr %U__link_a5_d0_f\n",
+		 fsize);
+  else
+    asm_fprintf (stream, "\tmovel #%d,%Rd0\n\tjbsr %U__link_a5_d0_f\n",
+		 fsize);
+}
+
+void
+amigaos_alternate_frame_setup (stream, fsize)
+     FILE *stream;
+     int fsize;
+{
+  if (! fsize)
+    asm_fprintf (stream, "\tcmpl %s,%Rsp\n"
+			 "\tjcc 0f\n"
+			 "\tmoveq #0,%Rd0\n"
+			 "\tmoveq #0,%Rd1\n"
+			 "\tjbsr %U__stkext_f\n"
+			 "0:\n",
+		 (flag_pic == 3 ? "a4@(___stk_limit:W)" :
+				  (flag_pic == 4 ? "a4@(___stk_limit:L)" :
+						   "___stk_limit")));
+  else if (fsize + 4 < 128)
+    asm_fprintf (stream, "\tcmpl %s,%Rsp\n"
+			 "\tjcc 0f\n"
+			 "\tmoveq #%d,%Rd0\n"
+			 "\tmoveq #0,%Rd1\n"
+			 "\tjbsr %U__stkext_f\n"
+			 "0:\taddw #%d,%Rsp\n",
+		 (flag_pic == 3 ? "a4@(___stk_limit:W)" :
+				  (flag_pic == 4 ? "a4@(___stk_limit:L)" :
+						   "___stk_limit")),
+		 fsize + 4, -(fsize + 4));
+  else if (fsize + 4 < 0x8000)
+    asm_fprintf (stream, "\tmovel #%d:W,%Rd0\n\tjbsr %U__sub_d0_sp_f\n",
+		 fsize + 4);
+  else
+    asm_fprintf (stream, "\tmovel %0I%d,%Rd0\n\tjbsr %U__sub_d0_sp_f\n",
+		 fsize + 4);
+}
+
+static rtx
+gen_stack_management_call (stack_pointer, arg, func)
+     rtx stack_pointer;
+     rtx arg;
+     char *func;
+{
+  rtx call_insn, call, seq, name;
+  start_sequence ();
+
+  /* Move arg to d0.  */
+  emit_move_insn (gen_rtx (REG, SImode, 0), arg);
+
+  /* Generate the function reference.  */
+  name = gen_rtx (SYMBOL_REF, Pmode, func);
+  SYMBOL_REF_FLAG (name) = 1;
+  /* If optimizing, put it in a psedo so that several loads can be merged
+     into one.  */
+  if (optimize && ! flag_no_function_cse)
+    name = copy_to_reg (name);
+
+  /* Generate the function call.  */
+  call = gen_rtx (CALL, VOIDmode, gen_rtx (MEM, FUNCTION_MODE, name),
+		  const0_rtx);
+  /* If we are doing stack extension, notify about the sp change.  */
+  if (stack_pointer)
+    call = gen_rtx (SET, VOIDmode, stack_pointer, call);
+
+  /* Generate the call instruction.  */
+  call_insn = emit_call_insn (call);
+  /* Stack extension does not change memory in an unpredictable way.  */
+  CONST_CALL_P (call_insn) = 1;
+  /* We pass an argument in d0.  */
+  CALL_INSN_FUNCTION_USAGE (call_insn) = gen_rtx (EXPR_LIST, VOIDmode,
+	gen_rtx (USE, VOIDmode, gen_rtx (REG, SImode, 0)), 0);
+
+  seq = gen_sequence ();
+  end_sequence ();
+  return seq;
+}
+
+rtx
+gen_stack_cleanup_call (stack_pointer, sa)
+     rtx stack_pointer;
+     rtx sa;
+{
+  return gen_stack_management_call (stack_pointer, sa, "__move_d0_sp");
+}
+
+void
+amigaos_alternate_allocate_stack (operands)
+     rtx *operands;
+{
+  if (TARGET_STACKEXTEND)
+    emit_insn ((rtx)gen_stack_management_call (stack_pointer_rtx, operands[1],
+					       "__sub_d0_sp"));
+  else
+    {
+      if (TARGET_STACKCHECK)
+	emit_insn ((rtx)gen_stack_management_call (0, operands[1],
+						   "__stkchk_d0"));
+      anti_adjust_stack (operands[1]);
+    }
+  emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
+}
+
+/* begin-GG-local: explicit register specification for parameters */
+
+/* Initialize a variable CUM of type CUMULATIVE_ARGS
+   for a call to a function whose data type is FNTYPE.
+   For a library call, FNTYPE is 0.  */
+
+void
+amigaos_init_cumulative_args(CUMULATIVE_ARGS *cum, tree fntype)
+{
+  m68k_init_cumulative_args(cum, fntype);
+
+  if (fntype)
+    cum->formal_type=TYPE_ARG_TYPES(fntype);
+  else /* Call to compiler-support function. */
+    cum->formal_type=0;
+}
+
+/* Update the data in CUM to advance over an argument.  */
+
+void
+amigaos_function_arg_advance(CUMULATIVE_ARGS *cum)
+{
+  m68k_function_arg_advance(cum);
+
+  if (cum->formal_type)
+    cum->formal_type=TREE_CHAIN((tree)cum->formal_type);
+}
+
+/* A C expression that controls whether a function argument is passed
+   in a register, and which register. */
+
+struct rtx_def *
+amigaos_function_arg(CUMULATIVE_ARGS *cum, enum machine_mode mode,
+  tree type)
+{
+  tree asmtree;
+  if (cum->formal_type && TREE_VALUE((tree)cum->formal_type)
+      && (asmtree=lookup_attribute("asm",
+			TYPE_ATTRIBUTES(TREE_VALUE((tree)cum->formal_type)))))
+    {
+      int i;
+#if 0
+      /* See c-decl.c/push_parm_decl for an explanation why this doesn't work.
+       */
+      cum->last_arg_reg=TREE_INT_CST_LOW(TREE_VALUE(TREE_VALUE(asmtree)));
+#else
+      cum->last_arg_reg=TREE_INT_CST_LOW(TREE_VALUE(asmtree));
+#endif
+      cum->last_arg_len=HARD_REGNO_NREGS(cum->last_arg_reg, mode);
+
+      for (i=0; i<cum->last_arg_len; i++)
+	if (cum->regs_already_used & (1 << cum->last_arg_reg+i))
+	  {
+	    error("two parameters allocated for one register");
+	    break;
+	  }
+      return gen_rtx(REG, mode, cum->last_arg_reg);
+    }
+  else
+    return (struct rtx_def *)m68k_function_arg(cum, mode, type);
+}
+
+/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible,
+   one if they are compatible, and two if they are nearly compatible
+   (which causes a warning to be generated). */
+
+int
+comp_amigaos_type_attributes(tree type1, tree type2)
+{
+  int ret;
+  if ((ret=comp_m68k_type_attributes(type1, type2))!=1)
+    return ret;
+
+  /* Functions or methods are incompatible if they specify mutually exclusive
+     ways of passing arguments. */
+  if (TREE_CODE(type1)==FUNCTION_TYPE || TREE_CODE(type1)==METHOD_TYPE)
+    {
+      tree arg1, arg2;
+      arg1=TYPE_ARG_TYPES(type1);
+      arg2=TYPE_ARG_TYPES(type2);
+      for (; arg1 && arg2; arg1=TREE_CHAIN(arg1), arg2=TREE_CHAIN(arg2))
+	if (TREE_VALUE(arg1) && TREE_VALUE(arg2))
+	  {
+	    tree asm1, asm2;
+	    asm1=lookup_attribute("asm", TYPE_ATTRIBUTES(TREE_VALUE(arg1)));
+	    asm2=lookup_attribute("asm", TYPE_ATTRIBUTES(TREE_VALUE(arg2)));
+	    if (asm1 && asm2)
+	      {
+		if (TREE_INT_CST_LOW(TREE_VALUE(asm1))!=
+		    TREE_INT_CST_LOW(TREE_VALUE(asm2)))
+		  return 0; /* Two different registers specified. */
+	      }
+	    else
+	      if (asm1 || asm2)
+		return 0; /* "asm" used in only one type. */
+	  }
+    }
+  return 1;
+}
+
+/* end-GG-local */
--- gcc-2.95.3/gcc/config/m68k/amigaos.h	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/m68k/amigaos.h	Wed Dec 19 19:24:12 2001
@@ -0,0 +1,633 @@
+/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS.
+   Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc.
+   Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+   Heavily modified by Kamil Iskra (iskra@student.uci.agh.edu.pl).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "m68k/m68k.h"
+
+/* begin-GG-local: explicit register specification for parameters */
+#define TARGET_AMIGAOS
+/* end-GG-local */
+
+/* Specs, switches.  */
+
+/* See m68k.h for bits in TARGET_DEFAULT.
+   0 means 68000, no hardware fpu (68881/68882/68040/68060).  */
+
+#define TARGET_DEFAULT 0
+
+/* Define __HAVE_68881__ in preprocessor according to the -m flags.
+   This will control the use of inline 68881 insns in certain macros.
+   Also inform the program which CPU we compile for.
+   When creating shared libraries, use different 'errno'.  */
+
+/* -msoft-float is the default, assume -mc68000 as well */
+#define CPP_SPEC							\
+  "%{m68881:-D__HAVE_68881__} "						\
+  "%{!ansi:"								\
+    "%{m68020:-Dmc68020} "						\
+    "%{mc68020:-Dmc68020} "						\
+    "%{m68020-40:-Dmc68020} "						\
+    "%{m68020-60:-Dmc68020} "						\
+    "%{m68030:-Dmc68030} "						\
+    "%{m68040:-Dmc68040} "						\
+    "%{m68060:-Dmc68060} "						\
+    "%{!noixemul:-Dixemul} "						\
+    "%{noixemul:-Dlibnix}} "						\
+  "%{m68020:-D__mc68020__ -D__mc68020} "				\
+  "%{mc68020:-D__mc68020__ -D__mc68020} "				\
+  "%{m68020-40:-D__mc68020__ -D__mc68020} "				\
+  "%{m68020-60:-D__mc68020__ -D__mc68020} "				\
+  "%{m68030:-D__mc68030__ -D__mc68030} "				\
+  "%{m68040:-D__mc68040__ -D__mc68040} "				\
+  "%{m68060:-D__mc68060__ -D__mc68060} "				\
+  "%{!noixemul:-D__ixemul__ -D__ixemul} "				\
+  "%{noixemul:-D__libnix__ -D__libnix} "				\
+  "%{malways-restore-a4:-Derrno=(*ixemul_errno)} "			\
+  "%{mrestore-a4:-Derrno=(*ixemul_errno)} "
+
+/* Various -m flags require special flags to the assembler.  */
+
+#define ASM_SPEC "\
+ %{m68000:-mc68010}\
+ %{mc68000:-mc68010}\
+ %{m68020:-mc68020}\
+ %{mc68020:-mc68020}\
+ %{m68030:-mc68030}\
+ %{m68040:-mc68040}\
+ %{m68060:-mc68060}\
+ %{m68020-40:-mc68020}\
+ %{m68020-60:-mc68020}\
+ %{!mc68000:%{!m68000:%{!mc68020:%{!m68020:%{!m68030:%{!m68040:%{!m68060:%{!m68020-40:%{!m68020-60:-mc68010}}}}}}}}}\
+ %{msmall-code:-sc}\
+"
+
+/* amiga/amigaos are the new "standard" defines for the Amiga.
+ * MCH_AMIGA, AMIGA, __chip etc. are used in other compilers and are
+ * provided for compatibility reasons.  */
+
+#define CPP_PREDEFINES "\
+ -Dmc68000\
+ -Damiga\
+ -Damigaos\
+ -DMCH_AMIGA\
+ -DAMIGA\
+ -D__chip=__attribute__((__chip__))\
+ -D__saveds=__attribute__((__saveds__))\
+ -D__interrupt=__attribute__((__interrupt__))\
+ -D__stackext=__attribute__((__stackext__))\
+ -D__regargs=__attribute__((__regparm__))\
+ -D__stdargs=__attribute__((__stkparm__))\
+ -D__aligned=__attribute__((__aligned__(4)))\
+ -Asystem(amigaos)\
+ -Acpu(m68k)\
+ -Amachine(m68k)\
+"
+
+/* Choose the right startup file, depending on whether we use base relative
+   code, base relative code with automatic relocation (-resident), their
+   32-bit versions, libnix, profiling or plain crt0.o.  */
+
+#define STARTFILE_SPEC							\
+  "%{!noixemul:"							\
+    "%{fbaserel:%{!resident:bcrt0.o%s}}"				\
+    "%{resident:rcrt0.o%s}"						\
+    "%{fbaserel32:%{!resident32:lcrt0.o%s}}"				\
+    "%{resident32:scrt0.o%s}"						\
+    "%{!resident:%{!fbaserel:%{!resident32:%{!fbaserel32:"		\
+      "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}}}"		\
+  "%{noixemul:"								\
+    "%{resident:libnix/nrcrt0.o%s} "					\
+    "%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}}} "
+
+#define ENDFILE_SPEC "%{noixemul:-lstubs}"
+
+/* Automatically search libamiga.a for AmigaOS specific functions.  Note
+   that we first search the standard C library to resolve as much as
+   possible from there, since it has names that are duplicated in libamiga.a
+   which we *don't* want from there.  Then search libamiga.a for any calls
+   that were not generated inline, and finally search the standard C library
+   again to resolve any references that libamiga.a might have generated.
+   This may only be a temporary solution since it might be better to simply
+   remove the things from libamiga.a that should be pulled in from libc.a
+   instead, which would eliminate the first reference to libc.a.  Note that
+   if we don't search it automatically, it is very easy for the user to try
+   to put in a -lamiga himself and get it in the wrong place, so that (for
+   example) calls like sprintf come from -lamiga rather than -lc. */
+
+#define LIB_SPEC							\
+  "%{!noixemul:"							\
+    "%{!p:%{!pg:-lc -lamiga -lc}}"					\
+    "%{p:-lc_p}%{pg:-lc_p}}"						\
+  "%{noixemul:-lnixmain -lnix -lamiga "					\
+    "%{mstackcheck:-lstack} "						\
+    "%{mstackextend:-lstack}} -lamigastubs"
+
+/* If debugging, tell the linker to output amiga-hunk symbols *and* a BSD
+   compatible debug hunk.
+   Also, pass appropriate linker flavours depending on user-supplied
+   commandline options.  */
+
+#define LINK_SPEC							\
+  "%{noixemul:-fl libnix} "						\
+  "%{fbaserel:%{!resident:-m amiga_bss -fl libb}} "			\
+  "%{resident:-m amiga_bss -amiga-datadata-reloc -fl libb} "		\
+  "%{fbaserel32:%{!resident32:-m amiga_bss -fl libb32}} "		\
+  "%{resident32:-m amiga_bss -amiga-datadata-reloc -fl libb32} "	\
+  "%{g:-amiga-debug-hunk} "						\
+  "%{m68020:-fl libm020} "						\
+  "%{mc68020:-fl libm020} "						\
+  "%{m68030:-fl libm020} "						\
+  "%{m68040:-fl libm020} "						\
+  "%{m68060:-fl libm020} "						\
+  "%{m68020-40:-fl libm020} "						\
+  "%{m68020-60:-fl libm020} "						\
+  "%{m68881:-fl libm881} "
+
+/* Translate '-resident' to '-fbaserel' (they differ in linking stage only).
+   Don't put function addresses in registers for PC-relative code.  */
+
+#define CC1_SPEC							\
+  "%{resident:-fbaserel} "						\
+  "%{resident32:-fbaserel32} "						\
+  "%{msmall-code:-fno-function-cse} "
+
+/* Compile with stack extension.  */
+
+#define MASK_STACKEXTEND 0x40000000
+#define TARGET_STACKEXTEND (((target_flags & MASK_STACKEXTEND)		\
+  && !lookup_attribute ("interrupt",					\
+			TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) \
+  || lookup_attribute ("stackext",					\
+		       TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
+
+/* Compile with stack checking.  */
+
+#define MASK_STACKCHECK 0x20000000
+#define TARGET_STACKCHECK ((target_flags & MASK_STACKCHECK)		\
+  && !(target_flags & MASK_STACKEXTEND)					\
+  && !lookup_attribute ("interrupt",					\
+			TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))) \
+  && !lookup_attribute ("stackext",					\
+			TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
+
+/* Compile with a4 restoring in public functions.  */
+
+#define MASK_RESTORE_A4 0x10000000
+#define TARGET_RESTORE_A4						\
+  ((target_flags & MASK_RESTORE_A4) && TREE_PUBLIC (current_function_decl))
+
+/* Compile with a4 restoring in all functions.  */
+
+#define MASK_ALWAYS_RESTORE_A4 0x8000000
+#define TARGET_ALWAYS_RESTORE_A4 (target_flags & MASK_ALWAYS_RESTORE_A4)
+
+/* Provide a dummy entry for the '-msmall-code' switch.  This is used by
+   the assembler and '*_SPEC'.  */
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES						\
+    { "small-code", 0},							\
+    { "stackcheck", MASK_STACKCHECK},					\
+    { "no-stackcheck", - MASK_STACKCHECK},				\
+    { "stackextend", MASK_STACKEXTEND},					\
+    { "no-stackextend", - MASK_STACKEXTEND},				\
+    { "fixedstack", - (MASK_STACKCHECK|MASK_STACKEXTEND)},		\
+    { "restore-a4", MASK_RESTORE_A4},					\
+    { "no-restore-a4", - MASK_RESTORE_A4},				\
+    { "always-restore-a4", MASK_ALWAYS_RESTORE_A4},			\
+    { "no-always-restore-a4", - MASK_ALWAYS_RESTORE_A4},
+
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS					\
+do									\
+  {									\
+    if (!TARGET_68020 && flag_pic==4)					\
+      error ("-fbaserel32 is not supported on the 68000 or 68010\n");	\
+  }									\
+while (0)
+
+/* Various ABI issues.  */
+
+/* This is (almost;-) BSD, so it wants DBX format.  */
+
+#define DBX_DEBUGGING_INFO
+
+/* GDB goes mad if it sees the function end marker.  */
+
+#define NO_DBX_FUNCTION_END 1
+
+/* Allow folding division by zero.  */
+
+#define REAL_INFINITY
+
+/* Don't try using XFmode since we don't have appropriate runtime software
+   support.  */
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
+
+/* Use A5 as framepointer instead of A6, since the AmigaOS ABI requires A6
+   to be used as a shared library base pointer in direct library calls.  */
+
+#undef FRAME_POINTER_REGNUM
+#define FRAME_POINTER_REGNUM 13
+#undef ARG_POINTER_REGNUM
+#define ARG_POINTER_REGNUM 13
+
+/* We use A4 for the PIC pointer, not A5, which is the framepointer.  */
+
+#undef PIC_OFFSET_TABLE_REGNUM
+#define PIC_OFFSET_TABLE_REGNUM 12
+
+/* The AmigaOS ABI does not define how structures should be returned, so,
+   contrary to 'm68k.h', we prefer a multithread-safe solution.  */
+
+#undef PCC_STATIC_STRUCT_RETURN
+
+/* Setup a default shell return value for those (gazillion..) programs that
+   (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
+   cause the shell to randomly caugh upon executing such programs (contrary
+   to Unix, AmigaOS scripts are terminated with an error if a program returns
+   with an error code above the `error' or even `failure' level
+   (which is configurable with the FAILAT command)).  */
+
+#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "unsigned int"
+
+/* Support sections in chip memory, currently '.datachip' only.  */
+#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC)		\
+  fprintf ((FILE), "\t%s\n", (NAME))
+
+/* We define ASM_OUTPUT_SECTON_NAME, but we don't support arbitrary sections,
+   including '.gcc_except_table', so we emulate the standard behaviour.  */
+#define EXCEPTION_SECTION()						\
+do									\
+  {									\
+    if (flag_pic)							\
+      data_section ();							\
+    else								\
+      readonly_data_section ();						\
+  }									\
+while(0)
+
+#define EH_FRAME_SECTION() readonly_data_section ()
+
+/* Use sjlj exceptions until problems with DWARF2 unwind info on a.out
+   targets using GNU ld are fixed.  */
+#define DWARF2_UNWIND_INFO	0
+
+/* GAS supports alignment up to 32768 bytes.  */
+#undef ASM_OUTPUT_ALIGN
+#define ASM_OUTPUT_ALIGN(FILE, LOG)					\
+do									\
+  {									\
+    if ((LOG) == 1)							\
+      fprintf ((FILE), "\t.even\n");					\
+    else								\
+      fprintf ((FILE), "\t.align %d\n", (LOG));				\
+  }									\
+while (0)
+
+#define MAX_OFILE_ALIGNMENT ((1 << 15)*BITS_PER_UNIT)
+
+/* It is not uncommon to use a custom startup code on AmigaOS.  The OS
+   starts an application by jumping to the first byte of the text section,
+   so we prefer the constants to be put after the functions.  */
+/* FIXME: Disabled for now, it's buggy.  */
+
+/* #define CONSTANT_AFTER_FUNCTION_P(EXP) 1 */ /**/
+
+/* Call __flush_cache() after building the trampoline: it will call
+   an appropriate OS cache-clearing routine.  */
+
+#undef FINALIZE_TRAMPOLINE
+#define FINALIZE_TRAMPOLINE(TRAMP)					\
+  emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__flush_cache"),	\
+		     0, VOIDmode, 2, (TRAMP), Pmode,			\
+		     GEN_INT (TRAMPOLINE_SIZE), SImode)
+
+/* Baserel support.  */
+
+/* Given that symbolic_operand(X), return TRUE if no special
+   base relative relocation is necessary */
+
+#define LEGITIMATE_BASEREL_OPERAND_P(X)					\
+  (flag_pic >= 3 && read_only_operand (X))
+
+#undef LEGITIMATE_PIC_OPERAND_P
+#define LEGITIMATE_PIC_OPERAND_P(X)					\
+  (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
+
+/* Define this macro if references to a symbol must be treated
+   differently depending on something about the variable or
+   function named by the symbol (such as what section it is in).
+
+   The macro definition, if any, is executed immediately after the
+   rtl for DECL or other node is created.
+   The value of the rtl will be a `mem' whose address is a
+   `symbol_ref'.
+
+   The usual thing for this macro to do is to a flag in the
+   `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
+   name string in the `symbol_ref' (if one bit is not enough
+   information).
+
+   On the Amiga we use this to indicate if references to a symbol should be
+   absolute or base relative.  */
+
+#define ENCODE_SECTION_INFO(DECL)					\
+do									\
+  {									\
+    if (TREE_CODE (DECL) == FUNCTION_DECL)				\
+      SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;			\
+    else								\
+      {									\
+	rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'		\
+		   ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));		\
+	if ((RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl)		\
+	     && (flag_pic<3 || (TREE_CODE (DECL) == STRING_CST		\
+				&& !flag_writable_strings)		\
+		 || amigaos_put_in_text (DECL)))			\
+	    || (TREE_CODE (DECL) == VAR_DECL				\
+		&& DECL_SECTION_NAME (DECL) != NULL_TREE))		\
+	  SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;				\
+      }									\
+  }									\
+while (0)
+
+#define LIBCALL_ENCODE_SECTION_INFO(FUN)				\
+do									\
+  {									\
+    if (flag_pic >= 3)							\
+      SYMBOL_REF_FLAG (FUN) = 1;					\
+  }									\
+while (0)
+
+/* according to varasm.c, RELOC referrs *only* to whether constants (!)
+   are addressed by address. */
+
+#undef SELECT_SECTION
+#define SELECT_SECTION(DECL, RELOC)					\
+{									\
+  if (TREE_CODE (DECL) == STRING_CST)					\
+    {									\
+      if (! flag_writable_strings)					\
+	readonly_data_section ();					\
+      else								\
+	data_section ();						\
+    }									\
+  else if (TREE_CODE (DECL) == VAR_DECL)				\
+    {									\
+      if (TREE_READONLY (DECL)						\
+	  && ! TREE_THIS_VOLATILE (DECL)				\
+	  && DECL_INITIAL (DECL)					\
+	  && (DECL_INITIAL (DECL) == error_mark_node			\
+	      || TREE_CONSTANT (DECL_INITIAL (DECL)))			\
+	  && (!flag_pic || (flag_pic<3 && !RELOC)			\
+	      || SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0))))		\
+	readonly_data_section ();					\
+      else								\
+	data_section ();						\
+    }									\
+  else if ((!flag_pic || (flag_pic<3 && !RELOC))			\
+	   && SYMBOL_REF_FLAG (XEXP ((TREE_CODE_CLASS (TREE_CODE (DECL))\
+		!= 'd' ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)), 0)))	\
+    readonly_data_section ();						\
+  else									\
+    data_section ();							\
+}
+
+/* Preserve the initial value of a4.  */
+
+#define PROLOGUE_EXTRA_SAVE(MASK, NUM_SAVED_REGS)			\
+do									\
+  {									\
+    if (amigaos_restore_a4 ())						\
+      {									\
+	(MASK) |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM);			\
+	(NUM_SAVED_REGS)++;						\
+      }									\
+  }									\
+while (0)
+
+/* Restore the initial value of a4.  */
+
+#define EPILOGUE_EXTRA_RESTORE(MASK, NREGS)				\
+do									\
+  {									\
+    if (amigaos_restore_a4 ())						\
+      {									\
+	(MASK) |= 1 << PIC_OFFSET_TABLE_REGNUM;				\
+	(NREGS)++;							\
+      }									\
+  }									\
+while (0)
+
+#define HAVE_ALTERNATE_PIC_SETUP (flag_pic >= 3)
+
+/* Make a4 point at data hunk.  */
+
+void amigaos_alternate_pic_setup ();
+#define ALTERNATE_PIC_SETUP(STREAM)					\
+  (amigaos_alternate_pic_setup (STREAM))
+
+/* If preserving a4, let the code generator know about it.  */
+
+#undef SUBTARGET_INITIAL_FP_OFFSET
+#define SUBTARGET_INITIAL_FP_OFFSET(OFFSET)				\
+do									\
+  {									\
+    if (amigaos_restore_a4 ())						\
+      (OFFSET) += 4;							\
+  }									\
+while (0)
+
+/* Determine if the epilogue should be output as RTL.
+   Don't do it if preserving a4.  */
+
+#undef USE_RETURN_INSN
+#define USE_RETURN_INSN (use_return_insn () && ! amigaos_restore_a4 ())
+
+/* Attribute support.  */
+
+/* A C expression whose value is nonzero if IDENTIFIER with arguments
+   ARGS is a valid machine specific attribute for DECL.  The attributes
+   in ATTRIBUTES have previously been assigned to DECL.  */
+
+#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
+  (valid_amigaos_decl_attribute ((DECL), (IDENTIFIER)))
+
+/* A C expression whose value is nonzero if IDENTIFIER with arguments
+   ARGS is a valid machine specific attribute for TYPE.  The attributes
+   in ATTRIBUTES have previously been assigned to TYPE.  */
+
+#undef VALID_MACHINE_TYPE_ATTRIBUTE
+#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
+  (valid_amigaos_type_attribute ((TYPE), (ATTRIBUTES), (IDENTIFIER), (ARGS)))
+
+/* Generate the test of d0 before return to set cc register in 'interrupt'
+   function.  */
+
+#define EPILOGUE_END_HOOK(STREAM)					\
+do									\
+  {									\
+    if (lookup_attribute ("interrupt",					\
+			  TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) \
+      asm_fprintf ((STREAM), "\ttstl %Rd0\n");				\
+  }									\
+while (0)
+
+/* begin-GG-local: explicit register specification for parameters */
+
+/* Note: this is an extension of m68k_args */
+struct amigaos_args
+{
+  int num_of_regs;
+  long regs_already_used;
+  int last_arg_reg;
+  int last_arg_len;
+  void *formal_type; /* New field: formal type of the current argument.  */
+};
+
+/* A C type for declaring a variable that is used as the first
+   argument of `FUNCTION_ARG' and other related values.  */
+
+#undef CUMULATIVE_ARGS
+#define CUMULATIVE_ARGS struct amigaos_args
+
+/* Initialize a variable CUM of type CUMULATIVE_ARGS
+   for a call to a function whose data type is FNTYPE.
+   For a library call, FNTYPE is 0.  */
+
+#undef INIT_CUMULATIVE_ARGS
+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)		\
+  (amigaos_init_cumulative_args(&(CUM), (FNTYPE)))
+
+/* Update the data in CUM to advance over an argument
+   of mode MODE and data type TYPE.
+   (TYPE is null for libcalls where that information may not be available.)  */
+
+#undef FUNCTION_ARG_ADVANCE
+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)			\
+  (amigaos_function_arg_advance (&(CUM)))
+
+/* A C expression that controls whether a function argument is passed
+   in a register, and which register. */
+
+#undef FUNCTION_ARG
+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
+  ((struct rtx_def *)amigaos_function_arg (&(CUM), (MODE), (TYPE)))
+
+/* A C expression whose value is zero if the attributes on TYPE1 and
+   TYPE2 are incompatible, one if they are compatible, and two if they
+   are nearly compatible (which causes a warning to be generated).  */
+
+#undef COMP_TYPE_ATTRIBUTES
+#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) 				\
+  (comp_amigaos_type_attributes ((TYPE1), (TYPE2)))
+
+/* end-GG-local */
+
+/* Stack checking and automatic extension support.  */
+
+void amigaos_prologue_begin_hook ();
+#define PROLOGUE_BEGIN_HOOK(STREAM, FSIZE)				\
+  (amigaos_prologue_begin_hook ((STREAM), (FSIZE)))
+
+#define HAVE_ALTERNATE_FRAME_SETUP_F(FSIZE) TARGET_STACKEXTEND
+
+void amigaos_alternate_frame_setup_f ();
+#define ALTERNATE_FRAME_SETUP_F(STREAM, FSIZE)				\
+  (amigaos_alternate_frame_setup_f ((STREAM), (FSIZE)))
+
+#define HAVE_ALTERNATE_FRAME_SETUP(FSIZE) TARGET_STACKEXTEND
+
+void amigaos_alternate_frame_setup ();
+#define ALTERNATE_FRAME_SETUP(STREAM, FSIZE)				\
+  (amigaos_alternate_frame_setup ((STREAM), (FSIZE)))
+
+#define HAVE_ALTERNATE_FRAME_DESTR_F(FSIZE)				\
+  (TARGET_STACKEXTEND && current_function_calls_alloca)
+
+#define ALTERNATE_FRAME_DESTR_F(STREAM, FSIZE)				\
+  (asm_fprintf ((STREAM), "\tjra %U__unlk_a5_rts\n"))
+
+#define HAVE_ALTERNATE_RETURN						\
+  (TARGET_STACKEXTEND && frame_pointer_needed &&			\
+   current_function_calls_alloca)
+
+#define ALTERNATE_RETURN(STREAM)
+
+struct rtx_def* gen_stack_cleanup_call ();
+#define HAVE_restore_stack_nonlocal TARGET_STACKEXTEND
+#define gen_restore_stack_nonlocal gen_stack_cleanup_call
+
+#define HAVE_restore_stack_function TARGET_STACKEXTEND
+#define gen_restore_stack_function gen_stack_cleanup_call
+
+#define HAVE_restore_stack_block TARGET_STACKEXTEND
+#define gen_restore_stack_block gen_stack_cleanup_call
+
+#undef TARGET_ALTERNATE_ALLOCATE_STACK
+#define TARGET_ALTERNATE_ALLOCATE_STACK 1
+
+#define ALTERNATE_ALLOCATE_STACK(OPERANDS)				\
+do									\
+  {									\
+    amigaos_alternate_allocate_stack (OPERANDS);			\
+    DONE;								\
+  }									\
+while (0)
+
+/* begin-GG-local: dynamic libraries */
+
+/* This macro is used to check if all collect2 facilities should be used.
+   We need a few special ones, like stripping after linking.  */
+
+#define DO_COLLECTING (do_collecting || amigaos_do_collecting())
+
+/* This macro is called in collect2 for every GCC argument name.
+   ARG is a part of commandline (without '\0' at the end).  */
+
+#define COLLECT2_GCC_OPTIONS_HOOK(ARG) amigaos_gccopts_hook(ARG)
+
+/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a"
+   argument.  ARG is a complete argument, with '\0' at the end.  */
+
+#define COLLECT2_LIBNAME_HOOK(ARG) amigaos_libname_hook(ARG)
+
+/* This macro is called at collect2 exit, to clean everything up.  */
+
+#define COLLECT2_EXTRA_CLEANUP amigaos_collect2_cleanup
+
+/* This macro is called just before the first linker invocation.
+   LD1_ARGV is "char** argv", which will be passed to "ld".  STRIP is an
+   *address* of "strip_flag" variable.  */
+
+#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \
+amigaos_prelink_hook((LD1_ARGV), (STRIP))
+
+/* This macro is called just after the first linker invocation, in place of
+   "nm" and "ldd".  OUTPUT_FILE is the executable's filename.  */
+
+#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) amigaos_postlink_hook(OUTPUT_FILE)
+/* end-GG-local */
--- gcc-2.95.3/gcc/config/m68k/m68k.c	Mon Aug  2 06:51:08 1999
+++ gcc/gcc/config/m68k/m68k.c	Thu Sep 27 19:35:54 2001
@@ -63,6 +63,8 @@
 const char *m68k_align_jumps_string;
 /* Specify power of two alignment used for functions. */
 const char *m68k_align_funcs_string;
+/* Specify number of registers for integer, pointer and float arguments.  */
+const char *m68k_regparm_string;
 
 /* Specify power of two alignment used for loops. */
 int m68k_align_loops;
@@ -70,6 +72,8 @@
 int m68k_align_jumps;
 /* Specify power of two alignment used for functions. */
 int m68k_align_funcs;
+/* Specify number of registers for integer, pointer and float arguments.  */
+int m68k_regparm;
 
 /* Nonzero if the last compare/test insn had FP operands.  The
    sCC expanders peek at this to determine what to do for the
@@ -124,6 +128,19 @@
     }
   else
     m68k_align_funcs = def_align;
+
+  /* Validate -mregparm and -mregparm= value.  */
+  if (m68k_regparm_string)
+    {
+      m68k_regparm = atoi (m68k_regparm_string);
+      if (m68k_regparm < 1 || m68k_regparm > M68K_MAX_REGPARM)
+	fatal ("-mregparm=%d is not between 1 and %d",
+	       m68k_regparm, M68K_MAX_REGPARM);
+      target_flags |= MASK_REGPARM;
+    }
+  else
+    if (TARGET_REGPARM)
+      m68k_regparm = M68K_DEFAULT_REGPARM;
 }
 
 /* This function generates the assembly code for function entry.
@@ -151,9 +168,17 @@
   int fsize = (size + 3) & -4;
   int cfa_offset = INCOMING_FRAME_SP_OFFSET, cfa_store_offset = cfa_offset;
   
+#ifdef PROLOGUE_BEGIN_HOOK
+  PROLOGUE_BEGIN_HOOK (stream, fsize);
+#endif
 
   if (frame_pointer_needed)
     {
+#ifdef HAVE_ALTERNATE_FRAME_SETUP_F
+      if (HAVE_ALTERNATE_FRAME_SETUP_F (fsize))
+	ALTERNATE_FRAME_SETUP_F (stream, fsize);
+      else
+#endif
       if (fsize == 0 && TARGET_68040)
 	{
 	/* on the 68040, pea + move is faster than link.w 0 */
@@ -209,6 +234,10 @@
 	  cfa_store_offset += fsize;
 	}
     }
+#ifdef HAVE_ALTERNATE_FRAME_SETUP
+  else if (HAVE_ALTERNATE_FRAME_SETUP (fsize))
+    ALTERNATE_FRAME_SETUP (stream, fsize);
+#endif
   else if (fsize)
     {
       if (fsize + 4 < 0x8000)
@@ -356,11 +385,14 @@
       mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
       num_saved_regs--;
     }
-  if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+  if (flag_pic && flag_pic < 3 && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
     {
       mask |= 1 << (15 - PIC_OFFSET_TABLE_REGNUM);
       num_saved_regs++;
     }
+#ifdef PROLOGUE_EXTRA_SAVE
+  PROLOGUE_EXTRA_SAVE (mask, num_saved_regs);
+#endif
 
 #if NEED_PROBE
 #ifdef MOTOROLA
@@ -462,6 +494,11 @@
 				  -cfa_store_offset + n_regs++ * 4);
 	}
     }
+#ifdef HAVE_ALTERNATE_PIC_SETUP
+  if (HAVE_ALTERNATE_PIC_SETUP)
+    ALTERNATE_PIC_SETUP (stream);
+  else
+#endif
   if (flag_pic && current_function_uses_pic_offset_table)
     {
 #ifdef MOTOROLA
@@ -568,11 +605,14 @@
         nregs++;
 	mask |= 1 << regno;
       }
-  if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+  if (flag_pic && flag_pic < 3 && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
     {
       nregs++;
       mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
     }
+#ifdef EPILOGUE_EXTRA_RESTORE
+  EPILOGUE_EXTRA_RESTORE (mask, nregs);
+#endif
   offset = foffset + nregs * 4;
   /* FIXME : leaf_function_p below is too strong.
      What we really need to know there is if there could be pending
@@ -759,6 +799,11 @@
 	  fpoffset -= 8;
 	}
   if (frame_pointer_needed)
+#ifdef HAVE_ALTERNATE_FRAME_DESTR_F
+    if (HAVE_ALTERNATE_FRAME_DESTR_F (fsize))
+      ALTERNATE_FRAME_DESTR_F (stream, fsize);
+    else
+#endif
     fprintf (stream, "\tunlk %s\n",
 	     reg_names[FRAME_POINTER_REGNUM]);
   else if (fsize)
@@ -828,9 +873,19 @@
 #endif
 	}
     }
+
+#ifdef EPILOGUE_END_HOOK
+  EPILOGUE_END_HOOK (stream);
+#endif
+
   if (current_function_pops_args)
     asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
   else
+#ifdef HAVE_ALTERNATE_RETURN
+    if (HAVE_ALTERNATE_RETURN)
+      ALTERNATE_RETURN (stream);
+    else
+#endif
     fprintf (stream, "\trts\n");
 }
 
@@ -1327,12 +1382,20 @@
   /* First handle a simple SYMBOL_REF or LABEL_REF */
   if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
     {
+#ifdef LEGITIMATE_BASEREL_OPERAND_P
+      if (LEGITIMATE_BASEREL_OPERAND_P (orig))
+	return orig;
+#endif
+
       if (reg == 0)
 	abort ();
 
-      pic_ref = gen_rtx_MEM (Pmode,
-			     gen_rtx_PLUS (Pmode,
-					   pic_offset_table_rtx, orig));
+      if (flag_pic < 3)
+	pic_ref = gen_rtx_MEM (Pmode,
+			       gen_rtx_PLUS (Pmode,
+					     pic_offset_table_rtx, orig));
+      else
+	pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, orig);
       current_function_uses_pic_offset_table = 1;
       if (reload_in_progress)
 	regs_ever_live[PIC_OFFSET_TABLE_REGNUM] = 1;
@@ -3104,6 +3167,10 @@
 	          fprintf (file, ":w");
 	        if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
 	          fprintf (file, ":l");
+		if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
+		  fprintf (file, ":W");
+		if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
+		  fprintf (file, ":L");
 	      }
 	    if (addr != 0 && ireg != 0)
 	      {
@@ -3279,6 +3346,252 @@
   return (GET_CODE (op) == CONST_INT
 	  && (INTVAL (op) >= (-0x7fffffff - 1) && INTVAL (op) <= 0x7fffffff));
 }
+
+/* Argument-passing support functions.  */
+
+/* Initialize a variable CUM of type CUMULATIVE_ARGS
+   for a call to a function whose data type is FNTYPE.
+   For a library call, FNTYPE is 0.  */
+
+void
+m68k_init_cumulative_args (cum, fntype)
+     CUMULATIVE_ARGS *cum;
+     tree fntype;
+{
+  cum->last_arg_reg = -1;
+  cum->regs_already_used = 0;
+  if (fntype)
+    {
+      if (lookup_attribute ("stkparm", TYPE_ATTRIBUTES (fntype)))
+	cum->num_of_regs = 0;
+      else
+	{
+	  tree ratree = lookup_attribute ("regparm", TYPE_ATTRIBUTES (fntype));
+	  if (ratree)
+	    {
+	      cum->num_of_regs = m68k_regparm ? m68k_regparm
+					      : M68K_DEFAULT_REGPARM;
+	      if (TREE_VALUE (ratree)
+		  && TREE_CODE (TREE_VALUE (ratree)) == TREE_LIST)
+		{
+		  tree num_of_regs = TREE_VALUE (TREE_VALUE (ratree));
+		  cum->num_of_regs =
+		    num_of_regs ? TREE_INT_CST_LOW (num_of_regs) :
+		      (m68k_regparm ? m68k_regparm : M68K_DEFAULT_REGPARM);
+		}
+	    }
+	  else
+	    cum->num_of_regs = m68k_regparm;
+	}
+    }
+  else /* Libcall.  */
+    cum->num_of_regs = 0;
+
+  if (cum->num_of_regs)
+    {
+      /* If this is a vararg call, put all arguments on stack.  */
+      tree param, next_param;
+      for (param = TYPE_ARG_TYPES (fntype); param; param = next_param)
+	{
+	  next_param = TREE_CHAIN (param);
+	  if (!next_param && TREE_VALUE (param) != void_type_node)
+	    cum->num_of_regs = 0;
+	}
+    }
+
+#if ! defined (PCC_STATIC_STRUCT_RETURN) && defined (STRUCT_VALUE_REGNUM)
+  /* If return value is a structure, and we pass the buffer address in a
+     register, we can't use this register for our own purposes.
+     FIXME: Something similar would be useful for static chain.  */
+  if (fntype && aggregate_value_p (TREE_TYPE (fntype)))
+    cum->regs_already_used |= (1 << STRUCT_VALUE_REGNUM);
+#endif
+}
+
+/* Update the data in CUM to advance over an argument.  */
+
+void
+m68k_function_arg_advance (cum)
+     CUMULATIVE_ARGS *cum;
+{
+  if (cum->last_arg_reg != -1)
+    {
+      int count;
+      for (count = 0; count < cum->last_arg_len; count++)
+	cum->regs_already_used |= (1 << (cum->last_arg_reg + count));
+      cum->last_arg_reg = -1;
+    }
+}
+
+/* Define where to put the arguments to a function.
+   Value is zero to push the argument on the stack,
+   or a hard register in which to store the argument.
+
+   MODE is the argument's machine mode.
+   TYPE is the data type of the argument (as a tree).
+    This is null for libcalls where that information may
+    not be available.
+   CUM is a variable of type CUMULATIVE_ARGS which gives info about
+    the preceding args and about the function being called.  */
+
+struct rtx_def *
+m68k_function_arg (cum, mode, type)
+     CUMULATIVE_ARGS *cum;
+     enum machine_mode mode;
+     tree type;
+{
+  if (cum->num_of_regs)
+    {
+      int regbegin = -1, altregbegin = -1, len;
+
+      /* FIXME: The last condition below is a workaround for a bug.  */
+      if (TARGET_68881 && FLOAT_MODE_P (mode) &&
+	  GET_MODE_UNIT_SIZE (mode) <= 12 &&
+	  (GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT || mode == SCmode))
+	{
+	  regbegin = 16; /* FPx */
+	  len = GET_MODE_NUNITS (mode);
+	}
+      /* FIXME: Two last conditions below are workarounds for bugs.  */
+      else if (INTEGRAL_MODE_P (mode) && mode !=CQImode && mode != CHImode)
+	{
+	  if (POINTER_TYPE_P (type))
+	    regbegin = 8; /* Ax */
+	  else
+	    regbegin = 0; /* Dx */
+	  altregbegin = 8 - regbegin;
+	  len = (GET_MODE_SIZE (mode) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD;
+	}
+
+      if (regbegin != -1)
+	{
+	  int reg;
+	  long mask;
+
+look_for_reg:
+	  mask = 1 << regbegin;
+	  for (reg = 0; reg < cum->num_of_regs; reg++, mask <<= 1)
+	    if (!(cum->regs_already_used & mask))
+	      {
+		int end;
+		for (end = reg; end < cum->num_of_regs && end < reg + len;
+		     end++, mask <<= 1)
+		  if (cum->regs_already_used & mask)
+		    break;
+		if (end == reg + len)
+		  {
+		    cum->last_arg_reg = reg + regbegin;
+		    cum->last_arg_len = len;
+		    break;
+		  }
+	      }
+
+	  if (reg == cum->num_of_regs && altregbegin != -1)
+	    {
+	      regbegin = altregbegin;
+	      altregbegin = -1;
+	      goto look_for_reg;
+	    }
+	}
+
+      if (cum->last_arg_reg != -1)
+	return gen_rtx (REG, mode, cum->last_arg_reg);
+    }
+  return 0;
+}
+
+/* Attributes support.  */
+
+/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine
+   specific attribute for TYPE.  The attributes in ATTRIBUTES have previously
+   been assigned to TYPE.  */
+
+int
+valid_m68k_type_attribute (type, attributes, identifier, args)
+     tree type, attributes, identifier, args;
+{
+  if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE)
+    {
+      /* 'regparm' accepts one optional argument - number of registers in
+	 single class that should be used to pass arguments.  */
+      if (is_attribute_p ("regparm", identifier))
+	{
+	  if (lookup_attribute ("stkparm", attributes))
+	    {
+	      error ("`regparm' and `stkparm' are mutually exclusive");
+	      return 0;
+	    }
+	  if (args && TREE_CODE (args) == TREE_LIST)
+	    {
+	      tree numofregs = TREE_VALUE (args);
+	      if (numofregs)
+		if (TREE_CODE (numofregs) != INTEGER_CST
+		    || TREE_INT_CST_HIGH (numofregs)
+		    || TREE_INT_CST_LOW (numofregs) < 1
+		    || TREE_INT_CST_LOW (numofregs) > M68K_MAX_REGPARM)
+		  {
+		    error ("invalid argument to `regparm' attribute");
+		    return 0;
+		  }
+	    }
+	  return 1;
+	}
+      if (is_attribute_p ("stkparm", identifier))
+	{
+	  if (lookup_attribute ("regparm", attributes))
+	    {
+	      error ("`regparm' and `stkparm' are mutually exclusive");
+	      return 0;
+	    }
+	  return 1;
+	}
+    }
+
+  return 0;
+}
+
+/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible,
+   one if they are compatible, and two if they are nearly compatible
+   (which causes a warning to be generated). */
+
+int
+comp_m68k_type_attributes (type1, type2)
+     tree type1, type2;
+{
+  /* Functions or methods are incompatible if they specify mutually
+     exclusive ways of passing arguments.  */
+  if (TREE_CODE (type1) == FUNCTION_TYPE || TREE_CODE (type1) == METHOD_TYPE)
+    {
+      tree arg1, arg2;
+      if (!! lookup_attribute ("stkparm", TYPE_ATTRIBUTES (type1)) !=
+	     !! lookup_attribute ("stkparm", TYPE_ATTRIBUTES (type2))
+	  || !! lookup_attribute ("regparm", TYPE_ATTRIBUTES (type1)) !=
+	     !! lookup_attribute ("regparm", TYPE_ATTRIBUTES (type2)))
+	return 0; /* 'regparm' and 'stkparm' are mutually exclusive.  */
+
+      arg1 = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type1));
+      arg2 = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type2));
+      if (arg1 && arg2)
+	{
+	  int num1 = 0, num2 = 0;
+	  if (TREE_VALUE (arg1) && TREE_CODE (TREE_VALUE (arg1)) == TREE_LIST)
+	    {
+	      tree numofregs = TREE_VALUE (TREE_VALUE (arg1));
+	      if (numofregs)
+		num1 = TREE_INT_CST_LOW (numofregs);
+	    }
+	  if (TREE_VALUE (arg2) && TREE_CODE (TREE_VALUE (arg2)) == TREE_LIST)
+	    {
+	      tree numofregs = TREE_VALUE (TREE_VALUE (arg2));
+	      if (numofregs)
+		num2 = TREE_INT_CST_LOW (numofregs);
+	    }
+	  if (num1 != num2)
+	    return 0; /* Different numbers, or no number in one type.  */
+	}
+    }
+  return 1;
+}
 
 char *
 output_andsi3 (operands)
--- gcc-2.95.3/gcc/config/m68k/m68k.h	Thu Jan 25 15:03:34 2001
+++ gcc/gcc/config/m68k/m68k.h	Thu Sep 27 19:35:54 2001
@@ -68,10 +68,8 @@
 #define MASK_RTD	8
 #define TARGET_RTD (target_flags & MASK_RTD)
 
-/* Compile passing first two args in regs 0 and 1.
-   This exists only to test compiler features that will
-   be needed for RISC chips.  It is not usable
-   and is not intended to be usable on this cpu.  */
+/* Compile using the first 'm68k_regparm' data, address and float
+   registers for arguments passing.  */
 #define MASK_REGPARM	16
 #define TARGET_REGPARM (target_flags & MASK_REGPARM)
 
@@ -182,6 +180,8 @@
     { "cpu32", MASK_68020},						\
     { "align-int", MASK_ALIGN_INT },					\
     { "no-align-int", -MASK_ALIGN_INT },				\
+    { "regparm", MASK_REGPARM},						\
+    { "no-regparm", - MASK_REGPARM},					\
     SUBTARGET_SWITCHES							\
     { "", TARGET_DEFAULT}}
 /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc.  */
@@ -199,6 +199,7 @@
 { { "align-loops=",	&m68k_align_loops_string },			\
   { "align-jumps=",	&m68k_align_jumps_string },			\
   { "align-functions=",	&m68k_align_funcs_string },			\
+  { "regparm=",		&m68k_regparm_string },				\
   SUBTARGET_OPTIONS							\
 }
 
@@ -809,7 +810,7 @@
 #ifndef SUPPORT_SUN_FPA
 
 #define CLASS_MAX_NREGS(CLASS, MODE)	\
- ((CLASS) == FP_REGS ? 1 \
+ ((CLASS) == FP_REGS ? GET_MODE_NUNITS (MODE) \
   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
 
 /* Moves between fp regs and other regs are two insns.  */
@@ -821,7 +822,7 @@
 #else /* defined SUPPORT_SUN_FPA */
 
 #define CLASS_MAX_NREGS(CLASS, MODE)	\
- ((CLASS) == FP_REGS || (CLASS) == FPA_REGS || (CLASS) == LO_FPA_REGS ? 1 \
+ ((CLASS) == FP_REGS || (CLASS) == FPA_REGS || (CLASS) == LO_FPA_REGS ? GET_MODE_NUNITS (MODE) \
   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
 
 /* Moves between fp regs and other regs are two insns.  */
@@ -925,10 +926,19 @@
 
 #define PCC_STATIC_STRUCT_RETURN
 
-/* 1 if N is a possible register number for function argument passing.
-   On the 68000, no registers are used in this way.  */
+/* 1 if N is a possible register number for function argument passing.  */
 
-#define FUNCTION_ARG_REGNO_P(N) 0
+#define FUNCTION_ARG_REGNO_P(N)			\
+  (((N) >= 0 && (N) < M68K_MAX_REGPARM)		\
+   || ((N) >= 8 && (N) < 8 + M68K_MAX_REGPARM)	\
+   || (TARGET_68881 && (N) >= 16 && (N) < 16 + M68K_MAX_REGPARM))
+
+/* Nonzero if we need to generate special stack-allocating insns.
+   On most systems they are not needed.
+   When they are needed, also define ALTERNATE_ALLOCATE_STACK (see m68k.md)
+   to perform the necessary actions.  */
+
+#define TARGET_ALTERNATE_ALLOCATE_STACK 0
 
 /* Define a data type for recording info about an argument list
    during the scan of that argument list.  This data type should
@@ -936,28 +946,52 @@
    and about the args processed so far, enough to enable macros
    such as FUNCTION_ARG to determine where the next arg should go.
 
-   On the m68k, this is a single integer, which is a number of bytes
-   of arguments scanned so far.  */
+   On the m68k, this is a structure:
+   num_of_regs: number of data, address and float registers to use for
+     arguments passing (if it's 2, than pass arguments in d0, d1, a0, a1,
+     fp0 and fp1). 0 - pass everything on stack. vararg calls are
+     always passed entirely on stack.
+   regs_already_used: bitmask of the already used registers.
+   last_arg_reg - register number of the most recently passed argument.
+     -1 if passed on stack.
+   last_arg_len - number of registers used by the most recently passed
+     argument.
+*/
+
+struct m68k_args
+{
+  int num_of_regs;
+  long regs_already_used;
+  int last_arg_reg;
+  int last_arg_len;
+};
+
+#define CUMULATIVE_ARGS struct m68k_args
+
+/* Max. number of data, address and float registers to be used for passing
+   integer, pointer and float arguments when TARGET_REGPARM.
+   It's 4, so d0-d3, a0-a3 and fp0-fp3 can be used.  */
 
-#define CUMULATIVE_ARGS int
+#define M68K_MAX_REGPARM 4
+
+/* The default number of data, address and float registers to use when
+   user specified '-mregparm' switch, not '-mregparm=<value>' option.  */
+  
+#define M68K_DEFAULT_REGPARM 2
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
    for a call to a function whose data type is FNTYPE.
-   For a library call, FNTYPE is 0.
-
-   On the m68k, the offset starts at 0.  */
+   For a library call, FNTYPE is 0.  */
 
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)	\
- ((CUM) = 0)
+  (m68k_init_cumulative_args (&(CUM), (FNTYPE)))
 
 /* Update the data in CUM to advance over an argument
    of mode MODE and data type TYPE.
    (TYPE is null for libcalls where that information may not be available.)  */
 
 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)	\
- ((CUM) += ((MODE) != BLKmode			\
-	    ? (GET_MODE_SIZE (MODE) + 3) & ~3	\
-	    : (int_size_in_bytes (TYPE) + 3) & ~3))
+  (m68k_function_arg_advance (&(CUM)))
 
 /* Define where to put the arguments to a function.
    Value is zero to push the argument on the stack,
@@ -972,24 +1006,21 @@
    NAMED is nonzero if this argument is a named parameter
     (otherwise it is an extra parameter matching an ellipsis).  */
 
-/* On the 68000 all args are pushed, except if -mregparm is specified
-   then the first two words of arguments are passed in d0, d1.
-   *NOTE* -mregparm does not work.
-   It exists only to test register calling conventions.  */
+/* On the 68000 all args are pushed, except if -mregparm is specified,
+   then a number of arguments is passed in the first 'm68k_regparm' data,
+   address and float registers.
+   Note: by default, the static-chain is passed in a0. Targets that want
+   to make full use of '-mregparm' are advised to pass the static-chain
+   somewhere else.  */
 
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-((TARGET_REGPARM && (CUM) < 8) ? gen_rtx_REG ((MODE), (CUM) / 4) : 0)
+  ((struct rtx_def *)m68k_function_arg (&(CUM), (MODE), (TYPE)))
 
 /* For an arg passed partly in registers and partly in memory,
    this is the number of registers used.
    For args passed entirely in registers or entirely in memory, zero.  */
 
-#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
-((TARGET_REGPARM && (CUM) < 8					\
-  && 8 < ((CUM) + ((MODE) == BLKmode				\
-		      ? int_size_in_bytes (TYPE)		\
-		      : GET_MODE_SIZE (MODE))))  		\
- ? 2 - (CUM) / 4 : 0)
+#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) (0)
 
 /* Generate the assembly code for function entry. */
 #define FUNCTION_PROLOGUE(FILE, SIZE) output_function_prologue(FILE, SIZE)
@@ -1190,6 +1221,8 @@
    of a local variable as a function of frame_pointer_needed, which
    is hard.  */
 
+#define SUBTARGET_INITIAL_FP_OFFSET(OFFSET)
+
 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH)			\
 { int regno;							\
   int offset = -4;						\
@@ -1199,8 +1232,9 @@
   for (regno = 0; regno < 16; regno++)				\
     if (regs_ever_live[regno] && ! call_used_regs[regno])	\
       offset += 4;						\
-  if (flag_pic && current_function_uses_pic_offset_table)	\
+  if (flag_pic && (flag_pic<=2) && current_function_uses_pic_offset_table)	\
     offset += 4;						\
+  SUBTARGET_INITIAL_FP_OFFSET (offset);				\
   (DEPTH) = (offset + ((get_frame_size () + 3) & -4)		\
 	     + (get_frame_size () == 0 ? 0 : 4));		\
 }
@@ -2083,6 +2117,23 @@
 
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
 
+
+/* Attributes support.  */
+
+/* A C expression whose value is nonzero if IDENTIFIER with arguments
+   ARGS is a valid machine specific attribute for TYPE.  The attributes
+   in ATTRIBUTES have previously been assigned to TYPE.  */
+
+#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
+  (valid_m68k_type_attribute ((TYPE), (ATTRIBUTES), (IDENTIFIER), (ARGS)))
+
+/* A C expression whose value is zero if the attributes on TYPE1 and
+   TYPE2 are incompatible, one if they are compatible, and two if they
+   are nearly compatible (which causes a warning to be generated).  */
+
+#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
+  (comp_m68k_type_attributes ((TYPE1), (TYPE2)))
+
 /* Define functions defined in aux-output.c and used in templates.  */
 
 extern char *output_move_const_into_data_reg ();
@@ -2115,9 +2166,11 @@
 extern const char *m68k_align_loops_string;
 extern const char *m68k_align_jumps_string;
 extern const char *m68k_align_funcs_string;
+extern const char *m68k_regparm_string;
 extern int m68k_align_loops;
 extern int m68k_align_jumps;
 extern int m68k_align_funcs;
+extern int m68k_regparm;
 extern int m68k_last_compare_had_fp_operands;
 
 /* Functions from m68k.c used in macros.  */
--- gcc-2.95.3/gcc/config/m68k/m68k.md	Thu Aug  5 08:22:05 1999
+++ gcc/gcc/config/m68k/m68k.md	Thu Sep 27 19:35:54 2001
@@ -6799,7 +6799,7 @@
 	 (match_operand:SI 1 "general_operand" "g"))]
   ;; Operand 1 not really used on the m68000.
 
-  "! flag_pic"
+  "(! flag_pic || flag_pic >= 3)"
   "*
 #if defined (MOTOROLA) && !defined (USE_GAS)
 #ifdef MOTOROLA_BSR
@@ -6819,7 +6819,7 @@
 	 (match_operand:SI 1 "general_operand" "g"))]
   ;; Operand 1 not really used on the m68000.
 
-  "flag_pic"
+  "(flag_pic && flag_pic < 3)"
   "*
   if (GET_CODE (operands[0]) == MEM
       && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
@@ -6862,7 +6862,7 @@
 	(call (match_operand:QI 1 "memory_operand" "o")
 	      (match_operand:SI 2 "general_operand" "g")))]
   ;; Operand 2 not really used on the m68000.
-  "! flag_pic"
+  "(! flag_pic || flag_pic >= 3)"
   "*
 #if defined (MOTOROLA) && !defined (USE_GAS)
 #ifdef MOTOROLA_BSR
@@ -6882,7 +6882,7 @@
 	(call (match_operand:QI 1 "memory_operand" "o")
 	      (match_operand:SI 2 "general_operand" "g")))]
   ;; Operand 2 not really used on the m68000.
-  "flag_pic"
+  "(flag_pic && flag_pic < 3)"
   "*
   if (GET_CODE (operands[1]) == MEM
       && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
@@ -7823,7 +7823,7 @@
 (define_insn "sinsf2"
   [(set (match_operand:SF 0 "general_operand" "=f")
 	(unspec:SF [(match_operand:SF 1 "general_operand" "fm")] 1))]
-  "TARGET_68881 && flag_fast_math"
+  "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math"
   "*
 {
   if (FP_REG_P (operands[1]))
@@ -7835,7 +7835,7 @@
 (define_insn "sindf2"
   [(set (match_operand:DF 0 "general_operand" "=f")
 	(unspec:DF [(match_operand:DF 1 "general_operand" "fm")] 1))]
-  "TARGET_68881 && flag_fast_math"
+  "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math"
   "*
 {
   if (FP_REG_P (operands[1]))
@@ -7847,13 +7847,13 @@
 (define_insn "sinxf2"
   [(set (match_operand:XF 0 "general_operand" "=f")
 	(unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 1))]
-  "TARGET_68881 && flag_fast_math"
+  "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math"
   "fsin%.x %1,%0")
 
 (define_insn "cossf2"
   [(set (match_operand:SF 0 "general_operand" "=f")
 	(unspec:SF [(match_operand:SF 1 "general_operand" "fm")] 2))]
-  "TARGET_68881 && flag_fast_math"
+  "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math"
   "*
 {
   if (FP_REG_P (operands[1]))
@@ -7865,7 +7865,7 @@
 (define_insn "cosdf2"
   [(set (match_operand:DF 0 "general_operand" "=f")
 	(unspec:DF [(match_operand:DF 1 "general_operand" "fm")] 2))]
-  "TARGET_68881 && flag_fast_math"
+  "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math"
   "*
 {
   if (FP_REG_P (operands[1]))
@@ -7877,5 +7877,18 @@
 (define_insn "cosxf2"
   [(set (match_operand:XF 0 "general_operand" "=f")
 	(unspec:XF [(match_operand:XF 1 "nonimmediate_operand" "fm")] 2))]
-  "TARGET_68881 && flag_fast_math"
+  "TARGET_68881 && !TARGET_68040 && !TARGET_68060 && flag_fast_math"
   "fcos%.x %1,%0")
+
+; This is only needed for some subtargets.
+(define_expand "allocate_stack"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(minus:SI (reg:SI 15) (match_operand:SI 1 "general_operand" "")))
+   (set (reg:SI 15) (minus:SI (reg:SI 15) (match_dup 1)))]
+  "TARGET_ALTERNATE_ALLOCATE_STACK"
+  "
+{
+#ifdef ALTERNATE_ALLOCATE_STACK
+  ALTERNATE_ALLOCATE_STACK(operands);
+#endif
+}")
--- gcc-2.95.3/gcc/config/m68k/t-amigaos	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/m68k/t-amigaos	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,90 @@
+# Makefile fragment for AmigaOS target.
+
+# Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
+# own equivalent of the UNIX /usr/include tree.  For gcc, the standard headers
+# are in /gg/include and system specific headers are in /gg/os-include.
+# Use these paths for fixincludes.
+
+SYSTEM_HEADER_DIR = /gg/include
+
+# Extra object file linked to the cc1* executables.
+amigaos.o: $(srcdir)/config/m68k/amigaos.c $(CONFIG_H)
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+
+# We don't need a libgcc1, it's all in ixemul.library and LibNIX
+
+LIBGCC1 = libgcc1.null
+CROSS_LIBGCC1 = libgcc1.null
+
+# Additional target dependent options for compiling libgcc.a.  This just
+# ensures that we don't compile libgcc* with anything other than a
+# fixed stack.
+
+TARGET_LIBGCC2_CFLAGS = -mfixedstack
+
+# Support for building multiple version of libgcc.
+# Note: this is taken from the toplevel Makefile.in multilib support.
+LIBGCC = stmp-libgcc-multi
+INSTALL_LIBGCC = install-libgcc-multi
+
+LIBGCC_MULTI =	".;" \
+		"libb;@resident" \
+		"libm020;@m68020" \
+		"libb/libm020;@resident@m68020" \
+		"libb32/libm020;@resident32@m68020"
+
+# Build multiple copies of libgcc.a, one for each target switch.
+stmp-libgcc-multi: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
+   frame.h \
+   $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
+	# We need the following explicit mkdir, since the toplevel
+	# Makefile.in attempts to create only the last directory
+	# of a path.
+	if [ -d libb32 ]; then true; else mkdir libb32; fi
+	for i in $(LIBGCC_MULTI); do \
+	  dir=`echo $$i | sed -e 's/;.*$$//'`; \
+	  flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
+	  $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
+	    AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+	    AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+	    CC="$(CC)" CFLAGS="$(CFLAGS)" \
+	    RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
+	    RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
+	    LANGUAGES="$(LANGUAGES)" \
+	    HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
+	    LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
+	    MULTILIB_CFLAGS="$${flags}" \
+	    LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
+	    dir="$${dir}" stmp-multilib-sub; \
+	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
+	done
+	touch stmp-libgcc-multi
+
+# Install multiple versions of libgcc.a.
+install-libgcc-multi: stmp-libgcc-multi installdirs
+	# We need the following explicit mkdir, since below we attempt to
+	# create only the last directory of a path.
+	if [ -d $(libsubdir)/libb32 ]; then true; else mkdir $(libsubdir)/libb32; fi
+	for i in $(LIBGCC_MULTI); do \
+	  dir=`echo $$i | sed -e 's/;.*$$//'`; \
+	  if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
+	  for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
+	    rm -f $(libsubdir)/$${dir}/$${f}; \
+	    $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
+	  done; \
+	  if $(RANLIB_TEST_FOR_TARGET); then \
+	    (cd $(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \
+	  else true; fi; \
+	  chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
+	done
+
+### begin-GG-local: dynamic libraries
+# Extra objects that get compiled and linked to collect2
+
+EXTRA_COLLECT2_OBJS = amigacollect2.o
+
+# Build supplimentary AmigaOS target support file for collect2
+amigacollect2.o: amigacollect2.c
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	-DA2IXDIR_PREFIX=\"$(prefix)/share/a2ixlibrary\" $(srcdir)/amigacollect2.c
+### end-GG-local
--- gcc-2.95.3/gcc/config/m68k/x-amigaos	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/m68k/x-amigaos	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,77 @@
+# Makefile fragment for AmigaOS host
+
+# Uncomment the following macro to get a resident GCC. We don't do it
+# by default, since we want to support users with mc68000.
+# WARNING!  If you uncomment this, you MUST add the same flags to the
+# libiberty's Makefile (libiberty is now linked into GCC executables).
+
+#RESIDENT = -m68020 -resident32
+
+# Additional host flags that are not used when compiling with GCC_FOR_TARGET,
+# such as when compiling the libgcc* runtime archives. GCC uses stack
+# a lot, and since AmigaOS provides processes with a small, fixed size
+# stack, we have to generate code that will extend it whenever necessary.
+
+XCFLAGS = -mstackextend $(RESIDENT)
+
+# AmigaOS supports "AmigaGuide(R)" hypertext files. For GCC, these are
+# build with a custom "makeinfo".
+
+### begin-GG-local: gcc-amigaos
+EXTRA_DOC_TARGETS = guide gcc-amigaos-doc
+### end-GG-local
+
+# Arrange for guides to be build with GCC, in the build directory.
+
+ALL = all.internal doc
+
+# Actually build guides
+
+guide: cpp.guide gcc.guide
+
+cpp.guide: cpp.texi
+	$(MAKEINFO) -I$(srcdir) $(srcdir)/cpp.texi --output=$@ --amiga
+
+gcc.guide: gcc.texi extend.texi install.texi invoke.texi \
+		md.texi rtl.texi tm.texi
+	$(MAKEINFO) -I$(srcdir) $(srcdir)/gcc.texi --output=$@ --amiga
+
+# Arrange for guides to be installed with GCC.
+
+### begin-GG-local: gcc-amigaos
+INSTALL_TARGET=install-normal install-guide install-gcc-amigaos-doc
+### end-GG-local
+
+# Where the guide files go
+
+guidedir = $(prefix)/guide
+
+# Actually install guides.
+
+install-guide: doc installdirs
+	-if [ -d $(guidedir) ] ; then true ; else mkdir $(guidedir) ; chmod a+rx $(guidedir) ; fi
+	-rm -f $(guidedir)/cpp.guide $(guidedir)/gcc.guide
+	for f in cpp.guide gcc.guide; \
+	do $(INSTALL_DATA) $$f $(guidedir)/$$f; done
+	-chmod a-x $(guidedir)/cpp.guide $(guidedir)/gcc.guide
+
+### begin-GG-local: gcc-amigaos
+# Build and install gcc-amigaos.guide - documentation specific to the
+# AmigaOS port of GCC.
+
+gcc-amigaos-doc: gcc-amigaos.info gcc-amigaos.guide
+
+gcc-amigaos.info: gcc-amigaos.texi
+	$(MAKEINFO) -I$(srcdir) $(srcdir)/gcc-amigaos.texi --output=$@
+
+gcc-amigaos.guide: gcc-amigaos.texi
+	$(MAKEINFO) -I$(srcdir) $(srcdir)/gcc-amigaos.texi --output=$@ --amiga
+
+install-gcc-amigaos-doc: doc installdirs
+	-if [ -d $(guidedir) ] ; then true ; else mkdir $(guidedir) ; chmod a+rx $(guidedir) ; fi
+	-rm -f $(infodir)/gcc-amigaos.info* $(guidedir)/gcc-amigaos.guide
+	for f in gcc-amigaos.info*; \
+	do $(INSTALL_DATA) $$f $(infodir)/$$f; done
+	$(INSTALL_DATA) gcc-amigaos.guide $(guidedir)
+	-chmod a-x $(infodir)/gcc-amigaos.info* $(guidedir)/gcc-amigaos.guide
+### end-GG-local
--- gcc-2.95.3/gcc/config/m68k/xm-amigaos.h	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/m68k/xm-amigaos.h	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,98 @@
+/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS.
+   Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
+   Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* First include the generic header, then modify some parts.  */
+
+#include "m68k/xm-m68k.h"
+
+#ifndef _FCNTL_H_
+#include <fcntl.h>
+#endif
+
+/* Define various things that the AmigaOS host has.  */
+
+#define HAVE_ATEXIT
+#define HAVE_RENAME
+
+/* AmigaOS specific headers, such as from the Native Developer Update kits,
+   go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
+   Unix "/usr/include".  All other include paths are set in Makefile.  */
+
+#define SYSTEM_INCLUDE_DIR	"/gg/os-include"
+#define STANDARD_INCLUDE_DIR	"/gg/include"
+
+#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/"
+#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/"
+
+/* The AmigaOS stores file names with regard to upper/lower case, but actions
+   on existing files are case independent on the standard filesystems.
+
+   A good example of where this causes problems is the conflict between the C
+   include file <string.h> and the C++ include file <String.h>, where the C++
+   include file dir is searched first and thus causes includes of <string.h>
+   to include <String.h> instead.
+
+   In order to solve this problem we define the macro OPEN_CASE_SENSITIVE as
+   the name of the function that takes the same args as open() and does case
+   dependent opens.  */
+
+#define OPEN_CASE_SENSITIVE(NAME, FLAGS, MODE) open ((NAME), (FLAGS) | O_CASE, (MODE))
+
+/* On the AmigaOS, there are two pathname separators, '/' (DIR_SEPARATOR)
+   and ':' (VOL_SEPARATOR).  DIR_SEPARATOR defaults to the correct
+   character, so we don't have to explicitly set it.  */
+
+#define DIR_SEPARATOR '/'
+#define VOL_SEPARATOR ':'
+#define DIR_SEPARATOR_2 VOL_SEPARATOR
+
+/* Determine whether a '\0'-terminated file name is absolute or not.
+
+   This checks for both, '/' as the first character, since we're running under
+   ixemul.library which provides for this unix'ism, and for the usual 
+   logical-terminator, ':', somewhere in the filename.  */
+
+#define FILE_NAME_ABSOLUTE_P(NAME) ((NAME)[0] == '/' || index ((NAME), ':'))
+
+/* Like the above, but the file name is not '\0'-terminated.  */
+
+#define FILE_NAME_ABSOLUTE_N_P(NAME, LEN) amigaos_file_name_absolute_n ((NAME), (LEN))
+
+/* Return the file name part of the path name.  */
+
+#define FILE_NAME_NONDIRECTORY(NAME)					\
+  (rindex ((NAME), '/') ? rindex ((NAME), '/') + 1			\
+			: (rindex ((NAME), ':') ? rindex ((NAME), ':') + 1 \
+						: (NAME)))
+
+/* Generate the name of the cross reference file.  */
+
+#define XREF_FILE_NAME(BUFF, NAME)					\
+do									\
+  {									\
+    char *filesrc, *filedst;						\
+    strcpy ((BUFF), (NAME));						\
+    filesrc = FILE_NAME_NONDIRECTORY (NAME);				\
+    filedst = (BUFF) + (filesrc - (NAME));				\
+    sprintf (filedst, ".%s.gxref", filesrc);				\
+  }									\
+while (0)
--- gcc-2.95.3/gcc/config/rs6000/morphos.c	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/rs6000/morphos.c	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,307 @@
+/* Configuration for GNU C-compiler for m68k Amiga, running AmigaOS.
+   Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
+   Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
+   Heavily modified by Kamil Iskra (iskra@student.uci.agh.edu.pl).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "config.h"
+#include "system.h"
+#include "rtl.h"
+#include "output.h"
+#include "tree.h"
+#include "flags.h"
+#include "expr.h"
+
+extern enum rs6000_sdata_type rs6000_sdata;
+
+/* Common routine used to check if r13 should be preserved/restored.  */
+
+int
+morphos_restore_r13 ()
+{
+    return ((rs6000_sdata == SDATA_BREL || rs6000_sdata == SDATA_DATA) &&
+	    (TARGET_RESTORE_R13 || TARGET_ALWAYS_RESTORE_R13
+	     || lookup_attribute ("saveds",
+				  TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))));
+}
+
+/* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine
+   specific attribute for TYPE.  The attributes in ATTRIBUTES have previously
+   been assigned to TYPE.  */
+
+int
+morphos_valid_type_attribute_p (type, attributes, identifier, args)
+     tree type, attributes, identifier, args;
+{
+  if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE)
+    {
+      if (is_attribute_p ("stackext", identifier) ||
+	  is_attribute_p ("saveds", identifier) ||
+	  is_attribute_p ("varargs68k", identifier))
+	return 1;
+    }
+  return rs6000_valid_type_attribute_p (type, attributes, identifier, args);
+}
+
+
+
+/* stack check/extension code */
+
+void morphos_output_prolog(file, size)
+     FILE *file;
+     int size;
+{
+  if (TARGET_STACKCHECK || TARGET_STACKEXTEND)
+      asm_fprintf(file, "\tmflr 0\n\tbl __stk%s1\n", 
+		  TARGET_STACKEXTEND ? "ext" : "chk");
+  output_prolog(file, size);
+}
+
+
+/* Initialize a variable CUM of type CUMULATIVE_ARGS
+   for a call to a function whose data type is FNTYPE.
+   For a library call, FNTYPE is 0.
+
+   For incoming args we set the number of arguments in the prototype large
+   so we never return a PARALLEL.  */
+
+void
+morphos_init_cumulative_args (cum, fntype, libname, incoming)
+     CUMULATIVE_ARGS *cum;
+     tree fntype;
+     rtx libname ATTRIBUTE_UNUSED;
+     int incoming;
+{
+  init_cumulative_args (cum, fntype, libname, incoming);
+  if (fntype && lookup_attribute ("varargs68k", TYPE_ATTRIBUTES (fntype)))
+    cum->call_cookie |= CALL_VARARGS68K;
+}
+
+
+/* Determine where to put an argument to a function.
+   Value is zero to push the argument on the stack,
+   or a hard register in which to store the argument.
+
+   MODE is the argument's machine mode.
+   TYPE is the data type of the argument (as a tree).
+    This is null for libcalls where that information may
+    not be available.
+   CUM is a variable of type CUMULATIVE_ARGS which gives info about
+    the preceding args and about the function being called.
+   NAMED is nonzero if this argument is a named parameter
+    (otherwise it is an extra parameter matching an ellipsis).
+
+   On RS/6000 the first eight words of non-FP are normally in registers
+   and the rest are pushed.  Under AIX, the first 13 FP args are in registers.
+   Under V.4, the first 8 FP args are in registers.
+
+   If this is floating-point and no prototype is specified, we use
+   both an FP and integer register (or possibly FP reg and stack).  Library
+   functions (when TYPE is zero) always have the proper types for args,
+   so we can pass the FP value just in one register.  emit_library_function
+   doesn't support PARALLEL anyway.  */
+
+struct rtx_def *
+morphos_function_arg (cum, mode, type, named)
+     CUMULATIVE_ARGS *cum;
+     enum machine_mode mode;
+     tree type;
+     int named;
+{
+  /* Return a marker to indicate whether CR1 needs to set or clear the bit
+     that V.4 uses to say fp args were passed in registers.  Assume that we
+     don't need the marker for software floating point, or compiler generated
+     library calls.  */
+  if (mode == VOIDmode && cum->call_cookie & CALL_VARARGS68K)
+    return GEN_INT (cum->call_cookie);
+
+  return function_arg (cum, mode, type, named);
+}
+
+
+/* Update the data in CUM to advance over an argument
+   of mode MODE and data type TYPE.
+   (TYPE is null for libcalls where that information may not be available.)  */
+
+void
+morphos_function_arg_advance (cum, mode, type, named)
+     CUMULATIVE_ARGS *cum;
+     enum machine_mode mode;
+     tree type;
+     int named;
+{
+  function_arg_advance(cum, mode, type, named);
+  if (cum->call_cookie & CALL_VARARGS68K &&
+      cum->sysv_gregno + cum->fregno - GP_ARG_MIN_REG - FP_ARG_MIN_REG > cum->orig_nargs)
+    {
+      cum->sysv_gregno = GP_ARG_MAX_REG + 1;
+      cum->fregno = FP_ARG_V4_MAX_REG + 1;
+    }
+}
+
+
+/* Perform any needed actions needed for a function that is receiving a
+   variable number of arguments.
+
+   CUM is as above.
+
+   MODE and TYPE are the mode and type of the current parameter.
+
+   PRETEND_SIZE is a variable that should be set to the amount of stack
+   that must be pushed by the prolog to pretend that our caller pushed
+   it.
+
+   Normally, this macro will push all remaining incoming registers on the
+   stack and set PRETEND_SIZE to the length of the registers pushed.  */
+
+void
+morphos_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
+     CUMULATIVE_ARGS *cum;
+     enum machine_mode mode;
+     tree type;
+     int *pretend_size;
+     int no_rtl;
+
+{
+  CUMULATIVE_ARGS next_cum;
+  int reg_size = TARGET_32BIT ? 4 : 8;
+  rtx save_area;
+  int first_reg_offset;
+  tree fntype;
+  int stdarg_p;
+
+  if (!(cum->call_cookie & CALL_VARARGS68K)) {
+    setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl);
+    return;
+  }
+
+  fntype = TREE_TYPE (current_function_decl);
+  stdarg_p = (TYPE_ARG_TYPES (fntype) != 0
+	      && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
+		  != void_type_node));
+
+  /* For varargs, we do not want to skip the dummy va_dcl argument.
+     For stdargs, we do want to skip the last named argument.  */
+  next_cum = *cum;
+  if (stdarg_p)
+    function_arg_advance (&next_cum, mode, type, 1);
+
+  /* Indicate to allocate space on the stack for varargs save area.  */
+  /* ??? Does this really have to be located at a magic spot on the
+     stack, or can we allocate this with assign_stack_local instead.  */
+  rs6000_sysv_varargs_p = 1;
+  if (! no_rtl)
+    save_area = plus_constant (virtual_stack_vars_rtx,
+			       - RS6000_VARARGS_SIZE);
+
+  first_reg_offset = next_cum.sysv_gregno - GP_ARG_MIN_REG;
+}
+
+
+/* If defined, is a C expression that produces the machine-specific
+   code for a call to `__builtin_saveregs'.  This code will be moved
+   to the very beginning of the function, before any parameter access
+   are made.  The return value of this function should be an RTX that
+   contains the value to use as the return of `__builtin_saveregs'.
+
+   The argument ARGS is a `tree_list' containing the arguments that
+   were passed to `__builtin_saveregs'.
+
+   If this macro is not defined, the compiler will output an ordinary
+   call to the library function `__builtin_saveregs'.
+
+   On the Power/PowerPC return the address of the area on the stack
+   used to hold arguments.  Under AIX, this includes the 8 word register
+   save area.
+
+   Under V.4, things are more complicated.  We do not have access to
+   all of the virtual registers required for va_start to do its job,
+   so we construct the va_list in its entirity here, and reduce va_start
+   to a block copy.  This is similar to the way we do things on Alpha.  */
+
+struct rtx_def *
+morphos_expand_builtin_saveregs (args)
+     tree args ATTRIBUTE_UNUSED;
+{
+  rtx block, mem_gpr_fpr, /*mem_reg_save_area, */mem_overflow, tmp;
+  tree fntype;
+  int stdarg_p;
+  HOST_WIDE_INT words, gpr, bits;
+
+  if (!(current_function_args_info.call_cookie & CALL_VARARGS68K))
+    return expand_builtin_saveregs (args);
+
+  fntype = TREE_TYPE (current_function_decl);
+  stdarg_p = (TYPE_ARG_TYPES (fntype) != 0
+	      && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
+		  != void_type_node));
+
+  /* Allocate the va_list constructor.  */
+  block = assign_stack_local (BLKmode, 3 * UNITS_PER_WORD, BITS_PER_WORD);
+  RTX_UNCHANGING_P (block) = 1;
+  RTX_UNCHANGING_P (XEXP (block, 0)) = 1;
+
+  mem_gpr_fpr = change_address (block, word_mode, XEXP (block, 0));
+  mem_overflow = change_address (block, ptr_mode,
+			         plus_constant (XEXP (block, 0),
+						UNITS_PER_WORD));
+  /*mem_reg_save_area = change_address (block, ptr_mode,
+				      plus_constant (XEXP (block, 0),
+						     2 * UNITS_PER_WORD));*/
+
+  /* Construct the two characters of `gpr' and `fpr' as a unit.  */
+  words = current_function_args_info.words;
+  gpr = current_function_args_info.sysv_gregno - GP_ARG_MIN_REG;
+
+  /* Varargs has the va_dcl argument, but we don't count it.  */
+  if (!stdarg_p)
+    {
+      if (gpr > GP_ARG_NUM_REG)
+        words -= 1;
+    }
+
+  bits = (GP_ARG_MAX_REG - GP_ARG_MIN_REG + 1) << 8
+       | (FP_ARG_MAX_REG - FP_ARG_MIN_REG + 1);
+  if (HOST_BITS_PER_WIDE_INT >= BITS_PER_WORD)
+    tmp = GEN_INT (bits << (BITS_PER_WORD - 16));
+  else
+    {
+      bits <<= BITS_PER_WORD - HOST_BITS_PER_WIDE_INT - 16;
+      tmp = immed_double_const (0, bits, word_mode);
+    }
+
+  emit_move_insn (mem_gpr_fpr, tmp);
+
+  /* Find the overflow area.  */
+  tmp = expand_binop (Pmode, add_optab, virtual_incoming_args_rtx,
+		      GEN_INT (words * UNITS_PER_WORD),
+		      mem_overflow, 0, OPTAB_WIDEN);
+  if (tmp != mem_overflow)
+    emit_move_insn (mem_overflow, tmp);
+
+  /*tmp = expand_binop (Pmode, add_optab, virtual_stack_vars_rtx,
+		      GEN_INT (-RS6000_VARARGS_SIZE),
+		      mem_reg_save_area, 0, OPTAB_WIDEN);
+  if (tmp != mem_reg_save_area)
+    emit_move_insn (mem_reg_save_area, tmp);*/
+
+  /* Return the address of the va_list constructor.  */
+  return XEXP (block, 0);
+}
+
--- gcc-2.95.3/gcc/config/rs6000/morphos.h	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/rs6000/morphos.h	Thu Dec 20 00:41:54 2001
@@ -0,0 +1,398 @@
+/* Definitions of target machine for GNU compiler.  Amiga powerpc version.
+   Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "rs6000/sysv4.h"
+
+/* Enable some special Amiga only features.  FIXME: This define should
+   be eliminated in favor of more general ways to enable the features. */
+
+#define TARGET_MORPHOS 1
+
+#undef PROCESSOR_DEFAULT
+#define PROCESSOR_DEFAULT PROCESSOR_PPC604e
+
+#undef DEFAULT_ABI
+#define DEFAULT_ABI ABI_V4
+
+/* Put jump tables in text section to suppress some relocations */
+#undef JUMP_TABLES_IN_TEXT_SECTION
+#define JUMP_TABLES_IN_TEXT_SECTION 1
+
+
+extern enum rs6000_sdata_type rs6000_sdata;
+
+#undef CPP_SPEC
+#define CPP_SPEC \
+  "%{!ansi:" \
+    "%{!noixemul:-Dixemul} " \
+    "%{noixemul:-Dlibnix}} " \
+  "%{mcpu=603e:-D__603e__} " \
+  "%{mcpu=604e:-D__604e__} " \
+  "%{!noixemul:-D__ixemul__ -D__ixemul} " \
+  "%{noixemul:-D__libnix__ -D__libnix} " \
+  "%{malways-restore-r13:-Derrno=(*ixemul_errno)} " \
+  "%{malways-restore-a4:-Derrno=(*ixemul_errno)} " \
+  "%{mrestore-r13:-Derrno=(*ixemul_errno)} " \
+  "%{mrestore-a4:-Derrno=(*ixemul_errno)} " \
+  "%{msoft-float: -D_SOFT_FLOAT} "
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES \
+  "-D__PPC__ -D_CALL_SYSV -Damiga -Damigaos -DMCH_AMIGA -DAMIGA " \
+  "-Asystem(morphos) --Acpu(powerpc) -Amachine(powerpc) " \
+  "-D__MORPHOS__ -Dmorphos -D__powerpc__ " \
+  "-D__saveds=__attribute__((__saveds__)) "\
+  "-D__stackext=__attribute__((__stackext__)) " \
+
+
+/* Choose the right startup file, depending on whether we use base relative
+   code, base relative code with automatic relocation (-resident), or plain
+   crt0.o. 
+  
+   Profiling is currently only available for plain startup.
+   mcrt0.o does not (yet) exist. */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC							\
+  "%{!noixemul:"							\
+    "%{mbaserel:%{!mresident:bcrt0.o%s}}"				\
+    "%{mresident:rcrt0.o%s}"						\
+    "%{mbaserel32:%{!mresident32:lcrt0.o%s}}"				\
+    "%{mresident32:scrt0.o%s}"						\
+    "%{!mresident:%{!mbaserel:%{!mresident32:%{!mbaserel32:"		\
+      "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}}}}"		\
+  "%{noixemul:libnix/startup.o%s} "
+
+#undef ENDFILE_SPEC
+/*#define ENDFILE_SPEC \
+  "%{noixemul:libnix/end.o%s} "*/
+
+/* Automatically search libamiga.a for AmigaOS specific functions.  Note
+   that we first search the standard C library to resolve as much as
+   possible from there, since it has names that are duplicated in libamiga.a
+   which we *don't* want from there.  Then search the standard C library
+   again to resolve any references that libamiga.a might have generated.
+   This may only be a temporary solution since it might be better to simply
+   remove the things from libamiga.a that should be pulled in from libc.a
+   instead, which would eliminate the first reference to libc.a. */
+
+#undef LIB_SPEC
+#define LIB_SPEC							\
+  "%{!noixemul:"							\
+    "%{!p:%{!pg:-lc -lamiga -lamigastubs -lc}}"				\
+    "%{p:-lc_p}%{pg:-lc_p}}"						\
+  "%{noixemul:-lc -lamiga -lamigastubs"					\
+    "%{mstackcheck:-lstack} "						\
+    "%{mstackextend:-lstack}} -lsyscall "
+
+#undef LINK_SPEC
+#define LINK_SPEC							\
+  "%{h*} %{v:-V} %{G*} %{Wl,*:%*} %{YP,*} %{R*} %{Qy:} %{!Qn:-Qy} "	\
+  "%{noixemul:-fl libnix} "						\
+  "%{mbaserel:%{!mresident:-m morphos_baserel -G 1000000 -fl libb}} "	\
+  "%{mresident:-m morphos_baserel -datadata-reloc -G 100000 -fl libb} "	\
+  "%{mbaserel32:%{!mresident32:-m morphos_baserel -fl libb32}} "	\
+  "%{mresident32:-m morphos_baserel -datadata-reloc -fl libb32} "	
+
+/* The place to find libc.a, libamiga.c and crt0.o depends on the runtime
+** environment being used. As usual, default to the ixemul environment.
+*/
+
+/*#undef LINK_PATH_SPEC
+#define LINK_PATH_SPEC \
+ "%{!runtime=*:ixemul%s} %{runtime=ixemul:ixemul%s} \
+ %{runtime=libnix:libnix%s} %{runtime=librilc:librilc%s}"*/
+
+/*#undef LINK_SYSCALL:
+  #define LINK_SYSCALL "-lsyscall "*/
+
+/* Translate '-resident' to '-fbaserel' (they differ in linking stage only).
+   Don't put function addresses in registers for PC-relative code.  */
+
+#undef CC1_SPEC
+#define CC1_SPEC							\
+  "%{G*} "								\
+  "%{mbaserel:-msdata=sysv -G 100000} "					\
+  "%{mbaserel32:-msdata=baserel} "					\
+  "%{mresident:-msdata=sysv -G 100000} "					\
+  "%{mresident32:-msdata=baserel} "						
+
+/* Define the name of the runtime environment (libc, etc.) used so it can be
+   tested for during compilation.
+   Abuse (?) CPP_OS_DEFAULT_SPEC for this purpose. -rask */
+
+/*#undef CPP_OS_DEFAULT_SPEC
+#define CPP_OS_DEFAULT_SPEC \
+ "%{!runtime=*:-D__ixemul__} %{runtime=ixemul:-D__ixemul__} \
+ %{runtime=libnix:-D__libnix__} %{runtime=librilc:-D__librilc__}"*/
+
+#undef EXTRA_SPECS
+#undef MULTILIB_DEFAULTS
+
+/* Compile with stack extension.  */
+
+#define MASK_STACKEXTEND 0x00800000
+#define TARGET_STACKEXTEND ((target_flags & MASK_STACKEXTEND)		\
+  || lookup_attribute ("stackext",					\
+		       TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
+
+/* Compile with stack checking.  */
+
+#define MASK_STACKCHECK 0x00400000
+#define TARGET_STACKCHECK ((target_flags & MASK_STACKCHECK)		\
+  && !(target_flags & MASK_STACKEXTEND)					\
+  && !lookup_attribute ("stackext",					\
+			TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
+
+/* Compile with r13 restoring in public functions.  */
+
+#define MASK_RESTORE_R13 0x00200000
+#define TARGET_RESTORE_R13						\
+  ((target_flags & MASK_RESTORE_R13) && TREE_PUBLIC (current_function_decl))
+
+/* Compile with r13 restoring in all functions.  */
+
+#define MASK_ALWAYS_RESTORE_R13 0x00100000
+#define TARGET_ALWAYS_RESTORE_R13 (target_flags & MASK_ALWAYS_RESTORE_R13)
+
+#undef EXTRA_SUBTARGET_SWITCHES
+#define EXTRA_SUBTARGET_SWITCHES					\
+    { "baserel", 0, "16-bits relative data access"},			\
+    { "baserel32", 0, "32-bits relative data access"},			\
+    { "resident", 0, "make a reentrant executable with <= 64k data"},	\
+    { "resident32", 0, "make reentrant executable"},			\
+    { "stackcheck", MASK_STACKCHECK, "check for stack overflow"},	\
+    { "no-stackcheck", - MASK_STACKCHECK, "don't check for stack overflow"},	\
+    { "stackextend", MASK_STACKEXTEND, "automatically extend stack"},	\
+    { "no-stackextend", - MASK_STACKEXTEND, "don't extend stack"},	\
+    { "fixedstack", - (MASK_STACKCHECK|MASK_STACKEXTEND), "don't extend the stack" },\
+    { "restore-r13", MASK_RESTORE_R13},					\
+    { "no-restore-r13", - MASK_RESTORE_R13},				\
+    { "always-restore-r13", MASK_ALWAYS_RESTORE_R13},			\
+    { "no-always-restore-r13", - MASK_ALWAYS_RESTORE_R13},		\
+    { "restore-a4", MASK_RESTORE_R13},					\
+    { "no-restore-a4", - MASK_RESTORE_R13},				\
+    { "always-restore-a4", MASK_ALWAYS_RESTORE_R13},			\
+    { "no-always-restore-a4", - MASK_ALWAYS_RESTORE_R13},
+
+
+/* This macro generates the assembly code for function entry.
+   FILE is a stdio stream to output the code to.
+   SIZE is an int: how many units of temporary storage to allocate.
+   Refer to the array `regs_ever_live' to determine which registers
+   to save; `regs_ever_live[I]' is nonzero if register number I
+   is ever used in the function.  This macro is responsible for
+   knowing which registers should not be saved even if used.  */
+
+#undef FUNCTION_PROLOGUE
+#define FUNCTION_PROLOGUE(FILE, SIZE) morphos_output_prolog (FILE, SIZE)
+
+
+/* This is (almost;-)) BSD, so it wants DBX format.  */
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#define DBX_DEBUGGING_INFO
+#define	DWARF_DEBUGGING_INFO
+
+#if 0
+/* To maintain the binary compatibility with the m68k structures, we need
+   to align 32-bit integers and pointers only to 16 bits in structures.  */
+
+#undef ADJUST_FIELD_ALIGN
+#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
+  (DECL_MODE (FIELD) != SImode ? (COMPUTED) : MIN ((COMPUTED), 16))
+#endif
+
+/* Accesses to floats must be at least 4 bytes-aligned */
+#define GET_MIN_MODE_ALIGNMENT(mode) (mode == DImode || FLOAT_MODE_P(mode) ? 32 : 8)
+#define GET_MIN_TYPE_ALIGNMENT(type) (FLOAT_TYPE_P(type) ? 32 : 8)
+
+/* Use sjlj exceptions until DWARF2 unwind info works */
+//#define DWARF2_UNWIND_INFO	0
+#undef DWARF2_UNWIND_INFO
+
+/* If defined, a C expression whose value is nonzero if IDENTIFIER
+   with arguments ARGS is a valid machine specific attribute for TYPE.
+   The attributes in ATTRIBUTES have previously been assigned to TYPE.  */
+
+#undef VALID_MACHINE_TYPE_ATTRIBUTE
+#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, NAME, ARGS) \
+  (morphos_valid_type_attribute_p (TYPE, ATTRIBUTES, NAME, ARGS))
+
+#define EXTRA_STACK_INFO \
+	if (morphos_restore_r13()) {			\
+	    info_ptr->calls_p = 1;			\
+	    info_ptr->lr_save_p = 1;			\
+	    regs_ever_live[65] = 1;			\
+	    if (info_ptr->first_gp_reg_save > 13) {	\
+		info_ptr->gp_size += reg_size;		\
+		if (info_ptr->first_gp_reg_save == 14)	\
+		    --info_ptr->first_gp_reg_save;	\
+	    }                           		\
+	}
+
+#define EXTRA_PROLOG \
+	if (morphos_restore_r13() && info->first_gp_reg_save > 14) \
+	    asm_fprintf (file, store_reg,	\
+		 reg_names[13],			\
+		 info->gp_save_offset + sp_offset + (32 - info->first_gp_reg_save) * reg_size, \
+		 reg_names[sp_reg]);
+
+#define EXTRA_PROLOG_END \
+	if (morphos_restore_r13()) \
+		asm_fprintf (file, "\tbl __restore_r13\n");
+
+#define EXTRA_EPILOG \
+	if (morphos_restore_r13() && info->first_gp_reg_save > 14) \
+	    asm_fprintf (file, load_reg,	\
+		reg_names[13],			\
+		info->gp_save_offset + sp_offset + (32 - info->first_gp_reg_save) * info->reg_size, \
+		reg_names[sp_reg]);
+
+
+#define CALL_VARARGS68K		0x80000000 /* Use 68k-style varargs */
+
+
+/* Initialize a variable CUM of type CUMULATIVE_ARGS
+   for a call to a function whose data type is FNTYPE.
+   For a library call, FNTYPE is 0.  */
+
+#undef INIT_CUMULATIVE_ARGS
+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
+  morphos_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE)
+
+/* Similar, but when scanning the definition of a procedure.  We always
+   set NARGS_PROTOTYPE large so we never return an EXPR_LIST.  */
+
+#undef INIT_CUMULATIVE_INCOMING_ARGS
+#define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,LIBNAME) \
+  morphos_init_cumulative_args (&CUM, FNTYPE, LIBNAME, TRUE)
+
+/* Update the data in CUM to advance over an argument
+   of mode MODE and data type TYPE.
+   (TYPE is null for libcalls where that information may not be available.)  */
+
+#undef FUNCTION_ARG_ADVANCE
+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)	\
+  morphos_function_arg_advance (&CUM, MODE, TYPE, NAMED)
+
+/* Determine where to put an argument to a function.
+   Value is zero to push the argument on the stack,
+   or a hard register in which to store the argument.
+
+   MODE is the argument's machine mode.
+   TYPE is the data type of the argument (as a tree).
+    This is null for libcalls where that information may
+    not be available.
+   CUM is a variable of type CUMULATIVE_ARGS which gives info about
+    the preceding args and about the function being called.
+   NAMED is nonzero if this argument is a named parameter
+    (otherwise it is an extra parameter matching an ellipsis).
+
+   On RS/6000 the first eight words of non-FP are normally in registers
+   and the rest are pushed.  The first 13 FP args are in registers.
+
+   If this is floating-point and no prototype is specified, we use
+   both an FP and integer register (or possibly FP reg and stack).  Library
+   functions (when TYPE is zero) always have the proper types for args,
+   so we can pass the FP value just in one register.  emit_library_function
+   doesn't support EXPR_LIST anyway.  */
+
+#undef FUNCTION_ARG
+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
+  morphos_function_arg (&CUM, MODE, TYPE, NAMED)
+
+/* Perform any needed actions needed for a function that is receiving a
+   variable number of arguments.
+
+   CUM is as above.
+
+   MODE and TYPE are the mode and type of the current parameter.
+
+   PRETEND_SIZE is a variable that should be set to the amount of stack
+   that must be pushed by the prolog to pretend that our caller pushed
+   it.
+
+   Normally, this macro will push all remaining incoming registers on the
+   stack and set PRETEND_SIZE to the length of the registers pushed.  */
+
+#undef SETUP_INCOMING_VARARGS
+#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
+  morphos_setup_incoming_varargs (&CUM, MODE, TYPE, &PRETEND_SIZE, NO_RTL)
+
+/* If defined, is a C expression that produces the machine-specific
+   code for a call to `__builtin_saveregs'.  This code will be moved
+   to the very beginning of the function, before any parameter access
+   are made.  The return value of this function should be an RTX that
+   contains the value to use as the return of `__builtin_saveregs'.
+
+   The argument ARGS is a `tree_list' containing the arguments that
+   were passed to `__builtin_saveregs'.
+
+   If this macro is not defined, the compiler will output an ordinary
+   call to the library function `__builtin_saveregs'.  */
+
+#undef EXPAND_BUILTIN_SAVEREGS
+#define EXPAND_BUILTIN_SAVEREGS(ARGS) \
+  morphos_expand_builtin_saveregs (ARGS)
+
+
+/* begin-GG-local: dynamic libraries */
+
+/* This macro is used to check if all collect2 facilities should be used.
+   We need a few special ones, like stripping after linking.  */
+
+#define DO_COLLECTING (do_collecting || morphos_do_collecting())
+
+/* This macro is called in collect2 for every GCC argument name.
+   ARG is a part of commandline (without '\0' at the end).  */
+
+#define COLLECT2_GCC_OPTIONS_HOOK(ARG) morphos_gccopts_hook(ARG)
+
+/* This macro is called in collect2 for every ld's "-l" or "*.o" or "*.a"
+   argument.  ARG is a complete argument, with '\0' at the end.  */
+
+#define COLLECT2_LIBNAME_HOOK(ARG) morphos_libname_hook(ARG)
+
+/* This macro is called at collect2 exit, to clean everything up.  */
+
+#define COLLECT2_EXTRA_CLEANUP morphos_collect2_cleanup
+
+/* This macro is called just before the first linker invocation.
+   LD1_ARGV is "char** argv", which will be passed to "ld".  STRIP is an
+   *address* of "strip_flag" variable.  */
+
+#define COLLECT2_PRELINK_HOOK(LD1_ARGV, STRIP) \
+  morphos_prelink_hook((LD1_ARGV), (STRIP))
+
+/* This macro is called just after the first linker invocation, in place of
+   "nm" and "ldd".  OUTPUT_FILE is the executable's filename.  */
+
+#define COLLECT2_POSTLINK_HOOK(OUTPUT_FILE) morphos_postlink_hook(OUTPUT_FILE)
+/* end-GG-local */
+
+
+extern void morphos_init_cumulative_args ();
+extern void morphos_function_arg_advance ();
+extern struct rtx_def *morphos_function_arg ();
+extern void morphos_setup_incoming_varargs ();
+extern struct rtx_def *morphos_expand_builtin_saveregs ();
+
--- gcc-2.95.3/gcc/config/rs6000/rs6000.c	Thu Jan 25 15:03:34 2001
+++ gcc/gcc/config/rs6000/rs6000.c	Thu Sep 27 19:35:54 2001
@@ -405,6 +405,7 @@
 	case SDATA_DATA: fprintf (file, "%s -msdata=data", start); start = ""; break;
 	case SDATA_SYSV: fprintf (file, "%s -msdata=sysv", start); start = ""; break;
 	case SDATA_EABI: fprintf (file, "%s -msdata=eabi", start); start = ""; break;
+	case SDATA_BREL: fprintf (file, "%s -msdata=baserel", start); start = ""; break;
 	}
 
       if (rs6000_sdata && g_switch_value)
@@ -1278,7 +1279,7 @@
 #if TARGET_ELF
   rtx sym_ref, const_part;
 
-  if (rs6000_sdata == SDATA_NONE || rs6000_sdata == SDATA_DATA)
+  if (rs6000_sdata == SDATA_NONE || rs6000_sdata == SDATA_DATA || rs6000_sdata == SDATA_BREL)
     return 0;
 
   if (DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS)
@@ -1317,6 +1318,44 @@
 #endif
 }
 
+/* Return 1 for an operand in data memory on V.4/eabi */
+
+int
+baserel_data_operand (op, mode)
+     rtx op ATTRIBUTE_UNUSED;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+#if TARGET_ELF
+  rtx sym_ref, const_part;
+
+  if (rs6000_sdata != SDATA_BREL)
+    return 0;
+
+  if (DEFAULT_ABI != ABI_V4 && DEFAULT_ABI != ABI_SOLARIS)
+    return 0;
+
+  if (GET_CODE (op) == SYMBOL_REF)
+    sym_ref = op;
+
+  else if (GET_CODE (op) != CONST
+	   || GET_CODE (XEXP (op, 0)) != PLUS
+	   || GET_CODE (XEXP (XEXP (op, 0), 0)) != SYMBOL_REF
+	   || GET_CODE (XEXP (XEXP (op, 0), 1)) != CONST_INT)
+    return 0;
+
+  else
+    sym_ref = XEXP (XEXP (op, 0), 0);
+
+  if (*XSTR (sym_ref, 0) != '@')
+    return 0;
+
+  return 1;
+
+#else
+  return 0;
+#endif
+}
+
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS
    for a call to a function whose data type is FNTYPE.
@@ -3388,6 +3427,9 @@
 	   && GET_CODE (XEXP (x, 0)) == REG && CONSTANT_P (XEXP (x, 1)))
     {
       output_addr_const (file, XEXP (x, 1));
+      if (baserel_data_operand(XEXP (x, 1)))
+	fprintf (file, "@drell(%s)", reg_names[ REGNO (XEXP (x, 0)) ]);
+      else
       fprintf (file, "@l(%s)", reg_names[ REGNO (XEXP (x, 0)) ]);
     }
   else
@@ -3739,6 +3781,10 @@
 				  + info_ptr->toc_size
 				  + info_ptr->main_size, 8);
 
+#ifdef EXTRA_STACK_INFO
+  EXTRA_STACK_INFO
+#endif
+
   /* Calculate the offsets */
   switch (abi)
     {
@@ -4265,6 +4311,10 @@
 	asm_fprintf (file, "\tmtlr %s\n", reg_names[0]);
     }
 
+#ifdef EXTRA_PROLOG
+  EXTRA_PROLOG
+#endif
+
   /* NT needs us to probe the stack frame every 4k pages for large frames, so
      do it here.  */
   if (DEFAULT_ABI == ABI_NT && info->total_size > 4096)
@@ -4377,6 +4427,10 @@
       rs6000_output_load_toc_table (file, 30);
     }
 
+#ifdef EXTRA_PROLOG_END
+  EXTRA_PROLOG_END
+#endif
+
   if (DEFAULT_ABI == ABI_NT)
     {
       assemble_name (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
@@ -4437,6 +4491,10 @@
       if (info->lr_save_p)
 	asm_fprintf (file, "\tmtlr %s\n", reg_names[0]);
 
+#ifdef EXTRA_EPILOG
+      EXTRA_EPILOG
+#endif
+
       /* Restore gpr's.  */
       if (! TARGET_MULTIPLE || info->first_gp_reg_save == 31 || TARGET_64BIT)
 	{
@@ -5858,7 +5916,7 @@
 	}
       else
 	{
-	  if (rs6000_sdata != SDATA_NONE && (size > 0) && (size <= g_switch_value))
+	  if (rs6000_sdata != SDATA_NONE && rs6000_sdata != SDATA_BREL && (size > 0) && (size <= g_switch_value))
 	    {
 	      if (rs6000_sdata == SDATA_EABI)
 		sdata2_section ();
@@ -5924,9 +5982,16 @@
 	    abort ();
 	}
 
-      if ((size > 0 && size <= g_switch_value)
+      if ((!name 
+	   && (!TREE_READONLY (decl) || TREE_THIS_VOLATILE(decl))
+	   && (g_switch_value > 0xffff || (size > 0 && size <= g_switch_value)
+	       || rs6000_sdata == SDATA_BREL))  
 	  || (name
-	      && ((len == sizeof (".sdata")-1 && strcmp (name, ".sdata") == 0)
+	      && ((rs6000_sdata == SDATA_BREL 
+		   && ((len == sizeof (".data") && strcmp (name, ".data") == 0)
+		       || (len == sizeof (".data1") && strcmp (name, ".data1") == 0)
+		       || (len == sizeof (".bss") && strcmp (name, ".bss") == 0))) 
+		  || (len == sizeof (".sdata")-1 && strcmp (name, ".sdata") == 0)
 		  || (len == sizeof (".sdata2")-1 && strcmp (name, ".sdata2") == 0)
 		  || (len == sizeof (".sbss")-1 && strcmp (name, ".sbss") == 0)
 		  || (len == sizeof (".sbss2")-1 && strcmp (name, ".sbss2") == 0)
--- gcc-2.95.3/gcc/config/rs6000/rs6000.h	Wed Mar 22 19:54:05 2000
+++ gcc/gcc/config/rs6000/rs6000.h	Thu Sep 27 19:35:54 2001
@@ -3276,6 +3276,7 @@
 extern int current_file_function_operand ();
 extern int input_operand ();
 extern int small_data_operand ();
+extern int baserel_data_operand ();
 extern void init_cumulative_args ();
 extern void function_arg_advance ();
 extern int function_arg_boundary ();
--- gcc-2.95.3/gcc/config/rs6000/rs6000.md	Thu Jan 25 15:03:35 2001
+++ gcc/gcc/config/rs6000/rs6000.md	Thu Sep 27 19:35:54 2001
@@ -5828,14 +5828,18 @@
   [(set (match_operand:SI 0 "gpc_reg_operand" "=b")
 	(high:SI (match_operand 1 "" "")))]
   "TARGET_ELF && ! TARGET_64BIT"
-  "{liu|lis} %0,%1@ha")
+  "*
+  return (baserel_data_operand(operands[1]) ?
+    \"{addiu|addis} %0,13,%1@drelha\" : \"{liu|lis} %0,%1@ha\");")
 
 (define_insn "elf_low"
   [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
 	(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
 		   (match_operand 2 "" "")))]
    "TARGET_ELF && ! TARGET_64BIT"
-   "{cal|la} %0,%2@l(%1)")
+   "*
+   return (baserel_data_operand(operands[2]) ?
+     \"{cal|la} %0,%2@drell(%1)\" : \"{cal|la} %0,%2@l(%1)\");")
 
 ;; Set up a register with a value from the GOT table
 
@@ -7742,10 +7746,24 @@
 
   emit_move_insn (chain, stack_bot);
 
+  /* Under MorphOS, we may have to check/extend the stack. Do it via a 
+     call to an external function. */
+  if (TARGET_MORPHOS && target_flags & (MASK_STACKCHECK | MASK_STACKEXTEND)) 
+    {
+      rtx tmp = gen_reg_rtx (Pmode);
+      emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, 
+				target_flags & MASK_STACKEXTEND ? 
+				  \"__alloc_stk_ext\" : \"__alloc_stk_chk\"),
+				tmp, 0, Pmode, 1, operands[1], Pmode);
+      emit_insn (gen_set_sp (tmp));
+      /*emit_move_insn (operands[0], tmp);*/
+      emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
+      DONE;
+    }
   /* Under Windows NT, we need to add stack probes for large/variable
      allocations, so do it via a call to the external function alloca
      instead of doing it inline.  */
-  if (DEFAULT_ABI == ABI_NT
+  else if (DEFAULT_ABI == ABI_NT
       && (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) > 4096))
     {
       rtx tmp = gen_reg_rtx (Pmode);
--- gcc-2.95.3/gcc/config/rs6000/sysv4.h	Thu Jan 25 15:03:37 2001
+++ gcc/gcc/config/rs6000/sysv4.h	Thu Sep 27 19:35:54 2001
@@ -24,7 +24,8 @@
   SDATA_NONE,			/* no small data support */
   SDATA_DATA,			/* just put data in .sbss/.sdata, don't use relocs */
   SDATA_SYSV,			/* Use r13 to point to .sdata/.sbss */
-  SDATA_EABI			/* Use r13 like above, r2 points to .sdata2/.sbss2 */
+  SDATA_EABI,			/* Use r13 like above, r2 points to .sdata2/.sbss2 */
+  SDATA_BREL			/* Use r13 to point to .data/.sdata/.sbss/.bss */
 };
 
 extern enum rs6000_sdata_type rs6000_sdata;
@@ -181,6 +182,8 @@
 	rs6000_sdata = SDATA_SYSV;					\
       else if (!strcmp (rs6000_sdata_name, "eabi"))			\
 	rs6000_sdata = SDATA_EABI;					\
+      else if (!strcmp (rs6000_sdata_name, "baserel"))			\
+	rs6000_sdata = SDATA_BREL;					\
       else								\
 	error ("Bad value for -msdata=%s", rs6000_sdata_name);		\
     }									\
--- gcc-2.95.3/gcc/config/rs6000/t-morphos	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/rs6000/t-morphos	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,63 @@
+# Makefile fragment for MorphOS target.
+
+# Do not build libgcc1.
+LIBGCC1 =
+CROSS_LIBGCC1 =
+#LIBGCC1_TEST =
+
+# These are really part of libgcc1, but this will cause them to be
+# built correctly, so... [taken from t-sparclite]
+LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
+
+# Extra object for cc1
+morphos.o: $(srcdir)/config/rs6000/morphos.c $(CONFIG_H)
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+	cat $(srcdir)/config/fp-bit.c > dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+	echo '#define FLOAT' > fp-bit.c
+	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+# Build libgcc.a with different options.
+
+MULTILIB_OPTIONS       = mbaserel32
+
+MULTILIB_DIRNAMES      = libb32
+
+MULTILIB_MATCHES       = mbaserel32=mresident32 \
+			 mbaserel32=msdata=baserel
+
+#LIBGCC = stmp-multilib
+#LIBGCC =
+#INSTALL_LIBGCC = install-multilib
+#INSTALL_LIBGCC =
+
+# Each compilation environment (Dice, GCC, SAS/C, vbcc, etc) provides its
+# own equivalent of the UNIX /usr/include tree.  For gcc, the standard headers
+# are in GG:include and system specific headers are in GG:os-include.
+# Use these paths for fixincludes.
+
+SYSTEM_HEADER_DIR = GG:include
+OTHER_FIXINCLUDES_DIRS = GG:os-include
+
+# Try to make it possible to build libgcc.a without an existing libc and
+# related include files (the default runtime of ixemul needs machine/ansi.h
+# to compile). This is useful since libc for this target isn't quite ready
+# yet. -rask
+
+TARGET_LIBGCC2_CFLAGS = -mfixedstack #-Dinhibit_libc 
+STMP_FIXPROTO =
+
+### begin-GG-local: dynamic libraries
+# Extra objects that get compiled and linked to collect2
+
+EXTRA_COLLECT2_OBJS = morphoscollect2.o
+
+# Build supplimentary MorphOS target support file for collect2
+morphoscollect2.o: morphoscollect2.c
+	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+	-DA2IXDIR_PREFIX=\"$(prefix)/share/a2ixlibrary\" $(srcdir)/morphoscollect2.c
+### end-GG-local
+
--- gcc-2.95.3/gcc/config/rs6000/xm-morphos.h	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/rs6000/xm-morphos.h	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,255 @@
+/* Configuration for GNU C-compiler for Commodore Amiga, running AmigaOS.
+   Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include "rs6000/xm-sysv4.h"
+
+/* Define various things that the Amiga host has. */
+
+#undef HAVE_VPRINTF
+#define HAVE_VPRINTF
+#undef HAVE_PUTENV
+#define HAVE_PUTENV
+#undef HAVE_STRERROR
+#define HAVE_STRERROR
+#undef HAVE_ATEXIT
+#define HAVE_ATEXIT
+#undef HAVE_RENAME
+#define HAVE_RENAME
+
+/* Amiga specific headers, such as from the Native Developer Update kits,
+   go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
+   Unix "/usr/include".  All other include paths are set in Makefile. */
+
+#define SYSTEM_INCLUDE_DIR	"GG:os-include"
+#define STANDARD_INCLUDE_DIR	"GG:include"
+
+#define STANDARD_EXEC_PREFIX "/gg/lib/gcc-lib/"
+#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/"
+#define STANDARD_STARTFILE_PREFIX "/gg/lib/"
+#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/"
+#define TOOLDIR_BASE_PREFIX "/gg/"
+
+/* The AmigaOS stores file names with regard to upper/lower case, but actions
+   on existing files are case independent on the standard filesystems.
+
+   A good example of where this causes problems is the conflict between the C
+   include file <string.h> and the C++ include file <String.h>, where the C++
+   include file dir is searched first and thus causes includes of <string.h>
+   to include <String.h> instead.
+
+   In order to solve this problem we define the macro OPEN_CASE_SENSITIVE as
+   the name of the function that takes the same args as open() and does case
+   dependent opens.  */
+
+#define OPEN_CASE_SENSITIVE(NAME, FLAGS, MODE) open ((NAME), (FLAGS) | O_CASE, (MODE))
+
+/* On the Amiga, there are two pathname separators, '/' (DIR_SEPARATOR)
+   and ':' (VOL_SEPARATOR).  DIR_SEPARATOR defaults to the correct
+   character, so we don't have to explicitly set it. */
+
+#define DIR_SEPARATOR '/'
+#define VOL_SEPARATOR ':'
+#define DIR_SEPARATOR_2 VOL_SEPARATOR
+
+/* Determine whether a '\0'-terminated file name is absolute or not.
+
+   This checks for both, '/' as the first character, since we're running under
+   ixemul.library which provides for this unix'ism, and for the usual 
+   logical-terminator, ':', somewhere in the filename.  */
+
+#define FILE_NAME_ABSOLUTE_P(NAME) ((NAME)[0] == '/' || index ((NAME), ':'))
+
+
+#if  0
+
+/* Fork one piped subcommand.  SEARCH_FLAG is the system call to use
+   (either execv or execvp).  ARGV is the arg vector to use.
+   NOT_LAST is nonzero if this is not the last subcommand
+   (i.e. its output should be piped to the next one.)  */
+
+#define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
+({int (*_func)() = (SEARCH_FLAG ? execv : execvp);			\
+  int _pid;								\
+  int _pdes[2];								\
+  int _input_desc = last_pipe_input;					\
+  int _output_desc = STDOUT_FILE_NO;					\
+  int _retries, _sleep_interval, _result;				\
+									\
+  /* If this isn't the last process, make a pipe for its output,	\
+     and record it as waiting to be the input to the next process.  */	\
+									\
+  if (NOT_LAST)								\
+    {									\
+      if (pipe (_pdes) < 0)						\
+	pfatal_with_name ("pipe");					\
+      _output_desc = _pdes[WRITE_PORT];					\
+      last_pipe_input = _pdes[READ_PORT];				\
+    }									\
+  else									\
+    last_pipe_input = STDIN_FILE_NO;					\
+									\
+  /* Fork a subprocess; wait and retry if it fails.  */			\
+  _sleep_interval = 1;							\
+  for (_retries = 0; _retries < 4; _retries++)				\
+    {									\
+      _pid = vfork ();							\
+      if (_pid >= 0)							\
+	break;								\
+      sleep (_sleep_interval);						\
+      _sleep_interval *= 2;						\
+    }									\
+									\
+  switch (_pid)								\
+    {									\
+    case -1:								\
+      pfatal_with_name ("vfork");					\
+      /* NOTREACHED */							\
+      _result = 0;							\
+      break;								\
+									\
+    case 0: /* child */							\
+      /* Move the input and output pipes into place, if nec.  */	\
+      if (_input_desc != STDIN_FILE_NO)					\
+	{								\
+	  close (STDIN_FILE_NO);					\
+	  dup (_input_desc);						\
+	  close (_input_desc);						\
+	}								\
+      if (_output_desc != STDOUT_FILE_NO)				\
+	{								\
+	  close (STDOUT_FILE_NO);					\
+	  dup (_output_desc);						\
+	  close (_output_desc);						\
+	}								\
+									\
+      /* Close the parent's descs that aren't wanted here.  */		\
+      if (last_pipe_input != STDIN_FILE_NO)				\
+	close (last_pipe_input);					\
+									\
+      /* Exec the program.  */						\
+      (*_func) (PROGRAM, ARGV);						\
+      perror_exec (PROGRAM);						\
+      exit (-1);							\
+      /* NOTREACHED */							\
+      _result = 0;							\
+      break;								\
+									\
+    default:								\
+      /* In the parent, after forking.					\
+	 Close the descriptors that we made for this child.  */		\
+      if (_input_desc != STDIN_FILE_NO)					\
+	close (_input_desc);						\
+      if (_output_desc != STDOUT_FILE_NO)				\
+	close (_output_desc);						\
+									\
+      /* Return child's process number.  */				\
+      _result = _pid;							\
+      break;								\
+    } 									\
+_result; })								\
+
+#define PEXECUTE_RESULT(STATUS, COMMAND) \
+  ({ wait (& STATUS); })
+
+/* the following macros are stolen more or less from xm-vms.h ... */
+
+/* This macro is used to help compare filenames in cp-lex.c.
+
+   We also need to make sure that the names are all lower case, because
+   we must be able to compare filenames to determine if a file implements
+   a class.  */
+
+#define FILE_NAME_NONDIRECTORY(C)				\
+({								\
+   extern char *rindex();					\
+   char * pnt_ = (C), * pnt1_;					\
+   pnt1_ = pnt_ - 1;						\
+   while (*++pnt1_)						\
+     if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20;	\
+   pnt1_ = rindex (pnt_, '/'); 					\
+   pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_);		\
+   (pnt1_ == 0 ? pnt_ : pnt1_ + 1);				\
+ })
+
+/* Macro to generate the name of the cross reference file.  The standard
+   one does not work, since it was written assuming that the conventions
+   of a unix style filesystem will work on the host system.
+ 
+   Contrary to VMS, I'm using the original unix filename, there's no reason
+   not to use this under AmigaOS. */
+
+#define XREF_FILE_NAME(BUFF, NAME)	\
+  s = FILE_NAME_NONDIRECTORY (NAME);			\
+  if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME);	\
+  else {						\
+    unsigned char ch = *s; /* could be Latin1 char.. */	\
+    /* temporary: cut the filename from the directory */\
+    *s = 0;						\
+    sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1);	\
+    /* and restore the filename */			\
+    *s = ch;						\
+  }							\
+
+/* Macro that is used in cp-xref.c to determine whether a file name is
+   absolute or not.
+
+   This checks for both, '/' as first character, since we're running under
+   ixemul.library which provides for this unix'ism, and for the usual 
+   logical-terminator, ':', somewhere in the filename. */
+
+#define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
+
+/* the colon conflicts with the name space of logicals */
+
+#define PATH_SEPARATOR ','
+
+/* Phil.B 17-Apr-95 Added stack checking code submitted by Kriton Kyrimis
+   (kyrimis@theseas.ntua.gr) on 10-Feb-95, modified for inclusion into gcc
+
+   What stackcheck does is to add the following code at the beginning of
+   each function:
+	cmpl __StackBottom,sp
+	bccs .+8
+	jmp __StackOverflow
+
+   _StackBottom and _StackOverflow() are defined in stackchecksetup.c.
+   _StackBottom is set to the bottom of the stack plus some leeway for
+   subroutine arguments (128 bytes).  _StackOverflow() sets the stack
+   pointer to a sane value, prints an error message and exits.
+
+   Even with stack checking, you cannot be completely safe, as overflows
+   are detected on function entry, rather than during function execution.
+   E.g.,
+	crash(){
+	  char scribble[100000];
+	  int i;
+	  for (i=0; i<100000; i++) scribble[i]=0;
+	  check(scribble);
+	}
+	check(char *x){}
+   In the above example, stack overflow and its side-effects will occur in
+   crash(), but it will be detected in check(), when it is too late. (The
+   same thing happens with SAS/C's stack checking, BTW.)
+*/
+
+/* #defined AMIGA_STACK_CHECKING */
+
+#endif
--- gcc-2.95.3/gcc/config/rs6000/x-morphos	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/config/rs6000/x-morphos	Thu Sep 27 19:35:54 2001
@@ -0,0 +1,38 @@
+# Note: It doesn't do any good to try to define prefix or local_prefix
+# in the host overrides because configure will just change them back.
+# You either have to give an appropriate option to configure or live with
+# an Amiga specific patch to configure.  See the note in configure.  -fnf
+
+# Building under AmigaOS almost certainly requires an already working gcc.
+# To bootstrap without "-pipe" do "make PIPE=".
+
+CC = gcc $(PIPE)
+
+# Disable -pipe for now since I had problems bootstrapping gcc 2.5.5 with
+# it. (fnf)
+#PIPE = -pipe
+
+# Allow the user to override the default host optimization with gcc, or if the
+# host compiler is not gcc and doesn't understand -O<N>.
+
+X_OPTIMIZE = -O2
+
+# The standard additional host flags for the compiler.
+
+X_CFLAGS = $(X_OPTIMIZE) -mstackextend
+
+# Man pages get a wierd suffix...
+
+manext = .0
+
+# We really shouldn't specify CFLAGS from here, but there's no other way
+# to get rid of the `-g' indoctrinated by Makefile.in.  Note this becomes
+# part of both the host compilation CFLAGS and the target compilation
+# CFLAGS.
+
+CFLAGS =
+
+# Ranlib does exist, but may not be in a path where the default RANLIB_TEST
+# expects it, so just force it to true.
+
+RANLIB_TEST = true
--- gcc-2.95.3/gcc/configure	Fri Mar 16 15:13:48 2001
+++ gcc/gcc/configure	Wed Dec  5 23:55:03 2001
@@ -1,85 +1,155 @@
 #! /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.
+# Generated by Autoconf 2.52.
 #
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# 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=
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
 ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-gnu-ld           arrange to work with GNU ld."
-ac_help="$ac_help
-  --with-ld               arrange to use the specified ld (full pathname)."
-ac_help="$ac_help
-  --with-gnu-as           arrange to work with GNU as."
-ac_help="$ac_help
-  --with-as               arrange to use the specified as (full pathname)."
-ac_help="$ac_help
-  --with-stabs            arrange to use stabs instead of host debug format."
-ac_help="$ac_help
-  --with-elf              arrange to use ELF instead of host debug format."
-ac_help="$ac_help
-  --with-local-prefix=DIR specifies directory to put local include."
-ac_help="$ac_help
-  --with-gxx-include-dir=DIR
-                          specifies directory to put g++ header files."
-ac_help="$ac_help
-  --enable-checking       enable expensive run-time checks."
-ac_help="$ac_help
-  --disable-cpp           don't provide a user-visible C preprocessor."
-ac_help="$ac_help
-  --with-cpp-install-dir=DIR
-                          install the user visible C preprocessor in DIR
-                          (relative to PREFIX) as well as PREFIX/bin."
-ac_help="$ac_help
-  --enable-cpplib         use cpplib for the C preprocessor."
-ac_help="$ac_help
-  --enable-c-cpplib       link cpplib directly into C and C++ compilers
-                          (EXPERIMENTAL) (implies --enable-cpplib)."
-ac_help="$ac_help
-  --enable-c-mbchar       enable multibyte characters for C and C++."
-ac_help="$ac_help
-  --disable-fast-fixincludes
-                         Disable the new fast fixincludes.
-                         Run the old fixincludes script unconditionally"
-ac_help="$ac_help
-  --enable-haifa          use the experimental scheduler.
-  --disable-haifa         don't use the experimental scheduler for the
-                          targets which normally enable it."
-ac_help="$ac_help
-  --enable-threads        enable thread usage for target GCC.
-  --enable-threads=LIB    use LIB thread package for target GCC."
-ac_help="$ac_help
-  --enable-objc-gc	  enable the use of Boehm's garbage collector with
-			  the GNU Objective-C runtime."
-ac_help="$ac_help
-  --enable-java-gc=TYPE   choose garbage collector [boehm]"
-ac_help="$ac_help
-  --enable-dwarf2	  enable DWARF2 debugging as default."
-ac_help="$ac_help
-  --enable-nls            use Native Language Support (disabled by default).
-                          EXPERIMENTAL, see ABOUT-GCC-NLS."
-ac_help="$ac_help
-  --disable-nls           do not use Native Language Support"
-ac_help="$ac_help
-  --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
-  --with-catgets          use catgets functions if available"
+cross_compiling=no
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+ac_unique_file="tree.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
 
 # Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 exec_prefix=NONE
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -88,10 +158,15 @@
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
@@ -103,19 +178,22 @@
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 infodir='${prefix}/info'
+guidedir='${prefix}/guidedir'
+htmldir='${prefix}/htmldir'
+psdir='${prefix}/psdir'
+dvidir='${prefix}/dvidir'
 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
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
 
 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"
@@ -123,59 +201,59 @@
     continue
   fi
 
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case "$ac_option" in
+  case $ac_option in
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
+    bindir=$ac_optarg ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
+    ac_prev=build_alias ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
+    build_alias=$ac_optarg ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
 
   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
   | --da=*)
-    datadir="$ac_optarg" ;;
+    datadir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    ac_feature=`expr "x$ac_option" : 'x-*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" ;;
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
 
   -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # 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
-      *=*) ;;
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
       *) ac_optarg=yes ;;
     esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
+    eval "enable_$ac_feature='$ac_optarg'" ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -184,95 +262,63 @@
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
+    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 ;;
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host ;;
+    ac_prev=host_alias ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
+    host_alias=$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" ;;
+    includedir=$ac_optarg ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
+    infodir=$ac_optarg ;;
+
+ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
+   ac_prev=guidedir ;;
+ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm)
+   ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+    htmldir="$ac_optarg" ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+   ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+   ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
+    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" ;;
+    libexecdir=$ac_optarg ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
   | --localstate | --localstat | --localsta | --localst \
@@ -281,12 +327,12 @@
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
+    localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
+    mandir=$ac_optarg ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
@@ -307,26 +353,26 @@
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
+    oldincludedir=$ac_optarg ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
+    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_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_suffix=$ac_optarg ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -343,7 +389,7 @@
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
+    program_transform_name=$ac_optarg ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
@@ -353,7 +399,7 @@
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
+    sbindir=$ac_optarg ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -364,58 +410,57 @@
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
+    sharedstatedir=$ac_optarg ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
+    site=$ac_optarg ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
+    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" ;;
+    sysconfdir=$ac_optarg ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
+    ac_prev=target_alias ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
+    target_alias=$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 ;;
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # 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
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
     ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
       *) ac_optarg=yes ;;
     esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
+    eval "with_$ac_package='$ac_optarg'" ;;
 
   -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    ac_package=`expr "x$ac_option" : 'x-*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" ;;
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -426,98 +471,99 @@
     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_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" ;;
+    x_libraries=$ac_optarg ;;
 
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
     ;;
 
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
   *)
-    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"
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  { 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
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 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
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
 
-# 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
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir guidedir\
+	      htmldir psdir dvidir mandir
 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" ;;
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
   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
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: should be removed in autoconf 3.0.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
 
-# 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
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
 
-# 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=tree.c
+test "$silent" = yes && exec 6>/dev/null
 
 # 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%/[^/][^/]*$%%'`
+  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
@@ -528,13 +574,347 @@
 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; }
+    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
   else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+    { echo "$as_me: error: cannot find sources in $srcdir" >&2
+   { (exit 1); exit 1; }; }
   fi
 fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<EOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+EOF
+
+  cat <<EOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
+  --htmldir=DIR           HTML documentation in DIR [PREFIX/html]
+  --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
+  --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
+  --mandir=DIR           man documentation [PREFIX/man]
+EOF
+
+  cat <<\EOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+EOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\EOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-checking       enable expensive run-time checks.
+  --disable-cpp           don't provide a user-visible C preprocessor.
+  --enable-cpplib         use cpplib for the C preprocessor.
+  --enable-c-cpplib       link cpplib directly into C and C++ compilers
+                          (EXPERIMENTAL) (implies --enable-cpplib).
+  --enable-c-mbchar       enable multibyte characters for C and C++.
+  --disable-fast-fixincludes
+                         Disable the new fast fixincludes.
+                         Run the old fixincludes script unconditionally
+  --enable-haifa          use the experimental scheduler.
+  --disable-haifa         don't use the experimental scheduler for the
+                          targets which normally enable it.
+  --enable-threads        enable thread usage for target GCC.
+  --enable-threads=LIB    use LIB thread package for target GCC.
+  --enable-objc-gc	  enable the use of Boehm's garbage collector with
+			  the GNU Objective-C runtime.
+  --enable-java-gc=TYPE   choose garbage collector boehm
+  --enable-nls            use Native Language Support (disabled by default).
+                          EXPERIMENTAL, see ABOUT-GCC-NLS.
+  --disable-nls           do not use Native Language Support
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           arrange to work with GNU ld.
+  --with-ld               arrange to use the specified ld (full pathname).
+  --with-gnu-as           arrange to work with GNU as.
+  --with-as               arrange to use the specified as (full pathname).
+  --with-stabs            arrange to use stabs instead of host debug format.
+  --with-elf              arrange to use ELF instead of host debug format.
+  --with-local-prefix=DIR specifies directory to put local include.
+  --with-gxx-include-dir=DIR
+                          specifies directory to put g++ header files.
+  --with-cpp-install-dir=DIR
+                          install the user visible C preprocessor in DIR
+                          (relative to PREFIX) as well as PREFIX/bin.
+  --enable-dwarf2	  enable DWARF2 debugging as default.
+  --with-included-gettext use the GNU gettext library included here
+  --with-catgets          use catgets functions if available
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+EOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+    cd $ac_subdir
+    # A "../" for each directory in /$ac_subdir.
+    ac_dots=`echo $ac_subdir |
+             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+    case $srcdir in
+    .) # No --srcdir option.  We are building in place.
+      ac_sub_srcdir=$srcdir ;;
+    [\\/]* | ?:[\\/]* ) # Absolute path.
+      ac_sub_srcdir=$srcdir/$ac_subdir ;;
+    *) # Relative path.
+      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+    esac
+
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_sub_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_sub_srcdir/configure; then
+      echo
+      $SHELL $ac_sub_srcdir/configure  --help=recursive
+    elif test -f $ac_sub_srcdir/configure.ac ||
+           test -f $ac_sub_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\EOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+EOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.52.  Invocation command line was
+
+  $ $0 $@
+
+EOF
+{
+cat <<_ASUNAME
+## ---------- ##
+## Platform.  ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+} >&5
+
+cat >&5 <<EOF
+## ------------ ##
+## Core tests.  ##
+## ------------ ##
+
+EOF
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+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_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+    ac_sep=" " ;;
+  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+     ac_sep=" " ;;
+  esac
+  # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  echo >&5
+  echo "## ----------------- ##" >&5
+  echo "## Cache variables.  ##" >&5
+  echo "## ----------------- ##" >&5
+  echo >&5
+  # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} >&5
+  sed "/^$/d" confdefs.h >conftest.log
+  if test -s conftest.log; then
+    echo >&5
+    echo "## ------------ ##" >&5
+    echo "## confdefs.h.  ##" >&5
+    echo "## ------------ ##" >&5
+    echo >&5
+    cat conftest.log >&5
+  fi
+  (echo; echo) >&5
+  test "$ac_signal" != 0 &&
+    echo "$as_me: caught signal $ac_signal" >&5
+  echo "$as_me: exit $exit_status" >&5
+  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
 if test -z "$CONFIG_SITE"; then
   if test "x$prefix" != xNONE; then
@@ -545,42 +925,109 @@
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
+    { echo "$as_me:928: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    cat "$ac_site_file" >&5
     . "$ac_site_file"
   fi
 done
 
 if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:939: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
 else
-  echo "creating cache $cache_file"
-  > $cache_file
+  { echo "$as_me:947: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:963: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:967: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:973: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:975:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:977:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.  It doesn't matter if
+  # we pass some twice (in addition to the command line arguments).
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+       ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:996: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:998: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 ac_ext=c
-# 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
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+echo "#! $SHELL" >conftest.sh
+echo  "exit 0"   >>conftest.sh
+chmod +x conftest.sh
+if { (echo "$as_me:1018: PATH=\".;.\"; conftest.sh") >&5
+  (PATH=".;."; conftest.sh) 2>&5
+  ac_status=$?
+  echo "$as_me:1021: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  ac_path_separator=';'
 else
-  ac_n= ac_c='\c' ac_t=
+  ac_path_separator=:
 fi
+PATH_SEPARATOR="$ac_path_separator"
+rm -f conftest.sh
 
-
-
+ac_config_headers="$ac_config_headers auto-host.h:config.in"
 
 remove=rm
 hard_link=ln
@@ -595,8 +1042,8 @@
 # - one of the terminals (":" and ";") is the first or last sign
 # - two terminals occur directly after each other
 # - the path contains an element with a dot in it
-echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:600: checking LIBRARY_PATH variable" >&5
+echo "$as_me:1045: checking LIBRARY_PATH variable" >&5
+echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
 case ${LIBRARY_PATH} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     library_path_setting="contains current directory"
@@ -605,12 +1052,18 @@
     library_path_setting="ok"
     ;;
 esac
-echo "$ac_t""$library_path_setting" 1>&6
+echo "$as_me:1055: result: $library_path_setting" >&5
+echo "${ECHO_T}$library_path_setting" >&6
 if test "$library_path_setting" != "ok"; then
-{ echo "configure: error: 
+{ { echo "$as_me:1058: error:
+*** LIBRARY_PATH shouldn't contain the current directory when
+*** building gcc. Please change the environment variable
+*** and run configure again." >&5
+echo "$as_me: error:
 *** LIBRARY_PATH shouldn't contain the current directory when
 *** building gcc. Please change the environment variable
-*** and run configure again." 1>&2; exit 1; }
+*** and run configure again." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
@@ -620,8 +1073,8 @@
 # - one of the terminals (":" and ";") is the first or last sign
 # - two terminals occur directly after each other
 # - the path contains an element with a dot in it
-echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
-echo "configure:625: checking GCC_EXEC_PREFIX variable" >&5
+echo "$as_me:1076: checking GCC_EXEC_PREFIX variable" >&5
+echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
 case ${GCC_EXEC_PREFIX} in
   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
     gcc_exec_prefix_setting="contains current directory"
@@ -630,105 +1083,114 @@
     gcc_exec_prefix_setting="ok"
     ;;
 esac
-echo "$ac_t""$gcc_exec_prefix_setting" 1>&6
+echo "$as_me:1086: result: $gcc_exec_prefix_setting" >&5
+echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
 if test "$gcc_exec_prefix_setting" != "ok"; then
-{ echo "configure: error: 
+{ { echo "$as_me:1089: error:
 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
 *** building gcc. Please change the environment variable
-*** and run configure again." 1>&2; exit 1; }
+*** and run configure again." >&5
+echo "$as_me: error:
+*** GCC_EXEC_PREFIX shouldn't contain the current directory when
+*** building gcc. Please change the environment variable
+*** and run configure again." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 # Check for additional parameters
 
 # With GNU ld
+
 # Check whether --with-gnu-ld or --without-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then
   withval="$with_gnu_ld"
   gnu_ld_flag="$with_gnu_ld"
 else
   gnu_ld_flag=no
-fi
-
+fi;
 
 # With pre-defined ld
+
 # Check whether --with-ld or --without-ld was given.
 if test "${with_ld+set}" = set; then
   withval="$with_ld"
   DEFAULT_LINKER="$with_ld"
-fi
-
+fi;
 if test x"${DEFAULT_LINKER+set}" = x"set"; then
   if test ! -x "$DEFAULT_LINKER"; then
-    echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2
+    { echo "$as_me:1121: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
+echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
   elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
     gnu_ld_flag=yes
   fi
-  cat >> confdefs.h <<EOF
+  cat >>confdefs.h <<EOF
 #define DEFAULT_LINKER "$DEFAULT_LINKER"
 EOF
 
 fi
 
 # With GNU as
+
 # Check whether --with-gnu-as or --without-gnu-as was given.
 if test "${with_gnu_as+set}" = set; then
   withval="$with_gnu_as"
   gas_flag="$with_gnu_as"
 else
   gas_flag=no
-fi
-
+fi;
 
 # Check whether --with-as or --without-as was given.
 if test "${with_as+set}" = set; then
   withval="$with_as"
   DEFAULT_ASSEMBLER="$with_as"
-fi
-
+fi;
 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
   if test ! -x "$DEFAULT_ASSEMBLER"; then
-    echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2
+    { echo "$as_me:1149: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
+echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
   elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
     gas_flag=yes
   fi
-  cat >> confdefs.h <<EOF
+  cat >>confdefs.h <<EOF
 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
 EOF
 
 fi
 
 # With stabs
+
 # Check whether --with-stabs or --without-stabs was given.
 if test "${with_stabs+set}" = set; then
   withval="$with_stabs"
   stabs="$with_stabs"
 else
   stabs=no
-fi
-
+fi;
 
 # With ELF
+
 # Check whether --with-elf or --without-elf was given.
 if test "${with_elf+set}" = set; then
   withval="$with_elf"
   elf="$with_elf"
 else
   elf=no
-fi
-
+fi;
 
 # Specify the local prefix
 local_prefix=
+
 # Check whether --with-local-prefix or --without-local-prefix was given.
 if test "${with_local_prefix+set}" = set; then
   withval="$with_local_prefix"
   case "${withval}" in
-yes)	{ echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;;
+yes)	{ { echo "$as_me:1187: error: bad value ${withval} given for local include directory prefix" >&5
+echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
+   { (exit 1); exit 1; }; } ;;
 no)	;;
 *)	local_prefix=$with_local_prefix ;;
 esac
-fi
-
+fi;
 
 # Default local prefix if it is empty
 if test x$local_prefix = x; then
@@ -740,16 +1202,18 @@
 # depending on where we built the sources.
 gcc_gxx_include_dir=
 # Specify the g++ header file directory
+
 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
 if test "${with_gxx_include_dir+set}" = set; then
   withval="$with_gxx_include_dir"
   case "${withval}" in
-yes)	{ echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
+yes)	{ { echo "$as_me:1210: error: bad value ${withval} given for g++ include directory" >&5
+echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
+   { (exit 1); exit 1; }; } ;;
 no)	;;
 *)	gcc_gxx_include_dir=$with_gxx_include_dir ;;
 esac
-fi
-
+fi;
 
 if test x${gcc_gxx_include_dir} = x; then
   if test x${enable_version_specific_runtime_libs} = xyes; then
@@ -765,35 +1229,36 @@
 if test "${enable_checking+set}" = set; then
   enableval="$enable_checking"
   case "${enableval}" in
-yes)	cat >> confdefs.h <<\EOF
+yes)	cat >>confdefs.h <<\EOF
 #define ENABLE_CHECKING 1
 EOF
  ;;
 no)	;;
-*)	{ echo "configure: error: bad value ${enableval} given for checking option" 1>&2; exit 1; } ;;
+*)	{ { echo "$as_me:1237: error: bad value ${enableval} given for checking option" >&5
+echo "$as_me: error: bad value ${enableval} given for checking option" >&2;}
+   { (exit 1); exit 1; }; } ;;
 esac
-fi
-
+fi;
 
 # Check whether --enable-cpp or --disable-cpp was given.
 if test "${enable_cpp+set}" = set; then
   enableval="$enable_cpp"
-  :
+
 else
   enable_cpp=yes
-fi
-
+fi;
 
 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
 if test "${with_cpp_install_dir+set}" = set; then
   withval="$with_cpp_install_dir"
   if test x$withval = xyes; then
-  { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; }
+  { { echo "$as_me:1255: error: option --with-cpp-install-dir requires an argument" >&5
+echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
+   { (exit 1); exit 1; }; }
 elif test x$withval != xno; then
   cpp_install_dir=$withval
 fi
-fi
-
+fi;
 
 # Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
 cpp_main=cccp
@@ -803,8 +1268,7 @@
   if test x$enable_cpplib != xno; then
   cpp_main=cppmain
 fi
-fi
-
+fi;
 
 # Link cpplib into the compiler proper, for C/C++/ObjC.
 # Check whether --enable-c-cpplib or --disable-c-cpplib was given.
@@ -816,8 +1280,7 @@
   extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
   cpp_main=cppmain
 fi
-fi
-
+fi;
 
 # Enable Multibyte Characters for C/C++
 # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
@@ -826,8 +1289,7 @@
   if test x$enable_c_mbchar != xno; then
   extra_c_flags=-DMULTIBYTE_CHARS=1
 fi
-fi
-
+fi;
 
 # Disable fast fixincludes
 # Check whether --enable-fast-fixincludes or --disable-fast-fixincludes was given.
@@ -836,16 +1298,14 @@
   if test x$enable_fast_fixincludes = xno ; then
   cp $srcdir/fixincludes ./fixinc.sh
 fi
-fi
-
+fi;
 
 # Enable Haifa scheduler.
 # Check whether --enable-haifa or --disable-haifa was given.
 if test "${enable_haifa+set}" = set; then
   enableval="$enable_haifa"
-  :
-fi
 
+fi;
 
 # Enable threads
 # Pass with no value to take the default
@@ -858,8 +1318,7 @@
 fi
 else
   enable_threads=''
-fi
-
+fi;
 
 enable_threads_flag=$enable_threads
 # Check if a valid thread package
@@ -892,18 +1351,16 @@
 fi
 else
   objc_boehm_gc=''
-fi
-
+fi;
 
 # Check whether --enable-java-gc or --disable-java-gc was given.
 if test "${enable_java_gc+set}" = set; then
   enableval="$enable_java_gc"
-  
+
   JAVAGC=$enableval
 else
   JAVAGC=boehm
-fi
-
+fi;
 
 # Check whether --with-dwarf2 or --without-dwarf2 was given.
 if test "${with_dwarf2+set}" = set; then
@@ -911,8 +1368,7 @@
   dwarf2="$with_dwarf2"
 else
   dwarf2=no
-fi
-
+fi;
 
 # Determine the host, build, and target systems
 ac_aux_dir=
@@ -925,314 +1381,778 @@
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install.sh -c"
     break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { echo "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.
+  { { echo "$as_me:1391: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $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.
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:1401: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:1405: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:1414: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:1418: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1423: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+echo "$as_me:1430: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:1439: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1444: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+echo "$as_me:1451: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:1460: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1465: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
 # 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
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
 
+# Find the native compiler
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:1488: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}gcc"
+echo "$as_me:1503: found $ac_dir/$ac_word" >&5
+break
+done
 
-# 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
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1511: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1514: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:966: checking host system type" >&5
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:1523: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="gcc"
+echo "$as_me:1538: found $ac_dir/$ac_word" >&5
+break
+done
 
-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
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:1546: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:1549: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-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:987: 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
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
 
-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:1005: 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
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:1562: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}cc"
+echo "$as_me:1577: found $ac_dir/$ac_word" >&5
+break
+done
 
-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
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1585: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1588: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:1597: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="cc"
+echo "$as_me:1612: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:1620: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:1623: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
 
-# Find the native compiler
-# 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:1032: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+  # Extract the first word of "bcc", so it can be a program name with args.
+set dummy bcc; ac_word=$2
+echo "$as_me:1636: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  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_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="bcc"
+echo "$as_me:1651: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
 fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  echo "$as_me:1659: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:1662: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
+fi
+if test -z "$CC"; then
+  machine=`(uname -m 2>/dev/null)` || machine=unknown
+  case "$machine" in
+    BePC) # Extract the first word of "mwccx86", so it can be a program name with args.
+set dummy mwccx86; ac_word=$2
+echo "$as_me:1672: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="mwccx86"
+echo "$as_me:1687: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1695: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1698: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ ;;
+    BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args.
+set dummy mwcc; ac_word=$2
+echo "$as_me:1704: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="mwcc"
+echo "$as_me:1719: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:1727: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:1730: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ ;;
+    *) ;;
+  esac
+fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1062: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:1740: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+  ac_prog_rejected=yes
+  continue
+fi
+ac_cv_prog_CC="cc"
+echo "$as_me:1760: found $ac_dir/$ac_word" >&5
+break
+done
+
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
   set dummy $ac_cv_prog_CC
   shift
-  if test $# -gt 0; then
+  if test $# != 0; then
     # We chose a different compiler from the bogus one.
     # However, it has the same basename, so the bogon will be chosen
     # first if we set CC to just the basename; use the full file name.
     shift
-    set dummy "$ac_dir/$ac_word" "$@"
+    set dummy "$ac_dir/$ac_word" ${1+"$@"}
     shift
     ac_cv_prog_CC="$@"
   fi
 fi
 fi
 fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  echo "$as_me:1782: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:1785: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:1113: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:1796: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  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_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+echo "$as_me:1811: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
 fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  echo "$as_me:1819: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:1822: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:1835: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="$ac_prog"
+echo "$as_me:1850: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:1858: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:1861: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1145: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+  test -n "$ac_ct_CC" && break
+done
 
-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
+  CC=$ac_ct_CC
+fi
+
+fi
 
-cat > conftest.$ac_ext << EOF
+test -z "$CC" && { { echo "$as_me:1873: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:1878:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:1881: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:1884: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:1886: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:1889: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:1891: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:1894: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
-#line 1156 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 1898 "configure"
 #include "confdefs.h"
 
-main(){return(0);}
-EOF
-if { (eval echo configure:1161: \"$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
-    ac_cv_prog_cc_cross=no
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:1914: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:1917: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:1920: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    a.out ) # We found the default executable, but exeext='' is most
+            # certainly right.
+            break;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1943: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:1949: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1954: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:1960: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:1963: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
   else
-    ac_cv_prog_cc_cross=yes
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:1970: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
   fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
 fi
-rm -fr conftest*
-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
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { 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:1187: 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 "$as_me:1978: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1192: 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
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1985: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:1987: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:1990: checking for executable suffix" >&5
+echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+if { (eval echo "$as_me:1992: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:1995: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
 else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
+  { { echo "$as_me:2011: error: cannot compute EXEEXT: cannot compile and link" >&5
+echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:2017: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:2023: checking for object suffix" >&5
+echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_prog_gcc=no
-fi
-fi
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2029 "configure"
+#include "confdefs.h"
 
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+int
+main ()
+{
 
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2044: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
 else
-  GCC=
-fi
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:2056: error: cannot compute OBJEXT: cannot compile" >&5
+echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:2063: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:2067: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2073 "configure"
+#include "confdefs.h"
 
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1220: 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
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2088: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2091: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2094: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2097: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:2109: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:2115: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2121 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2133: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2136: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2139: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2142: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
-  ac_cv_prog_cc_g=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
 fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+echo "$as_me:2152: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
+  CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
     CFLAGS="-g -O2"
@@ -1247,186 +2167,471 @@
   fi
 fi
 
+case "$CC" in
+  bcc )
+    AR=${AR-mwld}
+    LD=${LD-mwld}
+    RANLIB=${RANLIB-true};;
+  mwcc )
+    CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -opt global -nodup"
+    AR=${AR-mwld}
+    LD=${LD-mwld}
+    RANLIB=${RANLIB-true};;
+  mwccx86 )
+    CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib"
+    AR=${AR-mwldx86}
+    LD=${LD-mwldx86}
+    RANLIB=${RANLIB-true};;
+  ${host_alias}-gcc)
+    ;;
+  *)
+    AR=${AR-ar}
+    LD=${LD-ld}
+    RANLIB=${RANLIB-ranlib};;
+esac
 
-# If the native compiler is GCC, we can enable warnings even in stage1.  
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2203: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2206: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2209: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2212: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2224 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2237: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2240: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2243: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2246: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2256 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2268: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2271: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2274: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2277: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# If the native compiler is GCC, we can enable warnings even in stage1.
 # That's useful for people building cross-compilers, or just running a
 # quick `make'.
-if test "x$GCC" = "xyes"; then 
+if test "x$GCC" = "xyes"; then
   stage1_warn_cflags='$(WARN_CFLAGS)'
 else
   stage1_warn_cflags=""
 fi
 
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1263: 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
+echo "$as_me:2313: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftestmake <<\EOF
+  cat >conftest.make <<\EOF
 all:
 	@echo 'ac_maketemp="${MAKE}"'
 EOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
 if test -n "$ac_maketemp"; then
   eval ac_cv_prog_make_${ac_make}_set=yes
 else
   eval ac_cv_prog_make_${ac_make}_set=no
 fi
-rm -f conftestmake
+rm -f conftest.make
 fi
 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+  echo "$as_me:2333: result: yes" >&5
+echo "${ECHO_T}yes" >&6
   SET_MAKE=
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:2337: result: no" >&5
+echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
-
-echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
-echo "configure:1291: checking whether a default assembler was specified" >&5
+echo "$as_me:2342: checking whether a default assembler was specified" >&5
+echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
     if test x"$gas_flag" = x"no"; then
-    	echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
+    	echo "$as_me:2346: result: yes ($DEFAULT_ASSEMBLER)" >&5
+echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
     else
-	echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6
+	echo "$as_me:2349: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
+echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
     fi
 else
-    echo "$ac_t""no" 1>&6
+    echo "$as_me:2353: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
-echo "configure:1303: checking whether a default linker was specified" >&5
+echo "$as_me:2357: checking whether a default linker was specified" >&5
+echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
 if test x"${DEFAULT_LINKER+set}" = x"set"; then
     if test x"$gnu_ld_flag" = x"no"; then
-	echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
+	echo "$as_me:2361: result: yes ($DEFAULT_LINKER)" >&5
+echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
     else
-	echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6
+	echo "$as_me:2364: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
+echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
     fi
 else
-    echo "$ac_t""no" 1>&6
+    echo "$as_me:2368: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 # Find some useful tools
-for ac_prog in gawk mawk nawk awk
+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.
+  # 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:1320: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:2377: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
-  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_AWK="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:2392: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
 fi
-AWK="$ac_cv_prog_AWK"
+AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$ac_t""$AWK" 1>&6
+  echo "$as_me:2400: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:2403: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-test -n "$AWK" && break
+  test -n "$AWK" && break
 done
 
-# Extract the first word of "flex", so it can be a program name with args.
-set dummy flex; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1352: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+for ac_prog in flex lex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:2414: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$LEX"; then
   ac_cv_prog_LEX="$LEX" # 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_LEX="flex"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_LEX="$ac_prog"
+echo "$as_me:2429: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
 fi
-LEX="$ac_cv_prog_LEX"
+LEX=$ac_cv_prog_LEX
 if test -n "$LEX"; then
-  echo "$ac_t""$LEX" 1>&6
+  echo "$as_me:2437: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:2440: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
 if test -z "$LEXLIB"
 then
-  case "$LEX" in
-  flex*) ac_lib=fl ;;
-  *) ac_lib=l ;;
-  esac
-  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:1386: checking for yywrap in -l$ac_lib" >&5
-ac_lib_var=`echo $ac_lib'_'yywrap | 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="-l$ac_lib  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1394 "configure"
+  echo "$as_me:2450: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 2458 "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char yywrap();
+   builtin and then its argument prototype would still apply.  */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2477: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:2480: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:2483: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2486: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fl_yywrap=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:2497: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+  LEXLIB="-lfl"
+else
+  echo "$as_me:2502: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 2510 "configure"
+#include "confdefs.h"
 
-int main() {
-yywrap()
-; return 0; }
-EOF
-if { (eval echo configure:1405: \"$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"
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2529: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:2532: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:2535: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2538: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_l_yywrap=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:2549: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+  LEXLIB="-ll"
 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
-  LEXLIB="-l$ac_lib"
-else
-  echo "$ac_t""no" 1>&6
+
 fi
 
+if test "x$LEX" != "x:"; then
+  echo "$as_me:2560: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # The minimal lex program is just a single line: %%.  But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+echo '%%
+%%' | $LEX
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
+else
+  { { echo "$as_me:2574: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+fi
+echo "$as_me:2579: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo "$as_me:2583: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2599: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:2602: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:2605: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2608: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_lex_yytext_pointer=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+echo "$as_me:2620: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\EOF
+#define YYTEXT_POINTER 1
+EOF
+
 fi
 
-echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:1428: checking whether ln works" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+echo "$as_me:2631: checking whether ln works" >&5
+echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
+if test "${gcc_cv_prog_LN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   rm -f conftestdata_t
 echo >conftestdata_f
@@ -1446,19 +2651,22 @@
 fi
 LN="$gcc_cv_prog_LN"
 if test "$gcc_cv_prog_LN" = "ln"; then
-  echo "$ac_t""yes" 1>&6
+  echo "$as_me:2654: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 else
   if test "$gcc_cv_prog_LN" = "ln -s"; then
-    echo "$ac_t""no, using ln -s" 1>&6
+    echo "$as_me:2658: result: no, using ln -s" >&5
+echo "${ECHO_T}no, using ln -s" >&6
   else
-    echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6
+    echo "$as_me:2661: result: no, and neither does ln -s, so using cp" >&5
+echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6
   fi
 fi
 
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1460: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:2666: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+if test "${gcc_cv_prog_LN_S+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   rm -f conftestdata_t
 echo >conftestdata_f
@@ -1478,110 +2686,173 @@
 fi
 LN_S="$gcc_cv_prog_LN_S"
 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
-  echo "$ac_t""yes" 1>&6
+  echo "$as_me:2689: result: yes" >&5
+echo "${ECHO_T}yes" >&6
 else
   if test "$gcc_cv_prog_LN_S" = "ln"; then
-    echo "$ac_t""no, using ln" 1>&6
+    echo "$as_me:2693: result: no, using ln" >&5
+echo "${ECHO_T}no, using ln" >&6
   else
-    echo "$ac_t""no, and neither does ln, so using cp" 1>&6
+    echo "$as_me:2696: result: no, and neither does ln, so using cp" >&5
+echo "${ECHO_T}no, and neither does ln, so using cp" >&6
   fi
 fi
 
-echo $ac_n "checking for volatile""... $ac_c" 1>&6
-echo "configure:1492: checking for volatile" >&5
-if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:2701: checking for volatile" >&5
+echo $ECHO_N "checking for volatile... $ECHO_C" >&6
+if test "${gcc_cv_c_volatile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1497 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2707 "configure"
 #include "confdefs.h"
 
-int main() {
+int
+main ()
+{
 volatile int foo;
-; return 0; }
-EOF
-if { (eval echo configure:1504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:2722: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:2725: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:2728: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gcc_cv_c_volatile=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gcc_cv_c_volatile=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gcc_cv_c_volatile=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$gcc_cv_c_volatile" 1>&6
+echo "$as_me:2738: result: $gcc_cv_c_volatile" >&5
+echo "${ECHO_T}$gcc_cv_c_volatile" >&6
 if test $gcc_cv_c_volatile = yes ; then
-  cat >> confdefs.h <<\EOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_VOLATILE 1
 EOF
 
 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:1527: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:2750: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-  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=":"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+echo "$as_me:2765: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
 fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
+  echo "$as_me:2773: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:2776: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:2785: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_RANLIB="ranlib"
+echo "$as_me:2800: found $ac_dir/$ac_word" >&5
+break
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:2809: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:2812: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
 else
-  echo "$ac_t""no" 1>&6
+  RANLIB="$ac_cv_prog_RANLIB"
 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.
+  # 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:1559: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:2825: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_YACC="$ac_prog"
+echo "$as_me:2840: found $ac_dir/$ac_word" >&5
+break
+done
+
 fi
 fi
-YACC="$ac_cv_prog_YACC"
+YACC=$ac_cv_prog_YACC
 if test -n "$YACC"; then
-  echo "$ac_t""$YACC" 1>&6
+  echo "$as_me:2848: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:2851: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-test -n "$YACC" && break
+  test -n "$YACC" && break
 done
 test -n "$YACC" || YACC="yacc"
 
@@ -1595,11 +2866,11 @@
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # 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:1600: checking for a BSD compatible install" >&5
+echo "$as_me:2869: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
     IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
@@ -1637,7 +2908,8 @@
     INSTALL="$ac_install_sh"
   fi
 fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:2911: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -1645,127 +2917,257 @@
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1651: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:2925: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
   # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1666 "configure"
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2946 "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:1672: \"$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
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:2951: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:2957: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1683 "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:1689: \"$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
-  :
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 2980 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2984: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:2990: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1700 "configure"
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:3027: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3037 "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:1706: \"$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
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:3042: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3048: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   :
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
+  # Broken: fails on valid input.
+continue
 fi
-rm -f conftest*
-fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3071 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:3075: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3081: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
 fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-  CPP="$ac_cv_prog_CPP"
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
 else
-  ac_cv_prog_CPP="$CPP"
+  { { echo "$as_me:3109: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-echo "$ac_t""$CPP" 1>&6
 
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1731: 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
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:3120: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1736 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3126 "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:1744: \"$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*
+
+_ACEOF
+if { (eval echo "$as_me:3134: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3140: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
   ac_cv_header_stdc=yes
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3162 "configure"
 #include "confdefs.h"
 #include <string.h>
-EOF
+
+_ACEOF
 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*
@@ -1774,16 +3176,16 @@
 
 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 1779 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3180 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
-EOF
+
+_ACEOF
 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*
@@ -1792,329 +3194,436 @@
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then
   :
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1800 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3201 "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); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
-EOF
-if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#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);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3227: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3230: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:3232: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3235: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   :
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_stdc=no
 fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-
 fi
 fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:3248: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
 if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
 #define STDC_HEADERS 1
 EOF
 
 fi
 
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1835: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3258: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1840 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3264 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
 #include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3280: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3283: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3286: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3289: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_header_time=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_time=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_time=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
+echo "$as_me:3299: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
 if test $ac_cv_header_time = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
 #define TIME_WITH_SYS_TIME 1
 EOF
 
 fi
 
-echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
-echo "configure:1870: checking whether string.h and strings.h may both be included" >&5
-if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3309: checking whether string.h and strings.h may both be included" >&5
+echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
+if test "${gcc_cv_header_string+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1875 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3315 "configure"
 #include "confdefs.h"
 #include <string.h>
 #include <strings.h>
-int main() {
+int
+main ()
+{
 
-; return 0; }
-EOF
-if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3331: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3334: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3337: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gcc_cv_header_string=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gcc_cv_header_string=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gcc_cv_header_string=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$gcc_cv_header_string" 1>&6
+echo "$as_me:3347: result: $gcc_cv_header_string" >&5
+echo "${ECHO_T}$gcc_cv_header_string" >&6
 if test $gcc_cv_header_string = yes; then
-  cat >> confdefs.h <<\EOF
+  cat >>confdefs.h <<\EOF
 #define STRING_WITH_STRINGS 1
 EOF
 
 fi
 
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1904: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3356: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1909 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3362 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
 #ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
 #endif
 #ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
 #endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3384: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3387: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3390: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3393: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_header_sys_wait_h=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_sys_wait_h=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_sys_wait_h=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+echo "$as_me:3403: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
 if test $ac_cv_header_sys_wait_h = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
 #define HAVE_SYS_WAIT_H 1
 EOF
 
 fi
 
-for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h direct.h
+for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h direct.h
 do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1949: 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 1954 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1959: \"$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"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3416: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3422 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3426: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3432: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  eval "$as_ac_Header=no"
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 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
+echo "$as_me:3451: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 EOF
- 
-else
-  echo "$ac_t""no" 1>&6
+
 fi
 done
 
-
 # Check for thread headers.
-ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for thread.h""... $ac_c" 1>&6
-echo "configure:1989: checking for thread.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3462: checking for thread.h" >&5
+echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
+if test "${ac_cv_header_thread_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1994 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3468 "configure"
 #include "confdefs.h"
 #include <thread.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1999: \"$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"
+_ACEOF
+if { (eval echo "$as_me:3472: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3478: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_thread_h=yes
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  ac_cv_header_thread_h=no
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+echo "$as_me:3497: result: $ac_cv_header_thread_h" >&5
+echo "${ECHO_T}$ac_cv_header_thread_h" >&6
+if test $ac_cv_header_thread_h = yes; then
   have_thread_h=yes
 else
-  echo "$ac_t""no" 1>&6
-have_thread_h=
+  have_thread_h=
 fi
 
-ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:2023: checking for pthread.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3505: checking for pthread.h" >&5
+echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
+if test "${ac_cv_header_pthread_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2028 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3511 "configure"
 #include "confdefs.h"
 #include <pthread.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2033: \"$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"
+_ACEOF
+if { (eval echo "$as_me:3515: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:3521: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_pthread_h=yes
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  ac_cv_header_pthread_h=no
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+echo "$as_me:3540: result: $ac_cv_header_pthread_h" >&5
+echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
+if test $ac_cv_header_pthread_h = yes; then
   have_pthread_h=yes
 else
-  echo "$ac_t""no" 1>&6
-have_pthread_h=
+  have_pthread_h=
 fi
 
-
 # See if GNAT has been installed
 # Extract the first word of "gnatbind", so it can be a program name with args.
 set dummy gnatbind; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2060: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnat'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3551: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_gnat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$gnat"; then
   ac_cv_prog_gnat="$gnat" # 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_gnat="yes"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_gnat="yes"
+echo "$as_me:3566: found $ac_dir/$ac_word" >&5
+break
+done
+
   test -z "$ac_cv_prog_gnat" && ac_cv_prog_gnat="no"
 fi
 fi
-gnat="$ac_cv_prog_gnat"
+gnat=$ac_cv_prog_gnat
 if test -n "$gnat"; then
-  echo "$ac_t""$gnat" 1>&6
+  echo "$as_me:3575: result: $gnat" >&5
+echo "${ECHO_T}$gnat" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:3578: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-
 # See if the system preprocessor understands the ANSI C preprocessor
 # stringification operator.
-echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
-echo "configure:2091: checking whether cpp understands the stringify operator" >&5
-if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3584: checking whether cpp understands the stringify operator" >&5
+echo $ECHO_N "checking whether cpp understands the stringify operator... $ECHO_C" >&6
+if test "${gcc_cv_c_have_stringify+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2096 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3590 "configure"
 #include "confdefs.h"
 
-int main() {
+int
+main ()
+{
 #define S(x)   #x
 char *test = S(foo);
-; return 0; }
-EOF
-if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3603: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3606: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3609: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3612: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gcc_cv_c_have_stringify=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gcc_cv_c_have_stringify=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gcc_cv_c_have_stringify=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$ac_t""$gcc_cv_c_have_stringify" 1>&6
+echo "$as_me:3623: result: $gcc_cv_c_have_stringify" >&5
+echo "${ECHO_T}$gcc_cv_c_have_stringify" >&6
 if test $gcc_cv_c_have_stringify = yes; then
-  cat >> confdefs.h <<\EOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_CPP_STRINGIFY 1
 EOF
 
@@ -2122,35 +3631,49 @@
 
 # Use <inttypes.h> only if it exists,
 # doesn't clash with <sys/types.h>, and declares intmax_t.
-echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
-echo "configure:2127: checking for inttypes.h" >&5
-if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3634: checking for inttypes.h" >&5
+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
+if test "${gcc_cv_header_inttypes_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2132 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3640 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <inttypes.h>
-int main() {
+int
+main ()
+{
 intmax_t i = -1;
-; return 0; }
-EOF
-if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3653: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3656: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3659: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3662: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gcc_cv_header_inttypes_h=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gcc_cv_header_inttypes_h=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gcc_cv_header_inttypes_h=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6
+echo "$as_me:3673: result: $gcc_cv_header_inttypes_h" >&5
+echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
 if test $gcc_cv_header_inttypes_h = yes; then
-  cat >> confdefs.h <<\EOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_INTTYPES_H 1
 EOF
 
@@ -2161,167 +3684,210 @@
 	sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
 	fputs_unlocked
 do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2166: 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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:3688: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2171 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3694 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* 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() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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();
+f = $ac_func;
 #endif
 
-; return 0; }
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3725: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3728: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:3731: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3734: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:3744: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 EOF
-if { (eval echo configure:2194: \"$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
 
-
 # Make sure wchar_t is available
 #AC_CHECK_TYPE(wchar_t, unsigned int)
 
-echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2223: checking for vprintf" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:3760: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2228 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3766 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char vprintf(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char vprintf();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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_vprintf) || defined (__stub___vprintf)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-vprintf();
+f = $ac_func;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_vprintf=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_vprintf=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_VPRINTF 1
-EOF
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test "$ac_cv_func_vprintf" != yes; then
-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2275: checking for _doprnt" >&5
-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3797: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3800: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:3803: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3806: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:3816: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+echo "$as_me:3823: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+if test "${ac_cv_func__doprnt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2280 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3829 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _doprnt(); below.  */
+    which can conflict with char _doprnt (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char _doprnt();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char _doprnt ();
+char (*f) ();
 
+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__doprnt) || defined (__stub____doprnt)
 choke me
 #else
-_doprnt();
+f = _doprnt;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func__doprnt=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func__doprnt=no"
-fi
-rm -f conftest*
-fi
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3860: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3863: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:3866: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3869: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func__doprnt=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func__doprnt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:3879: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+if test $ac_cv_func__doprnt = yes; then
 
-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
 #define HAVE_DOPRNT 1
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
 fi
+done
 
 vfprintf=
 doprint=
@@ -2332,18 +3898,16 @@
   fi
 fi
 
-
-
-echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:2339: checking whether the printf functions support %p" >&5
-if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:3901: checking whether the printf functions support %p" >&5
+echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
+if test "${gcc_cv_func_printf_ptr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   gcc_cv_func_printf_ptr=no
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2347 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3910 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 
@@ -2355,186 +3919,360 @@
   sscanf(buf, "%p", &q);
   exit (p != q);
 }
-EOF
-if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3924: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3927: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:3929: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3932: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gcc_cv_func_printf_ptr=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  gcc_cv_func_printf_ptr=no
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gcc_cv_func_printf_ptr=no
 fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core core.* *.core
 fi
-
-echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6
+echo "$as_me:3945: result: $gcc_cv_func_printf_ptr" >&5
+echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
 if test $gcc_cv_func_printf_ptr = yes ; then
-  cat >> confdefs.h <<\EOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_PRINTF_PTR 1
 EOF
 
 fi
 
-
 case "${host}" in
 *-*-uwin*)
-  { echo "configure: error: 
+  { { echo "$as_me:3956: error:
+*** UWIN may not be used as a host platform because
+*** linking with posix.dll is not allowed by the GNU GPL" >&5
+echo "$as_me: error:
 *** UWIN may not be used as a host platform because
-*** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; }
+*** linking with posix.dll is not allowed by the GNU GPL" >&2;}
+   { (exit 1); exit 1; }; }
   ;;
 esac
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2392: 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
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3971: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 3977 "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3983: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:3986: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:3989: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:3992: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:4002: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+echo "$as_me:4012: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2397 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4018 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+  return 0;
+if (sizeof (pid_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4036: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4039: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4042: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_type_pid_t=yes
 else
-  rm -rf conftest*
-  ac_cv_type_pid_t=no
-fi
-rm -f conftest*
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_pid_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:4052: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+if test $ac_cv_type_pid_t = yes; then
+  :
+else
 
-fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
-  cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<EOF
 #define pid_t int
 EOF
 
 fi
 
-ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2426: 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 2431 "configure"
-#include "confdefs.h"
-#include <vfork.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2436: \"$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"
+for ac_header in unistd.h vfork.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:4067: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4073 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:4077: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:4083: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  eval "$as_ac_Header=no"
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_VFORK_H 1
+echo "$as_me:4102: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 EOF
 
-else
-  echo "$ac_t""no" 1>&6
 fi
+done
 
-echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2461: 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:2467: checking for vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+for ac_func in fork vfork
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:4115: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2472 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4121 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char vfork(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char vfork();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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_vfork) || defined (__stub___vfork)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-vfork();
+f = $ac_func;
 #endif
 
-; return 0; }
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4152: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4155: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:4158: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4161: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:4171: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 EOF
-if { (eval echo configure:2495: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_vfork=no"
-fi
-rm -f conftest*
+
 fi
+done
 
-if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
+ac_cv_func_fork_works=$ac_cv_func_fork
+if test "x$ac_cv_func_fork" = xyes; then
+  echo "$as_me:4183: checking for working fork" >&5
+echo $ECHO_N "checking for working fork... $ECHO_C" >&6
+if test "${ac_cv_func_fork_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$ac_t""no" 1>&6
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_fork_works=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* By Rdiger Kuhlmann. */
+      #include <sys/types.h>
+      #if HAVE_UNISTD_H
+      # include <unistd.h>
+      #endif
+      /* Some systems only have a dummy stub for fork() */
+      int main ()
+      {
+        if (fork() < 0)
+          exit (1);
+        exit (0);
+      }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4206: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4209: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:4211: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4214: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_fork_works=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_fork_works=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:4226: result: $ac_cv_func_fork_works" >&5
+echo "${ECHO_T}$ac_cv_func_fork_works" >&6
+
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+  case $host in
+    *-*-amigaos* | *-*-msdosdjgpp*)
+      # Override, as these systems have only a dummy fork() stub
+      ac_cv_func_fork_works=no
+      ;;
+    *)
+      ac_cv_func_fork_works=yes
+      ;;
+  esac
+  { echo "$as_me:4240: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
+echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
 fi
-
 ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+  echo "$as_me:4245: checking for working vfork" >&5
+echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
+if test "${ac_cv_func_vfork_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_vfork_works=cross
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4254 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
 #endif
-#ifdef HAVE_VFORK_H
-#include <vfork.h>
+#if HAVE_VFORK_H
+# include <vfork.h>
 #endif
 /* On some sparc systems, changes by the child to local and incoming
-   argument registers are propagated back to the parent.
-   The compiler is told about this with #include <vfork.h>,
-   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
-   Test for this by using a static variable whose address
-   is put into a register that is clobbered by the vfork.  */
+   argument registers are propagated back to the parent.  The compiler
+   is told about this with #include <vfork.h>, but some compilers
+   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
+   static variable whose address is put into a register that is
+   clobbered by the vfork.  */
 static
 #ifdef __cplusplus
 sparc_address_test (int arg)
-#else
+# else
 sparc_address_test (arg) int arg;
 #endif
 {
@@ -2552,25 +4290,33 @@
     }
   }
 }
-main() {
+
+int
+main ()
+{
   pid_t parent = getpid ();
   pid_t child;
 
   sparc_address_test ();
 
+#ifdef __amigaos__
+  /* FIXME: Force this test to succeed for AmigaOS, which has a fairly good
+     vfork() emulation, but doesn't support fork() at all.  -fnf */
+  exit (0);
+#endif
+
   child = vfork ();
 
   if (child == 0) {
-    /* Here is another test for sparc vfork register problems.
-       This test uses lots of local variables, at least
-       as many local variables as main has allocated so far
-       including compiler temporaries.  4 locals are enough for
-       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
-       A buggy compiler should reuse the register of parent
-       for one of the local variables, since it will think that
-       parent can't possibly be used any more in this routine.
-       Assigning to the local variable will thus munge parent
-       in the parent process.  */
+    /* Here is another test for sparc vfork register problems.  This
+       test uses lots of local variables, at least as many local
+       variables as main has allocated so far including compiler
+       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
+       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
+       reuse the register of parent for one of the local variables,
+       since it will think that parent can't possibly be used any more
+       in this routine.  Assigning to the local variable will thus
+       munge parent in the parent process.  */
     pid_t
       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
@@ -2580,11 +4326,10 @@
 	|| p != p5 || p != p6 || p != p7)
       _exit(1);
 
-    /* On some systems (e.g. IRIX 3.3),
-       vfork doesn't separate parent from child file descriptors.
-       If the child closes a descriptor before it execs or exits,
-       this munges the parent's descriptor as well.
-       Test for this by closing stdout in the child.  */
+    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+       from child file descriptors.  If the child closes a descriptor
+       before it execs or exits, this munges the parent's descriptor
+       as well.  Test for this by closing stdout in the child.  */
     _exit(close(fileno(stdout)) != 0);
   } else {
     int status;
@@ -2607,41 +4352,70 @@
 	 );
   }
 }
-EOF
-if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4357: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:4360: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:4362: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4365: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_vfork_works=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_vfork_works=no
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_vfork_works=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-rm -fr conftest*
 fi
+echo "$as_me:4377: result: $ac_cv_func_vfork_works" >&5
+echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
 
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+  ac_cv_func_vfork_works=ac_cv_func_vfork
+  { echo "$as_me:4383: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
+echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
 fi
 
-echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
-if test $ac_cv_func_vfork_works = no; then
-  cat >> confdefs.h <<\EOF
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_WORKING_VFORK 1
+EOF
+
+else
+
+cat >>confdefs.h <<\EOF
 #define vfork fork
 EOF
 
 fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_WORKING_FORK 1
+EOF
 
+fi
 
 for ac_func in malloc realloc calloc free bcopy bzero bcmp \
 	index rindex getenv atol sbrk abort atof strerror getcwd getwd \
 	strsignal putc_unlocked fputs_unlocked strstr
 do
-echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
-echo "configure:2640: checking whether $ac_func must be declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:4412: checking whether $ac_func must be declared" >&5
+echo $ECHO_N "checking whether $ac_func must be declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_decl_needed_$ac_func+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2645 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4418 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -2670,45 +4444,59 @@
 #define index strchr
 #endif
 
-int main() {
+int
+main ()
+{
 char *(*pfn) = (char *(*)) $ac_func
-; return 0; }
-EOF
-if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4456: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4459: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4462: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4465: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "gcc_cv_decl_needed_$ac_func=no"
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "gcc_cv_decl_needed_$ac_func=yes"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "gcc_cv_decl_needed_$ac_func=yes"
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+  echo "$as_me:4477: result: yes" >&5
+echo "${ECHO_T}yes" >&6
   gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
+  cat >>confdefs.h <<EOF
 #define $gcc_tr_decl 1
 EOF
 
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:4485: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 done
 
-
 for ac_func in getrlimit setrlimit
 do
-echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
-echo "configure:2707: checking whether $ac_func must be declared" >&5
-if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:4493: checking whether $ac_func must be declared" >&5
+echo $ECHO_N "checking whether $ac_func must be declared... $ECHO_C" >&6
+if eval "test \"\${gcc_cv_decl_needed_$ac_func+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4499 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -2741,83 +4529,111 @@
 #include <sys/resource.h>
 #endif
 
-int main() {
+int
+main ()
+{
 char *(*pfn) = (char *(*)) $ac_func
-; return 0; }
-EOF
-if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4541: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4544: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4547: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4550: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   eval "gcc_cv_decl_needed_$ac_func=no"
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "gcc_cv_decl_needed_$ac_func=yes"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "gcc_cv_decl_needed_$ac_func=yes"
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
 if eval "test \"`echo '$gcc_cv_decl_needed_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+  echo "$as_me:4562: result: yes" >&5
+echo "${ECHO_T}yes" >&6
   gcc_tr_decl=NEED_DECLARATION_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
+  cat >>confdefs.h <<EOF
 #define $gcc_tr_decl 1
 EOF
 
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:4570: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 done
 
-
-echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2776: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:4576: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
+if test "${ac_cv_decl_sys_siglist+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2781 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4582 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
 /* NetBSD declares sys_siglist in unistd.h.  */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
 #endif
-int main() {
+
+int
+main ()
+{
 char *msg = *(sys_siglist + 1);
-; return 0; }
-EOF
-if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4600: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4603: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4606: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4609: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_decl_sys_siglist=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_decl_sys_siglist=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_decl_sys_siglist=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
+echo "$as_me:4619: result: $ac_cv_decl_sys_siglist" >&5
+echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
 if test $ac_cv_decl_sys_siglist = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
 #define SYS_SIGLIST_DECLARED 1
 EOF
 
 fi
 
-
-# mkdir takes a single argument on some systems. 
-echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
-echo "configure:2816: checking if mkdir takes one argument" >&5
-if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+# mkdir takes a single argument on some systems.
+echo "$as_me:4630: checking if mkdir takes one argument" >&5
+echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
+if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2821 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4636 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2830,37 +4646,47 @@
 #ifdef HAVE_DIRECT_H
 # include <direct.h>
 #endif
-int main() {
+int
+main ()
+{
 mkdir ("foo", 0);
-; return 0; }
-EOF
-if { (eval echo configure:2838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:4661: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:4664: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4667: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gcc_cv_mkdir_takes_one_arg=no
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gcc_cv_mkdir_takes_one_arg=yes
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gcc_cv_mkdir_takes_one_arg=yes
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6
+echo "$as_me:4677: result: $gcc_cv_mkdir_takes_one_arg" >&5
+echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
-  cat >> confdefs.h <<\EOF
+  cat >>confdefs.h <<\EOF
 #define MKDIR_TAKES_ONE_ARG 1
 EOF
 
 fi
 
-
 # File extensions
 manext='.1'
 objext='.o'
 
-
-
 build_xm_file=
 build_xm_defines=
 build_install_headers_dir=install-headers-tar
@@ -2926,7 +4752,7 @@
 	c*-convex-*)
 		cpu_type=convex
 		;;
-	i[34567]86-*-*)
+	i[34567]86*-*-*)
 		cpu_type=i386
 		;;
 	hppa*-*-*)
@@ -2951,7 +4777,7 @@
 
 	tm_file=${cpu_type}/${cpu_type}.h
 	xm_file=${cpu_type}/xm-${cpu_type}.h
-	
+
 	# Common parts for linux-gnu and openbsd systems
 	case $machine in
 	*-*-linux-gnu*)
@@ -2960,7 +4786,7 @@
 	*-*-openbsd*)
 		tm_file=${cpu_type}/openbsd.h
 		tmake_file="t-libc-ok t-openbsd"
-		# avoid surprises, always provide an xm-openbsd file 
+		# avoid surprises, always provide an xm-openbsd file
 		xm_file=${cpu_type}/xm-openbsd.h
 		# don't depend on processor x-fragments as well
 		xmake_file=none
@@ -3073,7 +4899,7 @@
 		target_cpu_default="MASK_GAS"
 		tmake_file="alpha/t-ieee"
 		;;
-		
+
 	alpha*-dec-osf*)
 		if test x$stabs = xyes
 		then
@@ -3108,7 +4934,7 @@
  	alpha*-*-vxworks*)
 		tm_file="${tm_file} dbx.h alpha/vxworks.h"
 		tmake_file="alpha/t-ieee"
-		if  x$gas != xyes 
+		if  x$gas != xyes
 		then
 			extra_passes="mips-tfile mips-tdump"
 		fi
@@ -3226,7 +5052,7 @@
         arm*-*-ecos-elf)
 		tm_file=arm/ecos-elf.h
 		tmake_file=arm/t-elf
-		;; 
+		;;
 	arm*-*-elf)
 		tm_file=arm/unknown-elf.h
 		tmake_file=arm/t-arm-elf
@@ -3252,7 +5078,7 @@
 		use_collect2=yes
 		;;
 	c38-convex-*)
-		target_cpu_default=16		
+		target_cpu_default=16
 		use_collect2=yes
 		;;
  	c4x-*)
@@ -3621,8 +5447,8 @@
 		;;
 	i[34567]86-*-linux-gnulibc1)	# Intel 80386's running GNU/Linux
 					# GNU/Linux C library 5
-		xmake_file=x-linux	
-		tm_file=i386/linux.h	
+		xmake_file=x-linux
+		tm_file=i386/linux.h
 		tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
 		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
 		gnu_ld=yes
@@ -3631,6 +5457,23 @@
  			thread_file='single'
  		fi
 		;;
+	i[34567]86be-*-amithlon*)	# Intel 80386's running AMIthlon/AmigaOS
+		out_file=i386/i386.c
+		md_file=i386/i386be.md
+		xm_file=i386/xm-amithlon.h
+		tm_file=i386/amithlon.h
+		tmake_file="i386/t-amithlon i386/t-crtstuff"
+#		xmake_file=i386/x-amithlon
+#		extra_objs=amigaos.o
+		gnu_ld=yes
+#		tmake_file="t-linux i386/t-crtstuff"
+		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+		gnu_ld=yes
+		float_format=i386
+# 		if test x$enable_threads = xyes; then
+# 			thread_file='posix'
+# 		fi
+		;;
 	i[34567]86-*-linux-gnu*)	# Intel 80386's running GNU/Linux
 					# aka GNU/Linux C library 6
 		xmake_file=x-linux
@@ -4347,6 +6190,14 @@
 		extra_headers=math-68881.h
 		float_format=m68k
 		;;
+	m68k-*-amigaos*)
+		xm_file=m68k/xm-amigaos.h
+		tm_file=m68k/amigaos.h
+		tmake_file=m68k/t-amigaos
+		xmake_file=m68k/x-amigaos
+		extra_objs=amigaos.o
+		gnu_ld=yes
+		;;
 	m68k-*-coff*)
 		tmake_file=m68k/t-m68kbare
 		tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
@@ -5079,6 +6930,16 @@
 		tmake_file=rs6000/t-beos
 		xmake_file=rs6000/x-beos
 		;;
+	powerpc-*-morphos*)
+		cpu_type=rs6000
+		xm_file=rs6000/xm-morphos.h
+		tm_file=rs6000/morphos.h
+		tmake_file=rs6000/t-morphos
+		xmake_file=rs6000/x-morphos
+		extra_objs=morphos.o
+		broken_install=cp
+		install_headers_dir=install-headers-cp
+		;;
 	powerpc-*-sysv* | powerpc-*-elf*)
 		tm_file=rs6000/sysv4.h
 		xm_file="xm-siglist.h rs6000/xm-sysv4.h"
@@ -5642,10 +7503,10 @@
 	# Process --with-cpu= for PowerPC/rs6000
 	target_cpu_default2=
 	case $machine in
-	i486-*-*)
+	i486*-*-*)
 		target_cpu_default2=1
 		;;
-	i586-*-*)
+	i586*-*-*)
 		case $target_alias in
 			k6-*)
 				target_cpu_default2=4
@@ -5655,7 +7516,7 @@
 				;;
 		esac
 		;;
-	i686-*-* | i786-*-*)
+	i686*-*-* | i786*-*-*)
 		target_cpu_default2=3
 		;;
 	alpha*-*-*)
@@ -5673,7 +7534,7 @@
 				target_cpu_default2="MASK_CPU_EV5"
 				;;
 		esac
-				
+
 		if test x$gas = xyes
 		then
 			if test "$target_cpu_default2" = ""
@@ -5941,7 +7802,7 @@
 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
 
 # If host=build, it is correct to have hconfig include auto-host.h
-# as well.  If host!=build, we are in error and need to do more 
+# as well.  If host!=build, we are in error and need to do more
 # work to find out the build config parameters.
 if test x$host = x$build
 then
@@ -5950,7 +7811,7 @@
 	# We create a subdir, then run autoconf in the subdir.
 	# To prevent recursion we set host and build for the new
 	# invocation of configure to the build for this invocation
-	# of configure. 
+	# of configure.
 	tempdir=build.$$
 	rm -rf $tempdir
 	mkdir $tempdir
@@ -6037,248 +7898,413 @@
 # Internationalization
 PACKAGE=gcc
 VERSION="$gcc_version"
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
 #define PACKAGE "$PACKAGE"
 EOF
 
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
 #define VERSION "$VERSION"
 EOF
 
-
-
-
 ALL_LINGUAS="en_UK"
 
 # NLS support is still experimental, so disable it by default for now.
 # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
-  :
+
 else
   enable_nls=no
-fi
+fi;
 
-
-
-        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
-echo "configure:6066: checking for strerror in -lcposix" >&5
-ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+        echo "$as_me:7920: checking for strerror in -lcposix" >&5
+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcposix  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6074 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7928 "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strerror();
+   builtin and then its argument prototype would still apply.  */
+char strerror ();
+int
+main ()
+{
+strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7947: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:7950: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:7953: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:7956: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_cposix_strerror=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_cposix_strerror=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7967: result: $ac_cv_lib_cposix_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
+if test $ac_cv_lib_cposix_strerror = yes; then
+  LIBS="$LIBS -lcposix"
+fi
 
-int main() {
-strerror()
-; return 0; }
-EOF
-if { (eval echo configure:6085: \"$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"
+echo "$as_me:7973: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 7981 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8030: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8033: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8036: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8039: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
 
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -lcposix"
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:8056: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:8059: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+echo "$as_me:8064: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$ac_t""no" 1>&6
-fi
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8070 "configure"
+#include "confdefs.h"
 
-  
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6108: 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 6113 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
 
-; return 0; }
-EOF
-if { (eval echo configure:6162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8128: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8131: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8134: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8137: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_c_const=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_const=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+echo "$as_me:8147: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
 if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
+
+cat >>confdefs.h <<\EOF
+#define const
 EOF
 
 fi
 
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:6183: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:8157: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
-  cat > conftest.$ac_ext <<EOF
-#line 6190 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8165 "configure"
 #include "confdefs.h"
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
+#endif
 
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:6197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8174: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8177: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8180: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8183: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_c_inline=$ac_kw; break
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
 done
 
 fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+echo "$as_me:8194: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
   inline | yes) ;;
-  no) cat >> confdefs.h <<\EOF
-#define inline 
+  no)
+cat >>confdefs.h <<\EOF
+#define inline
 EOF
  ;;
-  *)  cat >> confdefs.h <<EOF
+  *)  cat >>confdefs.h <<EOF
 #define inline $ac_cv_c_inline
 EOF
  ;;
 esac
 
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:6223: 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
+echo "$as_me:8209: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6
+if test "${ac_cv_type_off_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6228 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8215 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((off_t *) 0)
+  return 0;
+if (sizeof (off_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8230: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8233: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8236: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8239: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_type_off_t=yes
 else
-  rm -rf conftest*
-  ac_cv_type_off_t=no
-fi
-rm -f conftest*
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_off_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8249: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6
+if test $ac_cv_type_off_t = yes; then
+  :
+else
 
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
-  cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<EOF
 #define off_t long
 EOF
 
 fi
 
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6256: 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
+echo "$as_me:8261: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6261 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8267 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+  return 0;
+if (sizeof (size_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8282: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:8285: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:8288: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8291: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_type_size_t=yes
 else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_size_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8301: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6
+if test $ac_cv_type_size_t = yes; then
+  :
+else
 
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<EOF
 #define size_t unsigned
 EOF
 
@@ -6286,49 +8312,76 @@
 
 # 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:6291: 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
+echo "$as_me:8315: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
+if test "${ac_cv_working_alloca_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6296 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8321 "configure"
 #include "confdefs.h"
 #include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:6303: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8333: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8336: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:8339: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8342: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_working_alloca_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_working_alloca_h=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8352: result: $ac_cv_working_alloca_h" >&5
+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
+if test $ac_cv_working_alloca_h = yes; then
 
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
 #define HAVE_ALLOCA_H 1
 EOF
 
 fi
 
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:6324: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+# Temporary ugly hack for BeOS.  Don't try to run the test for alloca
+# since it will succeed due to finding the version of alloca in the
+# runtime library.  We don't want to use that version, so let's pretend
+# we loaded it from the cache (default to 'no') and thus the package will configure
+# itself to use it's private copy of the C alloca replacement.  When the
+# horribly small default stack size problem is fixed (exists up through
+# at least DR8.2) then we can build gcc to start using it's builtin
+# alloca, we can allow mwcc to use it's builtin alloca, and this hack
+# can go away.
+if test "`uname`" = "BeOS"; then
+  test -z "$ac_cv_func_alloca_works" && ac_cv_func_alloca_works=no
+fi
+
+echo "$as_me:8375: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
+if test "${ac_cv_func_alloca_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6329 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8381 "configure"
 #include "confdefs.h"
 
-#ifdef __GNUC__
+#if 0	/* Never do this, it's unnecessary. -fnf */
 # define alloca __builtin_alloca
 #else
 # ifdef _MSC_VER
@@ -6349,48 +8402,62 @@
 # endif
 #endif
 
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
+int
+main ()
+{
+char *p = (char *) alloca (1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8414: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8417: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:8420: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8423: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_func_alloca_works=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_alloca_works=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
+echo "$as_me:8433: result: $ac_cv_func_alloca_works" >&5
+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
 
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
 if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
 #define HAVE_ALLOCA 1
 EOF
 
-fi
-
-if test $ac_cv_func_alloca_works = no; then
+else
   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
-  cat >> confdefs.h <<\EOF
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=alloca.$ac_objext
+
+cat >>confdefs.h <<\EOF
 #define C_ALLOCA 1
 EOF
 
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:6389: 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
+echo "$as_me:8454: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6394 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8460 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -6398,88 +8465,103 @@
 wenotbecray
 #endif
 
-EOF
+_ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
   ac_cv_os_cray=yes
 else
-  rm -rf conftest*
   ac_cv_os_cray=no
 fi
 rm -f conftest*
 
 fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+echo "$as_me:8478: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&6
 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:6419: 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
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8483: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6424 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8489 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* 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() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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();
+f = $ac_func;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:6447: \"$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
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8520: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8523: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:8526: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8529: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8539: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
 #define CRAY_STACKSEG_END $ac_func
 EOF
 
-  break
-else
-  echo "$ac_t""no" 1>&6
+    break
 fi
 
-done
+  done
 fi
 
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:6474: 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
+echo "$as_me:8553: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_c_stack_direction=0
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6482 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8562 "configure"
 #include "confdefs.h"
+int
 find_stack_direction ()
 {
   static char *addr = 0;
@@ -6492,139 +8574,172 @@
   else
     return (&dummy > addr) ? 1 : -1;
 }
+
+int
 main ()
 {
-  exit (find_stack_direction() < 0);
+  exit (find_stack_direction () < 0);
 }
-EOF
-if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:8585: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8588: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:8590: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8593: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   ac_cv_c_stack_direction=1
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_stack_direction=-1
 fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-
 fi
+echo "$as_me:8605: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
 
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
 #define STACK_DIRECTION $ac_cv_c_stack_direction
 EOF
 
 fi
 
-for ac_hdr in unistd.h
+for ac_header in stdlib.h unistd.h
 do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6526: 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 6531 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6536: \"$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"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8617: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8623 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8627: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8633: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  eval "$as_ac_Header=no"
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 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
+echo "$as_me:8652: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 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:6565: 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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8665: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6570 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8671 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* 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() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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();
+f = $ac_func;
 #endif
 
-; return 0; }
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8702: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8705: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:8708: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8711: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8721: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 EOF
-if { (eval echo configure:6593: \"$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:6618: 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
+echo "$as_me:8731: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_func_mmap_fixed_mapped=no
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6626 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8740 "configure"
 #include "confdefs.h"
-
+$ac_includes_default
 /* Thanks to Mike Haertel and Jim Avera for this test.
    Here is a matrix of mmap possibilities:
 	mmap private not fixed
@@ -6637,7 +8752,7 @@
    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
+   VM page cache was not coherent with the file system buffer cache
    like early versions of FreeBSD and possibly contemporary NetBSD.)
    For shared mappings, we should conversely verify that changes get
    propogated back to all the places they're supposed to be.
@@ -6646,25 +8761,25 @@
    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
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
+#endif
 
+/* This mess was copied from the GNU getpagesize.h.  */
+#if !HAVE_GETPAGESIZE
 /* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
+# if !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
+#  if HAVE_SYS_PARAM_H
 #   include <sys/param.h>
 #   ifdef EXEC_PAGESIZE
 #    define getpagesize() EXEC_PAGESIZE
@@ -6691,327 +8806,371 @@
 
 #endif /* no HAVE_GETPAGESIZE */
 
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
 int
-main()
+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);
+  char *data, *data2, *data3;
+  int i, pagesize;
+  int fd;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    exit (1);
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 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 ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    exit (1);
+  data2 = (char *) 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 = (char *) 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);
+  exit (0);
 }
-
-EOF
-if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:8867: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8870: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:8872: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8875: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; 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
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_mmap_fixed_mapped=no
 fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-
 fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+echo "$as_me:8887: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
 if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
 #define HAVE_MMAP 1
 EOF
 
 fi
+rm -f conftest.mmap
 
-                              
-   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
 unistd.h 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:6794: 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 6799 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6804: \"$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"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8902: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8908 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8912: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:8918: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  eval "$as_ac_Header=no"
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 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
+echo "$as_me:8937: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 EOF
- 
-else
-  echo "$ac_t""no" 1>&6
+
 fi
 done
 
-   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
 strdup __argz_count __argz_stringify __argz_next
 do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6834: 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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:8951: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6839 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 8957 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* 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() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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();
+f = $ac_func;
 #endif
 
-; return 0; }
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8988: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:8991: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:8994: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:8997: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9007: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 EOF
-if { (eval echo configure:6862: \"$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 "${ac_cv_func_stpcpy+set}" != "set"; then
-     for ac_func in stpcpy
+
+for ac_func in stpcpy
 do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6891: 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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9022: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6896 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 9028 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* 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() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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:6919: \"$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
+f = $ac_func;
+#endif
 
-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
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9059: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9062: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9065: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9068: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9078: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 EOF
- 
-else
-  echo "$ac_t""no" 1>&6
+
 fi
 done
 
    fi
    if test "${ac_cv_func_stpcpy}" = "yes"; then
-     cat >> confdefs.h <<\EOF
+     cat >>confdefs.h <<\EOF
 #define HAVE_STPCPY 1
 EOF
 
    fi
 
    if test $ac_cv_header_locale_h = yes; then
-    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:6953: 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
+    echo "$as_me:9097: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6958 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 9103 "configure"
 #include "confdefs.h"
 #include <locale.h>
-int main() {
+int
+main ()
+{
 return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9115: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9118: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9121: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9124: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   am_cv_val_LC_MESSAGES=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  am_cv_val_LC_MESSAGES=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+am_cv_val_LC_MESSAGES=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+echo "$as_me:9134: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
     if test $am_cv_val_LC_MESSAGES = yes; then
-      cat >> confdefs.h <<\EOF
+      cat >>confdefs.h <<\EOF
 #define HAVE_LC_MESSAGES 1
 EOF
 
     fi
   fi
-   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:6986: checking whether NLS is requested" >&5
+   echo "$as_me:9143: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
   USE_NLS=$enableval
 else
   USE_NLS=yes
-fi
-
-    echo "$ac_t""$USE_NLS" 1>&6
-    
+fi;
+    echo "$as_me:9152: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
 
     USE_INCLUDED_LIBINTL=no
 
         if test "$USE_NLS" = "yes"; then
-      cat >> confdefs.h <<\EOF
+      cat >>confdefs.h <<\EOF
 #define ENABLE_NLS 1
 EOF
 
-      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:7006: checking whether included gettext is requested" >&5
-      # Check whether --with-included-gettext or --without-included-gettext was given.
+      echo "$as_me:9162: checking whether included gettext is requested" >&5
+echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
+
+# Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
   nls_cv_force_use_gnu_gettext=$withval
 else
   nls_cv_force_use_gnu_gettext=no
-fi
-
-      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+fi;
+      echo "$as_me:9172: result: $nls_cv_force_use_gnu_gettext" >&5
+echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
 
       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
@@ -7019,164 +9178,214 @@
 	nls_cv_header_libgt=
 	CATOBJEXT=NONE
 
-	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:7025: 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
+	echo "$as_me:9181: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 7030 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 9187 "configure"
 #include "confdefs.h"
 #include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7035: \"$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"
+_ACEOF
+if { (eval echo "$as_me:9191: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:9197: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_libintl_h=yes
+else
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  ac_cv_header_libintl_h=no
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 fi
-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:7052: 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
+echo "$as_me:9216: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+if test $ac_cv_header_libintl_h = yes; then
+  echo "$as_me:9219: checking for gettext in libc" >&5
+echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_gettext_libc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 7057 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 9225 "configure"
 #include "confdefs.h"
 #include <libintl.h>
-int main() {
+int
+main ()
+{
 return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9237: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9240: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9243: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9246: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   gt_cv_func_gettext_libc=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libc=no
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+gt_cv_func_gettext_libc=no
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+echo "$as_me:9256: result: $gt_cv_func_gettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
-	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:7080: 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
+	     echo "$as_me:9260: checking for bindtextdomain in -lintl" >&5
+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7088 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 9268 "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:7099: \"$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
-  echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:7115: 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
-  echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:7120: checking for gettext in -lintl" >&5
-ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+   builtin and then its argument prototype would still apply.  */
+char bindtextdomain ();
+int
+main ()
+{
+bindtextdomain ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9287: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9290: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9293: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9296: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_bindtextdomain=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:9307: result: $ac_cv_lib_intl_bindtextdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
+if test $ac_cv_lib_intl_bindtextdomain = yes; then
+  echo "$as_me:9310: checking for gettext in libintl" >&5
+echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
+if test "${gt_cv_func_gettext_libintl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  echo "$as_me:9315: checking for gettext in -lintl" >&5
+echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_gettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7128 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 9323 "configure"
 #include "confdefs.h"
+
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gettext();
-
-int main() {
-gettext()
-; return 0; }
-EOF
-if { (eval echo configure:7139: \"$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
+   builtin and then its argument prototype would still apply.  */
+char gettext ();
+int
+main ()
+{
+gettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9342: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9345: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9348: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9351: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_gettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_intl_gettext=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:9362: result: $ac_cv_lib_intl_gettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_gettext" >&6
+if test $ac_cv_lib_intl_gettext = yes; then
   gt_cv_func_gettext_libintl=yes
 else
-  echo "$ac_t""no" 1>&6
-gt_cv_func_gettext_libintl=no
+  gt_cv_func_gettext_libintl=no
 fi
 
 fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
-  echo "$ac_t""no" 1>&6
+echo "$as_me:9371: result: $gt_cv_func_gettext_libintl" >&5
+echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
 fi
 
 	   fi
 
 	   if test "$gt_cv_func_gettext_libc" = "yes" \
 	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
-	      cat >> confdefs.h <<\EOF
+	      cat >>confdefs.h <<\EOF
 #define HAVE_GETTEXT 1
 EOF
 
 	      # 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:7178: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9385: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case "$MSGFMT" in
   /*)
@@ -7200,108 +9409,127 @@
 fi
 MSGFMT="$ac_cv_path_MSGFMT"
 if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
+  echo "$as_me:9412: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9415: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 	      if test "$MSGFMT" != "no"; then
-		for ac_func in dcgettext
+
+for ac_func in dcgettext
 do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7212: 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
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9423: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 7217 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 9429 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char $ac_func (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* 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() {
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
+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();
+f = $ac_func;
 #endif
 
-; return 0; }
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9460: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9463: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9466: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9469: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9479: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 EOF
-if { (eval echo configure:7240: \"$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
 
 		# 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:7267: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9491: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case "$GMSGFMT" in
-  /*)
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
   ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
   *)
-  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_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+   echo "$as_me:9508: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
   ;;
 esac
 fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
 if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
+  echo "$as_me:9520: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9523: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 		# 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:7303: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9529: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case "$XGETTEXT" in
   /*)
@@ -7325,225 +9553,267 @@
 fi
 XGETTEXT="$ac_cv_path_XGETTEXT"
 if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
+  echo "$as_me:9556: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9559: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-		cat > conftest.$ac_ext <<EOF
-#line 7335 "configure"
+		cat >conftest.$ac_ext <<_ACEOF
+#line 9564 "configure"
 #include "confdefs.h"
 
-int main() {
+int
+main ()
+{
 extern int _nl_msg_cat_cntr;
 			       return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9580: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9583: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9586: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CATOBJEXT=.mo
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+CATOBJEXT=.mo
 		   DATADIRNAME=lib
 fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 		INSTOBJEXT=.mo
 	      fi
 	    fi
-	
-else
-  echo "$ac_t""no" 1>&6
-fi
 
+fi
 
         if test "$CATOBJEXT" = "NONE"; then
-	  echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
-echo "configure:7366: checking whether catgets can be used" >&5
-	  # Check whether --with-catgets or --without-catgets was given.
+	  echo "$as_me:9604: checking whether catgets can be used" >&5
+echo $ECHO_N "checking whether catgets can be used... $ECHO_C" >&6
+
+# Check whether --with-catgets or --without-catgets was given.
 if test "${with_catgets+set}" = set; then
   withval="$with_catgets"
   nls_cv_use_catgets=$withval
 else
   nls_cv_use_catgets=no
-fi
-
-	  echo "$ac_t""$nls_cv_use_catgets" 1>&6
+fi;
+	  echo "$as_me:9614: result: $nls_cv_use_catgets" >&5
+echo "${ECHO_T}$nls_cv_use_catgets" >&6
 
 	  if test "$nls_cv_use_catgets" = "yes"; then
-	    	    echo $ac_n "checking for main in -li""... $ac_c" 1>&6
-echo "configure:7379: checking for main in -li" >&5
-ac_lib_var=`echo i'_'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
+
+echo "$as_me:9619: checking for main in -li" >&5
+echo $ECHO_N "checking for main in -li... $ECHO_C" >&6
+if test "${ac_cv_lib_i_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_save_LIBS="$LIBS"
+  ac_check_lib_save_LIBS=$LIBS
 LIBS="-li  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7387 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 9627 "configure"
 #include "confdefs.h"
 
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:7394: \"$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 i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9642: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9645: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9648: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_i_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_i_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:9659: result: $ac_cv_lib_i_main" >&5
+echo "${ECHO_T}$ac_cv_lib_i_main" >&6
+if test $ac_cv_lib_i_main = yes; then
+  cat >>confdefs.h <<EOF
+#define HAVE_LIBI 1
 EOF
 
   LIBS="-li $LIBS"
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
-	    echo $ac_n "checking for catgets""... $ac_c" 1>&6
-echo "configure:7422: checking for catgets" >&5
-if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+	    echo "$as_me:9670: checking for catgets" >&5
+echo $ECHO_N "checking for catgets... $ECHO_C" >&6
+if test "${ac_cv_func_catgets+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 7427 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 9676 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char catgets(); below.  */
+    which can conflict with char catgets (); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
 /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char catgets();
-
-int main() {
+   builtin and then its argument prototype would still apply.  */
+char catgets ();
+char (*f) ();
 
+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_catgets) || defined (__stub___catgets)
 choke me
 #else
-catgets();
+f = catgets;
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_catgets=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_catgets=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9707: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:9710: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:9713: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:9716: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_catgets=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_catgets=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9726: result: $ac_cv_func_catgets" >&5
+echo "${ECHO_T}$ac_cv_func_catgets" >&6
+if test $ac_cv_func_catgets = yes; then
+  cat >>confdefs.h <<\EOF
 #define HAVE_CATGETS 1
 EOF
 
 	       INTLOBJS="\$(CATOBJS)"
 	       # Extract the first word of "gencat", so it can be a program name with args.
 set dummy gencat; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7472: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9736: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GENCAT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case "$GENCAT" in
-  /*)
+  case $GENCAT in
+  [\\/]* | ?:[\\/]*)
   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
   ;;
-  ?:/*)			 
-  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
-  ;;
   *)
-  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_path_GENCAT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_GENCAT="$ac_dir/$ac_word"
+   echo "$as_me:9753: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
   ;;
 esac
 fi
-GENCAT="$ac_cv_path_GENCAT"
+GENCAT=$ac_cv_path_GENCAT
+
 if test -n "$GENCAT"; then
-  echo "$ac_t""$GENCAT" 1>&6
+  echo "$as_me:9765: result: $GENCAT" >&5
+echo "${ECHO_T}$GENCAT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9768: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 	       if test "$GENCAT" != "no"; then
 		 # 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:7508: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9774: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case "$GMSGFMT" in
-  /*)
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
   ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
   *)
-  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_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+   echo "$as_me:9791: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
   ;;
 esac
 fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
 if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
+  echo "$as_me:9803: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9806: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 		 if test "$GMSGFMT" = "no"; then
 		   # 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:7545: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9813: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case "$GMSGFMT" in
   /*)
@@ -7567,18 +9837,20 @@
 fi
 GMSGFMT="$ac_cv_path_GMSGFMT"
 if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
+  echo "$as_me:9840: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9843: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 		 fi
 		 # 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:7580: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9850: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case "$XGETTEXT" in
   /*)
@@ -7602,9 +9874,11 @@
 fi
 XGETTEXT="$ac_cv_path_XGETTEXT"
 if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
+  echo "$as_me:9877: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9880: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
 		 USE_INCLUDED_LIBINTL=yes
@@ -7617,8 +9891,6 @@
 		 nls_cv_header_intl=intl/libintl.h
 		 nls_cv_header_libgt=intl/libgettext.h
 	       fi
-else
-  echo "$ac_t""no" 1>&6
 fi
 
 	  fi
@@ -7633,10 +9905,10 @@
                 INTLOBJS="\$(GETTOBJS)"
         # 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:7638: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9908: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case "$MSGFMT" in
   /*)
@@ -7660,53 +9932,57 @@
 fi
 MSGFMT="$ac_cv_path_MSGFMT"
 if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
+  echo "$as_me:9935: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9938: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
         # 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:7672: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9944: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case "$GMSGFMT" in
-  /*)
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
   ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
   *)
-  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_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+   echo "$as_me:9961: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
   ;;
 esac
 fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
+GMSGFMT=$ac_cv_path_GMSGFMT
+
 if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
+  echo "$as_me:9973: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:9976: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
         # 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:7708: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:9982: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case "$XGETTEXT" in
   /*)
@@ -7730,12 +10006,13 @@
 fi
 XGETTEXT="$ac_cv_path_XGETTEXT"
 if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
+  echo "$as_me:10009: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
 else
-  echo "$ac_t""no" 1>&6
+  echo "$as_me:10012: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-        
 	USE_INCLUDED_LIBINTL=yes
         CATOBJEXT=.gmo
         INSTOBJEXT=.mo
@@ -7751,7 +10028,8 @@
 			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 	  : ;
 	else
-	  echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
+	  echo "$as_me:10031: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
 	  XGETTEXT=":"
 	fi
       fi
@@ -7763,9 +10041,16 @@
       nls_cv_header_intl=intl/libintl.h
       nls_cv_header_libgt=intl/libgettext.h
     fi
-    
-    
+    ac_sources="$nls_cv_header_libgt"
+ac_dests="$nls_cv_header_intl"
+while test -n "$ac_sources"; do
+  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+  set $ac_sources; ac_source=$1; shift; ac_sources=$*
+  ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
+done
+ac_config_links="$ac_config_links $ac_config_links_1"
 
+    ac_config_commands="$ac_config_commands default-1"
 
     # If this is used in GNU gettext we have to set USE_NLS to `yes'
     # because some of the sources are only built for this goal.
@@ -7779,25 +10064,12 @@
       POFILES="$POFILES $lang.po"
     done
 
-        
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-
    if test "x$CATOBJEXT" != "x"; then
      if test "x$ALL_LINGUAS" = "x"; then
        LINGUAS=
      else
-       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:7801: checking for catalogs to be installed" >&5
+       echo "$as_me:10071: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -7805,7 +10077,8 @@
          esac
        done
        LINGUAS=$NEW_LINGUAS
-       echo "$ac_t""$LINGUAS" 1>&6
+       echo "$as_me:10080: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
      fi
 
           if test -n "$LINGUAS"; then
@@ -7819,45 +10092,52 @@
      INCLUDE_LOCALE_H="\
 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
    fi
-   
 
             test -d intl || mkdir intl
    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:7829: 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
+     echo "$as_me:10098: checking for linux/version.h" >&5
+echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_version_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 7834 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 10104 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7839: \"$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"
+_ACEOF
+if { (eval echo "$as_me:10108: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:10114: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_linux_version_h=yes
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  ac_cv_header_linux_version_h=no
 fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
+echo "$as_me:10133: result: $ac_cv_header_linux_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
+if test $ac_cv_header_linux_version_h = yes; then
   msgformat=linux
 else
-  echo "$ac_t""no" 1>&6
-msgformat=xopen
+  msgformat=xopen
 fi
 
-
                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
    fi
       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
@@ -7870,8 +10150,6 @@
      GT_NO=
      GT_YES="#YES#"
    fi
-   
-   
 
             MKINSTALLDIRS=
    if test -n "$ac_aux_dir"; then
@@ -7880,10 +10158,8 @@
    if test -z "$MKINSTALLDIRS"; then
      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
    fi
-   
 
       l=
-   
 
          test -d po || mkdir po
    if test "x$srcdir" != "x."; then
@@ -7898,7 +10174,7 @@
    rm -f po/POTFILES
    sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 	< $srcdir/po/POTFILES.in > po/POTFILES
-  
+
 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
 
 # Get an absolute path to the GCC top-level source directory
@@ -8068,8 +10344,8 @@
 fi
 
 # Figure out what assembler alignment features are present.
-echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:8073: checking assembler alignment features" >&5
+echo "$as_me:10347: checking assembler alignment features" >&5
+echo $ECHO_N "checking assembler alignment features... $ECHO_C" >&6
 gcc_cv_as=
 gcc_cv_as_alignment_features=
 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
@@ -8096,7 +10372,7 @@
 		# bytes to skip when using .p2align.
 		if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
 			gcc_cv_as_alignment_features=".balign and .p2align"
-			cat >> confdefs.h <<\EOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
 EOF
 
@@ -8105,7 +10381,7 @@
 		# bytes to skip when using .p2align.
 		if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
 			gcc_cv_as_alignment_features=".p2align including maximum skip"
-			cat >> confdefs.h <<\EOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
 EOF
 
@@ -8169,7 +10445,7 @@
 	echo ".p2align  2" >> conftest.s
 	if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
 		gcc_cv_as_alignment_features=".balign and .p2align"
-		cat >> confdefs.h <<\EOF
+		cat >>confdefs.h <<\EOF
 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
 EOF
 
@@ -8180,17 +10456,18 @@
 	echo ".p2align 4,,7" > conftest.s
 	if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
 		gcc_cv_as_alignment_features=".p2align including maximum skip"
-		cat >> confdefs.h <<\EOF
+		cat >>confdefs.h <<\EOF
 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
 EOF
 
 	fi
 	rm -f conftest.s conftest.o
 fi
-echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
+echo "$as_me:10466: result: $gcc_cv_as_alignment_features" >&5
+echo "${ECHO_T}$gcc_cv_as_alignment_features" >&6
 
-echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:8194: checking assembler subsection support" >&5
+echo "$as_me:10469: checking assembler subsection support" >&5
+echo $ECHO_N "checking assembler subsection support... $ECHO_C" >&6
 gcc_cv_as_subsections=
 if test x$gcc_cv_as != x; then
 	# Check if we have .subsection
@@ -8217,7 +10494,7 @@
 					:
 				else
 					gcc_cv_as_subsections="working .subsection -1"
-					cat >> confdefs.h <<\EOF
+					cat >>confdefs.h <<\EOF
 #define HAVE_GAS_SUBSECTION_ORDERING 1
 EOF
 
@@ -8227,10 +10504,11 @@
 	fi
 	rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
 fi
-echo "$ac_t""$gcc_cv_as_subsections" 1>&6
+echo "$as_me:10507: result: $gcc_cv_as_subsections" >&5
+echo "${ECHO_T}$gcc_cv_as_subsections" >&6
 
-echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:8234: checking assembler instructions" >&5
+echo "$as_me:10510: checking assembler instructions" >&5
+echo $ECHO_N "checking assembler instructions... $ECHO_C" >&6
 gcc_cv_as_instructions=
 if test x$gcc_cv_as != x; then
 	set "filds fists" "filds mem; fists mem"
@@ -8239,7 +10517,7 @@
 		echo "$2" > conftest.s
 		if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
 			gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
-			cat >> confdefs.h <<EOF
+			cat >>confdefs.h <<EOF
 #define HAVE_GAS_`echo "$1" | tr 'a-z ' 'A-Z_'` 1
 EOF
 
@@ -8248,7 +10526,8 @@
 	done
 	rm -f conftest.s conftest.o
 fi
-echo "$ac_t""$gcc_cv_as_instructions" 1>&6
+echo "$as_me:10529: result: $gcc_cv_as_instructions" >&5
+echo "${ECHO_T}$gcc_cv_as_instructions" >&6
 
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
@@ -8312,7 +10591,6 @@
     gthread_flags=-DHAVE_GTHR_DEFAULT
 fi
 
-
 # Make empty files to contain the specs and options for each language.
 # Then add #include lines to for a compiler that has specs and/or options.
 
@@ -8448,9 +10726,6 @@
     target_subdir=${target}/
 fi
 
-
-
-	
 # If this is using newlib, then define inhibit_libc in
 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
 # libgcc.a, but that's OK because newib should have its own version of
@@ -8460,7 +10735,6 @@
 	inhibit_libc=-Dinhibit_libc
 fi
 
-
 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
 sched_prefix=
 sched_cflags=
@@ -8470,7 +10744,6 @@
     sched_cflags=-DHAIFA
 fi
 
-
 if test x$enable_haifa != x; then
     # Explicitly remove files that need to be recompiled for the Haifa scheduler.
     for x in genattrtab.o toplev.o *sched.o; do
@@ -8514,78 +10787,15 @@
 #
     dollar='$$'
     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
-fi
-
-
-
-# Nothing to do for FLOAT_H, float_format already handled.
-objdir=`pwd`
-
-
-# Process the language and host/target makefile fragments.
-${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
-
-# Substitute configuration variables
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+fi
 
+# Nothing to do for FLOAT_H, float_format already handled.
+objdir=`pwd`
 
+# Process the language and host/target makefile fragments.
+${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
 
+# Substitute configuration variables
 
 # Echo that links are built
 if test x$host = x$target
@@ -8623,559 +10833,1055 @@
 
 # Create the Makefile
 # and configure language subdirectories
-trap '' 1 2 15
-cat > confcache <<\EOF
+ac_config_files="$ac_config_files $all_outputs"
+ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-# 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.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
 #
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
 # So, 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
+{
+  (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 \
+        "s/'/'\\\\''/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
   if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
+    test "x$cache_file" != "x/dev/null" && 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.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}'
 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
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:10917: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
 # 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.
+# configure, is in config.log if it exists.
 
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\EOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.52,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
 do
-  case "\$ac_option" in
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    shift
+    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+    shift
+    ;;
+  -*);;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_need_defaults=false;;
+  esac
+
+  case $1 in
+  # Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
   -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 ;;
+    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:11095: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    shift
+    CONFIG_FILES="$CONFIG_FILES $1"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    ac_need_defaults=false;;
+
+  # This is an error.
+  -*) { { echo "$as_me:11114: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
   esac
+  shift
 done
 
-ac_given_srcdir=$srcdir
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status.  ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52, executed with
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
 
-trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+_ACEOF
 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
-s%@CC@%$CC%g
-s%@stage1_warn_cflags@%$stage1_warn_cflags%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@AWK@%$AWK%g
-s%@LEX@%$LEX%g
-s%@LEXLIB@%$LEXLIB%g
-s%@LN@%$LN%g
-s%@LN_S@%$LN_S%g
-s%@RANLIB@%$RANLIB%g
-s%@YACC@%$YACC%g
-s%@INSTALL@%$INSTALL%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CPP@%$CPP%g
-s%@gnat@%$gnat%g
-s%@vfprintf@%$vfprintf%g
-s%@doprint@%$doprint%g
-s%@manext@%$manext%g
-s%@objext@%$objext%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@GENCAT@%$GENCAT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@gthread_flags@%$gthread_flags%g
-s%@build_canonical@%$build_canonical%g
-s%@host_canonical@%$host_canonical%g
-s%@target_subdir@%$target_subdir%g
-s%@inhibit_libc@%$inhibit_libc%g
-s%@sched_prefix@%$sched_prefix%g
-s%@sched_cflags@%$sched_cflags%g
-s%@gcc_tooldir@%$gcc_tooldir%g
-s%@dollar@%$dollar%g
-s%@objdir@%$objdir%g
-s%@subdirs@%$subdirs%g
-s%@all_boot_languages@%$all_boot_languages%g
-s%@all_compilers@%$all_compilers%g
-s%@all_diff_excludes@%$all_diff_excludes%g
-s%@all_headers@%$all_headers%g
-s%@all_lang_makefiles@%$all_lang_makefiles%g
-s%@all_languages@%$all_languages%g
-s%@all_lib2funcs@%$all_lib2funcs%g
-s%@all_stagestuff@%$all_stagestuff%g
-s%@build_exeext@%$build_exeext%g
-s%@build_install_headers_dir@%$build_install_headers_dir%g
-s%@build_xm_file_list@%$build_xm_file_list%g
-s%@cc_set_by_configure@%$cc_set_by_configure%g
-s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g
-s%@cpp_install_dir@%$cpp_install_dir%g
-s%@cpp_main@%$cpp_main%g
-s%@dep_host_xmake_file@%$dep_host_xmake_file%g
-s%@dep_tmake_file@%$dep_tmake_file%g
-s%@extra_c_flags@%$extra_c_flags%g
-s%@extra_c_objs@%$extra_c_objs%g
-s%@extra_cpp_objs@%$extra_cpp_objs%g
-s%@extra_cxx_objs@%$extra_cxx_objs%g
-s%@extra_headers_list@%$extra_headers_list%g
-s%@extra_objs@%$extra_objs%g
-s%@extra_parts@%$extra_parts%g
-s%@extra_passes@%$extra_passes%g
-s%@extra_programs@%$extra_programs%g
-s%@fixinc_defs@%$fixinc_defs%g
-s%@float_h_file@%$float_h_file%g
-s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
-s%@gcc_version@%$gcc_version%g
-s%@gcc_version_trigger@%$gcc_version_trigger%g
-s%@host_exeext@%$host_exeext%g
-s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g
-s%@host_xm_file_list@%$host_xm_file_list%g
-s%@install@%$install%g
-s%@JAVAGC@%$JAVAGC%g
-s%@lang_options_files@%$lang_options_files%g
-s%@lang_specs_files@%$lang_specs_files%g
-s%@lang_tree_files@%$lang_tree_files%g
-s%@local_prefix@%$local_prefix%g
-s%@maybe_use_collect2@%$maybe_use_collect2%g
-s%@md_file@%$md_file%g
-s%@objc_boehm_gc@%$objc_boehm_gc%g
-s%@out_file@%$out_file%g
-s%@out_object_file@%$out_object_file%g
-s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
-s%@symbolic_link@%$symbolic_link%g
-s%@thread_file@%$thread_file%g
-s%@tm_file_list@%$tm_file_list%g
-s%@will_use_collect2@%$will_use_collect2%g
+cat >>$CONFIG_STATUS <<EOF
+#
+# INIT-COMMANDS section.
+#
+
+host='${host}'
+build='${build}'
+target='${target}'
+target_alias='${target_alias}'
+srcdir='${srcdir}'
+subdirs='${subdirs}'
+oldstyle_subdirs='${oldstyle_subdirs}'
+symbolic_link='${symbolic_link}'
+program_transform_set='${program_transform_set}'
+program_transform_name='${program_transform_name}'
+dep_host_xmake_file='${dep_host_xmake_file}'
+host_xmake_file='${host_xmake_file}'
+dep_tmake_file='${dep_tmake_file}'
+tmake_file='${tmake_file}'
+thread_file='${thread_file}'
+gcc_version='${gcc_version}'
+gcc_version_trigger='${gcc_version_trigger}'
+local_prefix='${local_prefix}'
+build_install_headers_dir='${build_install_headers_dir}'
+build_exeext='${build_exeext}'
+host_exeext='${host_exeext}'
+out_file='${out_file}'
+gdb_needs_out_file_path='${gdb_needs_out_file_path}'
+SET_MAKE='${SET_MAKE}'
+target_list='${target_list}'
+target_overrides='${target_overrides}'
+host_overrides='${host_overrides}'
+cross_defines='${cross_defines}'
+cross_overrides='${cross_overrides}'
+build_overrides='${build_overrides}'
+cpp_install_dir='${cpp_install_dir}'
+
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
+  "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+  "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
+  *) { { echo "$as_me:11193: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/cs$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@guidedir@,$guidedir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@psdir@,$psdir,;t t
+s,@dvidir@,$dvidir,;t t
+s,@mandir@,$mandir,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@DEFS@,$DEFS,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@AR@,$AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@stage1_warn_cflags@,$stage1_warn_cflags,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@AWK@,$AWK,;t t
+s,@LEX@,$LEX,;t t
+s,@LEXLIB@,$LEXLIB,;t t
+s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s,@LN@,$LN,;t t
+s,@LN_S@,$LN_S,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@YACC@,$YACC,;t t
+s,@INSTALL@,$INSTALL,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CPP@,$CPP,;t t
+s,@gnat@,$gnat,;t t
+s,@vfprintf@,$vfprintf,;t t
+s,@doprint@,$doprint,;t t
+s,@manext@,$manext,;t t
+s,@objext@,$objext,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ALLOCA@,$ALLOCA,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@CATALOGS@,$CATALOGS,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@GMOFILES@,$GMOFILES,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@INTLDEPS@,$INTLDEPS,;t t
+s,@INTLLIBS@,$INTLLIBS,;t t
+s,@INTLOBJS@,$INTLOBJS,;t t
+s,@POFILES@,$POFILES,;t t
+s,@POSUB@,$POSUB,;t t
+s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
+s,@GT_NO@,$GT_NO,;t t
+s,@GT_YES@,$GT_YES,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@l@,$l,;t t
+s,@gthread_flags@,$gthread_flags,;t t
+s,@build_canonical@,$build_canonical,;t t
+s,@host_canonical@,$host_canonical,;t t
+s,@target_subdir@,$target_subdir,;t t
+s,@inhibit_libc@,$inhibit_libc,;t t
+s,@sched_prefix@,$sched_prefix,;t t
+s,@sched_cflags@,$sched_cflags,;t t
+s,@gcc_tooldir@,$gcc_tooldir,;t t
+s,@dollar@,$dollar,;t t
+s,@objdir@,$objdir,;t t
+s,@subdirs@,$subdirs,;t t
+s,@all_boot_languages@,$all_boot_languages,;t t
+s,@all_compilers@,$all_compilers,;t t
+s,@all_diff_excludes@,$all_diff_excludes,;t t
+s,@all_headers@,$all_headers,;t t
+s,@all_lang_makefiles@,$all_lang_makefiles,;t t
+s,@all_languages@,$all_languages,;t t
+s,@all_lib2funcs@,$all_lib2funcs,;t t
+s,@all_stagestuff@,$all_stagestuff,;t t
+s,@build_exeext@,$build_exeext,;t t
+s,@build_install_headers_dir@,$build_install_headers_dir,;t t
+s,@build_xm_file_list@,$build_xm_file_list,;t t
+s,@cc_set_by_configure@,$cc_set_by_configure,;t t
+s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t
+s,@cpp_install_dir@,$cpp_install_dir,;t t
+s,@cpp_main@,$cpp_main,;t t
+s,@dep_host_xmake_file@,$dep_host_xmake_file,;t t
+s,@dep_tmake_file@,$dep_tmake_file,;t t
+s,@extra_c_flags@,$extra_c_flags,;t t
+s,@extra_c_objs@,$extra_c_objs,;t t
+s,@extra_cpp_objs@,$extra_cpp_objs,;t t
+s,@extra_cxx_objs@,$extra_cxx_objs,;t t
+s,@extra_headers_list@,$extra_headers_list,;t t
+s,@extra_objs@,$extra_objs,;t t
+s,@extra_parts@,$extra_parts,;t t
+s,@extra_passes@,$extra_passes,;t t
+s,@extra_programs@,$extra_programs,;t t
+s,@fixinc_defs@,$fixinc_defs,;t t
+s,@float_h_file@,$float_h_file,;t t
+s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
+s,@gcc_version@,$gcc_version,;t t
+s,@gcc_version_trigger@,$gcc_version_trigger,;t t
+s,@host_exeext@,$host_exeext,;t t
+s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t
+s,@host_xm_file_list@,$host_xm_file_list,;t t
+s,@install@,$install,;t t
+s,@JAVAGC@,$JAVAGC,;t t
+s,@lang_options_files@,$lang_options_files,;t t
+s,@lang_specs_files@,$lang_specs_files,;t t
+s,@lang_tree_files@,$lang_tree_files,;t t
+s,@local_prefix@,$local_prefix,;t t
+s,@maybe_use_collect2@,$maybe_use_collect2,;t t
+s,@md_file@,$md_file,;t t
+s,@objc_boehm_gc@,$objc_boehm_gc,;t t
+s,@out_file@,$out_file,;t t
+s,@out_object_file@,$out_object_file,;t t
+s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t
+s,@symbolic_link@,$symbolic_link,;t t
+s,@thread_file@,$thread_file,;t t
+s,@tm_file_list@,$tm_file_list,;t t
+s,@will_use_collect2@,$will_use_collect2,;t t
 /@target_overrides@/r $target_overrides
-s%@target_overrides@%%g
+s,@target_overrides@,,;t t
 /@host_overrides@/r $host_overrides
-s%@host_overrides@%%g
-s%@cross_defines@%$cross_defines%g
+s,@host_overrides@,,;t t
+s,@cross_defines@,$cross_defines,;t t
 /@cross_overrides@/r $cross_overrides
-s%@cross_overrides@%%g
+s,@cross_overrides@,,;t t
 /@build_overrides@/r $build_overrides
-s%@build_overrides@%%g
+s,@build_overrides@,,;t t
 /@language_fragments@/r $language_fragments
-s%@language_fragments@%%g
+s,@language_fragments@,,;t t
 /@language_hooks@/r $language_hooks
-s%@language_hooks@%%g
-
+s,@language_hooks@,,;t t
 CEOF
-EOF
 
-cat >> $CONFIG_STATUS <<\EOF
+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"
+  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_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag
     else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
     fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
   fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
+fi # test -n "$CONFIG_FILES"
 
-CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"}
 EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+cat >>$CONFIG_STATUS <<\EOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # 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" ;;
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) 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%/[^/][^/]*$%%'`
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
   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%^\./%%'`"
+    { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+    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'`
+    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" ;;
+  case $srcdir in
+  .)  ac_srcdir=.
+      if test -z "$ac_dots"; then
+         ac_top_srcdir=.
+      else
+         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+      fi ;;
+  [\\/]* | ?:[\\/]* )
+      ac_srcdir=$srcdir$ac_dir_suffix;
+      ac_top_srcdir=$srcdir ;;
   *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_dots$srcdir ;;
   esac
 
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:11527: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated automatically by config.status.  */
+  configure_input="Generated automatically from `echo $ac_file_in |
+                                                 sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:11545: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:11558: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+EOF
+cat >>$CONFIG_STATUS <<EOF
+  sed "$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
 
-  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
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
 
-  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*
+#
+# CONFIG_HEADER section.
+#
 
 # 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_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without 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'
+ac_uD=',;t'
 
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="auto-host.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   # 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" ;;
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) 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
+  test x"$ac_file" != x- && { echo "$as_me:11618: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
 
-  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
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:11629: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:11642: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/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
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# 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.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\EOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+t end
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+EOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
 
 # 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]*%/* & */%
+cat >>conftest.undefs <<\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.
-
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
 rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
 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
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$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
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\EOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated automatically by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated automatically by configure.  */" >$tmp/config.h
   else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+      { echo "$as_me:11759: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
+        { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+      fi
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
     fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
   fi
-fi; done
-
+done
 EOF
+cat >>$CONFIG_STATUS <<\EOF
 
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$nls_cv_header_libgt"
-ac_dests="$nls_cv_header_intl"
-EOF
+#
+# CONFIG_LINKS section.
+#
 
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
-  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-  set $ac_sources; ac_source=$1; shift; ac_sources=$*
+for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
-  echo "linking $srcdir/$ac_source to $ac_dest"
+  { echo "$as_me:11810: linking $srcdir/$ac_source to $ac_dest" >&5
+echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
 
   if test ! -r $srcdir/$ac_source; then
-    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+    { { echo "$as_me:11814: error: $srcdir/$ac_source: File not found" >&5
+echo "$as_me: error: $srcdir/$ac_source: File not found" >&2;}
+   { (exit 1); exit 1; }; }
   fi
   rm -f $ac_dest
 
   # Make relative symlinks.
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+  ac_dest_dir=`$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_dest" : 'X\(//\)[^/]' \| \
+         X"$ac_dest" : 'X\(//\)$' \| \
+         X"$ac_dest" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    # The dest file is in a subdirectory.
-    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
-    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+    { case "$ac_dest_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dest_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+    ;;
+  esac
+done; }
+
+    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dest_dir_suffix.
-    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+    ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[^/]*,../,g'`
   else
     ac_dest_dir_suffix= ac_dots=
   fi
 
-  case "$srcdir" in
-  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
-  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+  case $srcdir in
+  [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
+      *) ac_rel_source=$ac_dots$srcdir/$ac_source ;;
   esac
 
   # Make a symlink if possible; otherwise try a hard link.
-  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest; then :
-  else
-    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
-  fi
+  # otherwise just copy the file. -gg-
+  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+    ln $srcdir/$ac_source $ac_dest ||
+    cp $srcdir/$ac_source $ac_dest 2>/dev/null ||
+    { { echo "$as_me:11866: error: cannot link $ac_dest to $srcdir/$ac_source" >&5
+echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;}
+   { (exit 1); exit 1; }; }
 done
 EOF
-cat >> $CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<\EOF
 
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
 
-host='${host}'
-build='${build}'
-target='${target}'
-target_alias='${target_alias}'
-srcdir='${srcdir}'
-subdirs='${subdirs}'
-oldstyle_subdirs='${oldstyle_subdirs}'
-symbolic_link='${symbolic_link}'
-program_transform_set='${program_transform_set}'
-program_transform_name='${program_transform_name}'
-dep_host_xmake_file='${dep_host_xmake_file}'
-host_xmake_file='${host_xmake_file}'
-dep_tmake_file='${dep_tmake_file}'
-tmake_file='${tmake_file}'
-thread_file='${thread_file}'
-gcc_version='${gcc_version}'
-gcc_version_trigger='${gcc_version_trigger}'
-local_prefix='${local_prefix}'
-build_install_headers_dir='${build_install_headers_dir}'
-build_exeext='${build_exeext}'
-host_exeext='${host_exeext}'
-out_file='${out_file}'
-gdb_needs_out_file_path='${gdb_needs_out_file_path}'
-SET_MAKE='${SET_MAKE}'
-target_list='${target_list}'
-target_overrides='${target_overrides}'
-host_overrides='${host_overrides}'
-cross_defines='${cross_defines}'
-cross_overrides='${cross_overrides}'
-build_overrides='${build_overrides}'
-cpp_install_dir='${cpp_install_dir}'
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-case "$CONFIG_FILES" in *po/Makefile.in*)
+  case $ac_dest in
+    default-1 ) case "$CONFIG_FILES" in *po/Makefile.in*)
         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac
-
+      esac ;;
+    default )
 . $srcdir/configure.lang
 case x$CONFIG_HEADERS in
 xauto-host.h:config.in)
@@ -9206,10 +11912,33 @@
   echo creating libintl.h
   echo '#include "intl/libintl.h"' >libintl.h
 fi
+ ;;
+  esac
+done
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
 
-exit 0
+{ (exit 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
+ac_clean_files=$ac_clean_files_save
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
 
--- gcc-2.95.3/gcc/configure.in	Thu Jan 25 15:03:02 2001
+++ gcc/gcc/configure.in	Wed Dec  5 23:54:53 2001
@@ -491,7 +491,7 @@
 		cpu_type=convex
 		;;
 changequote(,)dnl
-	i[34567]86-*-*)
+	i[34567]86*-*-*)
 changequote([,])dnl
 		cpu_type=i386
 		;;
@@ -1250,6 +1250,25 @@
  		fi
 		;;
 changequote(,)dnl
+	i[34567]86be-*-amithlon*)	# Intel 80386's running AMIthlon/AmigaOS
+changequote([,])dnl			# with ELF format in big endian integer data mode
+		out_file=i386/i386.c
+		md_file=i386/i386be.md
+		xm_file=i386/xm-amithlon.h
+		tm_file=i386/amithlon.h
+		tmake_file="i386/t-amithlon i386/t-crtstuff"
+#		xmake_file=i386/x-amithlon
+#		extra_objs=amigaos.o
+		gnu_ld=yes
+#		tmake_file="t-linux i386/t-crtstuff"
+		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+		gnu_ld=yes
+		float_format=i386
+# 		if test x$enable_threads = xyes; then
+# 			thread_file='posix'
+# 		fi
+		;;
+changequote(,)dnl
 	i[34567]86-*-linux-gnu*)	# Intel 80386's running GNU/Linux
 changequote([,])dnl			# with ELF format using glibc 2
 					# aka GNU/Linux C library 6
@@ -2019,6 +2038,14 @@
 		extra_headers=math-68881.h
 		float_format=m68k
 		;;
+	m68k-*-amigaos*)
+		xm_file=m68k/xm-amigaos.h
+		tm_file=m68k/amigaos.h
+		tmake_file=m68k/t-amigaos
+		xmake_file=m68k/x-amigaos
+		extra_objs=amigaos.o
+		gnu_ld=yes
+		;;
 	m68k-*-coff*)
 		tmake_file=m68k/t-m68kbare
 		tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
@@ -2763,6 +2790,16 @@
 		tmake_file=rs6000/t-beos
 		xmake_file=rs6000/x-beos
 		;;
+	powerpc-*-morphos*)
+		cpu_type=rs6000
+		xm_file=rs6000/xm-morphos.h
+		tm_file=rs6000/morphos.h
+		tmake_file=rs6000/t-morphos
+		xmake_file=rs6000/x-morphos
+		extra_objs=morphos.o
+		broken_install=cp
+		install_headers_dir=install-headers-cp
+		;;
 	powerpc-*-sysv* | powerpc-*-elf*)
 		tm_file=rs6000/sysv4.h
 		xm_file="xm-siglist.h rs6000/xm-sysv4.h"
@@ -3338,10 +3375,10 @@
 	# Process --with-cpu= for PowerPC/rs6000
 	target_cpu_default2=
 	case $machine in
-	i486-*-*)
+	i486*-*-*)
 		target_cpu_default2=1
 		;;
-	i586-*-*)
+	i586*-*-*)
 		case $target_alias in
 			k6-*)
 				target_cpu_default2=4
@@ -3351,7 +3388,7 @@
 				;;
 		esac
 		;;
-	i686-*-* | i786-*-*)
+	i686*-*-* | i786*-*-*)
 		target_cpu_default2=3
 		;;
 	alpha*-*-*)
--- gcc-2.95.3/gcc/c-parse.in	Tue Apr 27 00:35:50 1999
+++ gcc/gcc/c-parse.in	Thu Sep 27 19:35:53 2001
@@ -2329,56 +2329,63 @@
 
 parms:
 	parm
-		{ push_parm_decl ($1); }
+/* begin-GG-local: explicit register specification for parameters */
+		{ push_parm_decl (TREE_PURPOSE($1), TREE_VALUE($1)); }
 	| parms ',' parm
-		{ push_parm_decl ($3); }
+		{ push_parm_decl (TREE_PURPOSE($3), TREE_VALUE($3)); }
 	;
 
 /* A single parameter declaration or parameter type name,
    as found in a parmlist.  */
 parm:
-	  typed_declspecs setspecs parm_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	  typed_declspecs setspecs parm_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2); }
-	| typed_declspecs setspecs notype_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4)); 
+	| typed_declspecs setspecs notype_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4); 
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2); }
-	| typed_declspecs setspecs absdcl maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	| typed_declspecs setspecs absdcl maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2); }
-	| declmods setspecs notype_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	| declmods setspecs notype_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2);  }
 
-	| declmods setspecs absdcl maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	| declmods setspecs absdcl maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
+/* end-GG-local */
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
@@ -2871,30 +2878,35 @@
 
 myparms:
 	myparm
-		{ push_parm_decl ($1); }
+/* begin-GG-local: explicit register specification for parameters */
+		{ push_parm_decl (TREE_PURPOSE($1), TREE_VALUE($1)); }
 	| myparms ',' myparm
-		{ push_parm_decl ($3); }
+		{ push_parm_decl (TREE_PURPOSE($3), TREE_VALUE($3)); }
 	;
 
 /* A single parameter declaration or parameter type name,
-   as found in a parmlist. DOES NOT ALLOW AN INITIALIZER OR ASMSPEC */
+   as found in a parmlist. DOES NOT ALLOW AN INITIALIZER */
 
 myparm:
-	  parm_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
+	  parm_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
 							 $1),
-					build_tree_list (prefix_attributes,
-							 $2)); }
-	| notype_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $1),
-					build_tree_list (prefix_attributes,
-							 $2)); }
-	| absdcl maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $1),
-					build_tree_list (prefix_attributes,
-							 $2)); }
+					  build_tree_list (prefix_attributes,
+							 $3)), $2); }
+	| notype_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $1),
+					  build_tree_list (prefix_attributes,
+							   $3)), $2); }
+	| absdcl maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $1),
+					  build_tree_list (prefix_attributes,
+							   $3)), $2); }
+/* end-GG-local */
 	;
 
 optparmlist:
--- gcc-2.95.3/gcc/c-parse.y	Tue Apr 27 00:35:51 1999
+++ gcc/gcc/c-parse.y	Thu Sep 27 19:56:19 2001
@@ -2134,56 +2134,63 @@
 
 parms:
 	parm
-		{ push_parm_decl ($1); }
+/* begin-GG-local: explicit register specification for parameters */
+		{ push_parm_decl (TREE_PURPOSE($1), TREE_VALUE($1)); }
 	| parms ',' parm
-		{ push_parm_decl ($3); }
+		{ push_parm_decl (TREE_PURPOSE($3), TREE_VALUE($3)); }
 	;
 
 /* A single parameter declaration or parameter type name,
    as found in a parmlist.  */
 parm:
-	  typed_declspecs setspecs parm_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	  typed_declspecs setspecs parm_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2); }
-	| typed_declspecs setspecs notype_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4)); 
+	| typed_declspecs setspecs notype_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4); 
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2); }
-	| typed_declspecs setspecs absdcl maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	| typed_declspecs setspecs absdcl maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2); }
-	| declmods setspecs notype_declarator maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	| declmods setspecs notype_declarator maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
 		  resume_momentary ($2);  }
 
-	| declmods setspecs absdcl maybe_attribute
-		{ $$ = build_tree_list (build_tree_list (current_declspecs,
-							 $3),
-					build_tree_list (prefix_attributes,
-							 $4));
+	| declmods setspecs absdcl maybeasm maybe_attribute
+		{ $$ = build_tree_list (
+			 build_tree_list (build_tree_list (current_declspecs,
+							   $3),
+					  build_tree_list (prefix_attributes,
+							   $5)), $4);
+/* end-GG-local */
 		  current_declspecs = TREE_VALUE (declspec_stack);
 		  prefix_attributes = TREE_PURPOSE (declspec_stack);
 		  declspec_stack = TREE_CHAIN (declspec_stack);
--- gcc-2.95.3/gcc/cppfiles.c	Mon May 10 17:24:33 1999
+++ gcc/gcc/cppfiles.c	Thu Sep 27 19:35:54 2001
@@ -56,13 +56,18 @@
    VMS has non-numeric inodes. */
 #ifdef VMS
 #define INO_T_EQ(a, b) (!bcmp((char *) &(a), (char *) &(b), sizeof (a)))
-#elif (defined _WIN32 && !defined CYGWIN && ! defined (_UWIN)) \
-       || defined __MSDOS__
+#elif (defined (_WIN32) && !defined (CYGWIN) && ! defined (_UWIN)) \
+       || defined (__MSDOS__) || defined (__amigaos__) || defined (__morphos__)
 #define INO_T_EQ(a, b) 0
 #else
 #define INO_T_EQ(a, b) ((a) == (b))
 #endif
 
+#ifndef OPEN_CASE_SENSITIVE
+/* Default is standard open() */
+#define OPEN_CASE_SENSITIVE open
+#endif
+
 /* Merge the four include chains together in the order quote, bracket,
    system, after.  Remove duplicate dirs (as determined by
    INO_T_EQ()).  The system_include and after_include chains are never
@@ -318,7 +323,12 @@
   
   ih = include_hash (pfile, fname, 1);
   jh = redundant_include_p (pfile, ih,
-			    fname[0] == '/' ? ABSOLUTE_PATH : search_start);
+#ifdef FILE_NAME_ABSOLUTE_P
+			    FILE_NAME_ABSOLUTE_P (fname)
+#else
+			    fname[0] == '/'
+#endif
+			    ? ABSOLUTE_PATH : search_start);
 
   if (jh != 0)
     {
@@ -328,7 +338,7 @@
       if (jh == (struct include_hash *)-1)
 	return -2;
       else
-	return open (jh->name, O_RDONLY, 0666);
+	return OPEN_CASE_SENSITIVE (jh->name, O_RDONLY, 0666);
     }
 
   if (ih->foundhere)
@@ -354,11 +364,15 @@
   ih->control_macro = NULL;
   
   /* If the pathname is absolute, just open it. */ 
+#ifdef FILE_NAME_ABSOLUTE_P
+  if (FILE_NAME_ABSOLUTE_P (fname))
+#else
   if (fname[0] == '/')
+#endif
     {
       ih->foundhere = ABSOLUTE_PATH;
       ih->name = ih->nshort;
-      return open (ih->name, O_RDONLY, 0666);
+      return OPEN_CASE_SENSITIVE (ih->name, O_RDONLY, 0666);
     }
 
   /* Search directory path, trying to open the file. */
@@ -369,13 +383,20 @@
   for (l = search_start; l; l = l->next)
     {
       bcopy (l->name, name, l->nlen);
+#ifdef VOL_SEPARATOR
+      if (name[l->nlen - 1] == VOL_SEPARATOR)
+	strcpy (&name[l->nlen], fname);
+      else
+#endif
+	{
       name[l->nlen] = '/';
       strcpy (&name[l->nlen+1], fname);
+	}
       simplify_pathname (name);
       if (CPP_OPTIONS (pfile)->remap)
 	name = remap_filename (pfile, name, l);
 
-      f = open (name, O_RDONLY|O_NONBLOCK|O_NOCTTY, 0666);
+      f = OPEN_CASE_SENSITIVE (name, O_RDONLY|O_NONBLOCK|O_NOCTTY, 0666);
 #ifdef EACCES
       if (f == -1 && errno == EACCES)
 	{
@@ -723,6 +744,18 @@
   
   dir = xstrdup (fname);
   last_slash = rindex (dir, '/');
+
+#ifdef VOL_SEPARATOR
+  {
+    char *last_sep;
+    last_sep = rindex (dir, VOL_SEPARATOR);
+    if (last_sep)
+      last_sep++; /* Keep VOL_SEPARATOR.  */
+    if (last_sep > last_slash)
+      last_slash = last_sep;
+  }
+#endif
+
   if (last_slash)
     {
       if (last_slash == dir)
--- gcc-2.95.3/gcc/cp/tinfo.s	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/cp/tinfo.s	Sun Jun 30 11:49:04 2002
@@ -0,0 +1,14 @@
+	.file	"tinfo.cc"
+gcc2_compiled.:
+	.globl os
+	.section	".sbss","aw",@nobits
+	.align 2
+os:
+	.space	4
+	.size	 os,4
+	.globl ns
+	.align 2
+ns:
+	.space	4
+	.size	 ns,4
+	.ident	"GCC: (GNU) 2.95.3 20010315 (release/lcs-2002-04-12)"
--- gcc-2.95.3/gcc/c-tree.h	Thu Feb 18 21:38:43 1999
+++ gcc/gcc/c-tree.h	Thu Sep 27 19:35:53 2001
@@ -331,7 +331,9 @@
 extern void print_lang_type                     PROTO((FILE *, tree, int));
 extern void push_c_function_context             PROTO((void));
 extern void push_label_level                    PROTO((void));
-extern void push_parm_decl                      PROTO((tree));
+/* begin-GG-local: explicit register specification for parameters */
+extern void push_parm_decl                      PROTO((tree, tree));
+/* end-GG-local */
 extern tree pushdecl                            PROTO((tree));
 extern tree pushdecl_top_level                  PROTO((tree));
 extern void pushlevel                           PROTO((int));
--- gcc-2.95.3/gcc/expmed.c	Thu Jan 25 15:03:06 2001
+++ gcc/gcc/expmed.c	Thu Sep 27 19:35:54 2001
@@ -59,6 +59,10 @@
 #define SLOW_UNALIGNED_ACCESS STRICT_ALIGNMENT
 #endif
 
+#ifndef GET_MIN_MODE_ALIGNMENT
+#define GET_MIN_MODE_ALIGNMENT(mode) BITS_PER_UNIT
+#endif
+
 /* For compilers that support multiple targets with different word sizes,
    MAX_BITS_PER_WORD contains the biggest value of BITS_PER_WORD.  An example
    is the H8/300(H) compiler.  */
@@ -295,9 +299,13 @@
      BITPOS is 0 in a REG bigger than a word.  */
   if (GET_MODE_SIZE (fieldmode) >= UNITS_PER_WORD
       && (GET_CODE (op0) != MEM
-	  || ! SLOW_UNALIGNED_ACCESS
-	  || (offset * BITS_PER_UNIT % bitsize == 0
-	      && align % GET_MODE_SIZE (fieldmode) == 0))
+	  || !((SLOW_UNALIGNED_ACCESS
+		&& (offset * BITS_PER_UNIT % bitsize != 0
+		    || align % GET_MODE_SIZE (fieldmode) != 0))
+	       || (! SLOW_UNALIGNED_ACCESS
+		   && GET_MIN_MODE_ALIGNMENT (fieldmode) > 1
+		   && (offset * BITS_PER_UNIT % bitsize != 0
+		       || align * BITS_PER_UNIT % GET_MIN_MODE_ALIGNMENT (fieldmode) != 0))))
       && bitpos == 0 && bitsize == GET_MODE_BITSIZE (fieldmode))
     {
       /* Storing in a full-word or multi-word field in a register
@@ -509,7 +517,8 @@
 	    bestmode = GET_MODE (op0);
 
 	  if (bestmode == VOIDmode
-	      || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align))
+	      || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)
+	      || (!SLOW_UNALIGNED_ACCESS && GET_MIN_MODE_ALIGNMENT (bestmode) > align * BITS_PER_UNIT))
 	    goto insv_loses;
 
 	  /* Adjust address to point to the containing unit of that mode.  */
@@ -1050,9 +1059,12 @@
 	&& TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
 				  GET_MODE_BITSIZE (GET_MODE (op0))))
        || (GET_CODE (op0) == MEM
-	   && (! SLOW_UNALIGNED_ACCESS
-	       || (offset * BITS_PER_UNIT % bitsize == 0
-		   && align * BITS_PER_UNIT % bitsize == 0))))
+	   && !((SLOW_UNALIGNED_ACCESS
+		 && (offset * BITS_PER_UNIT % bitsize != 0
+		     || align * BITS_PER_UNIT % bitsize != 0))
+		|| (!SLOW_UNALIGNED_ACCESS
+		    && (offset * BITS_PER_UNIT % GET_MIN_MODE_ALIGNMENT (mode) != 0
+			|| align * BITS_PER_UNIT % GET_MIN_MODE_ALIGNMENT (mode) != 0)))))
       && ((bitsize >= BITS_PER_WORD && bitsize == GET_MODE_BITSIZE (mode)
 	   && bitpos % BITS_PER_WORD == 0)
 	  || (mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0) != BLKmode
@@ -1242,7 +1254,8 @@
 		    bestmode = GET_MODE (xop0);
 
 		  if (bestmode == VOIDmode
-		      || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align))
+		      || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)
+		      || (!SLOW_UNALIGNED_ACCESS && GET_MIN_MODE_ALIGNMENT (bestmode) > align * BITS_PER_UNIT))
 		    goto extzv_loses;
 
 		  /* Compute offset as multiple of this unit,
@@ -1379,7 +1392,8 @@
 		    bestmode = GET_MODE (xop0);
 
 		  if (bestmode == VOIDmode
-		      || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align))
+		      || (SLOW_UNALIGNED_ACCESS && GET_MODE_SIZE (bestmode) > align)
+		      || (!SLOW_UNALIGNED_ACCESS && GET_MIN_MODE_ALIGNMENT (bestmode) > align * BITS_PER_UNIT))
 		    goto extv_loses;
 
 		  /* Compute offset as multiple of this unit,
--- gcc-2.95.3/gcc/expr.c	Mon Feb 19 15:02:00 2001
+++ gcc/gcc/expr.c	Thu Sep 27 19:35:54 2001
@@ -241,6 +241,10 @@
 #define SLOW_UNALIGNED_ACCESS STRICT_ALIGNMENT
 #endif
 
+#ifndef GET_MIN_MODE_ALIGNMENT
+#define GET_MIN_MODE_ALIGNMENT(x) BITS_PER_UNIT
+#endif
+
 /* Register mappings for target machines without register windows.  */
 #ifndef INCOMING_REGNO
 #define INCOMING_REGNO(OUT) (OUT)
@@ -4749,7 +4753,10 @@
 	 store it as a bit field.  */
       || (SLOW_UNALIGNED_ACCESS
 	  && align * BITS_PER_UNIT < GET_MODE_ALIGNMENT (mode))
-      || (SLOW_UNALIGNED_ACCESS && bitpos % GET_MODE_ALIGNMENT (mode) != 0))
+      || (!SLOW_UNALIGNED_ACCESS
+	  && align * BITS_PER_UNIT < GET_MIN_MODE_ALIGNMENT(mode))
+      || (SLOW_UNALIGNED_ACCESS && bitpos % GET_MODE_ALIGNMENT (mode) != 0)
+      || (!SLOW_UNALIGNED_ACCESS && bitpos % GET_MIN_MODE_ALIGNMENT (mode) != 0))
     {
       rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0);
 
@@ -6645,7 +6652,10 @@
 		       fetch it as a bit field.  */
 		    || (SLOW_UNALIGNED_ACCESS
 			&& ((TYPE_ALIGN (TREE_TYPE (tem)) < (unsigned int) GET_MODE_ALIGNMENT (mode))
-			    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0))))))
+			    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
+		    || (!SLOW_UNALIGNED_ACCESS
+			&& ((TYPE_ALIGN (TREE_TYPE (tem)) < (unsigned int) GET_MIN_MODE_ALIGNMENT(mode))
+			    || (bitpos % GET_MIN_MODE_ALIGNMENT (mode) != 0))))))
 	  {
 	    enum machine_mode ext_mode = mode;
 
--- gcc-2.95.3/gcc/flow.c	Thu Jan 25 15:03:08 2001
+++ gcc/gcc/flow.c	Thu Sep 27 19:36:09 2001
@@ -3157,11 +3157,11 @@
   if (n_basic_blocks == 0
       || (regno < FIRST_PSEUDO_REGISTER
 	  && (global_regs[regno]
-	      || fixed_regs[regno]
-	      || FUNCTION_ARG_REGNO_P (regno))))
+	      || fixed_regs[regno])))
     return 0;
 
-  return REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, regno);
+  return (REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, regno)
+	  && (regno >= FIRST_PSEUDO_REGISTER || ! function_arg_regno_p (regno)));
 }
 
 /* 1 if register REGNO was alive at a place where `setjmp' was called
--- gcc-2.95.3/gcc/function.c	Thu Jan 25 15:03:15 2001
+++ gcc/gcc/function.c	Thu Sep 27 19:36:09 2001
@@ -7027,3 +7027,29 @@
     }
 #endif /* HAVE_prologue or HAVE_epilogue */
 }
+
+/* begin-GG-local: explicit register specification for parameters */
+/* Return 1 if an argument for the current function was passed in
+   register REGNO.  */
+
+int
+function_arg_regno_p (regno)
+     int regno;
+{
+  tree parm = DECL_ARGUMENTS (current_function_decl);
+  for (; parm; parm = TREE_CHAIN (parm))
+    {
+      rtx incoming = DECL_INCOMING_RTL (parm);
+      if (GET_CODE (incoming) == REG)
+	{
+	  int incoming_reg;
+	  incoming_reg = REGNO (incoming);
+	  if (regno >= incoming_reg &&
+	      regno < incoming_reg + HARD_REGNO_NREGS (incoming_reg,
+						       GET_MODE (incoming)))
+	    return 1;
+	}
+    }
+  return 0;
+}
+/* end-GG-local */
--- gcc-2.95.3/gcc/gcc.c	Thu Jan 25 15:03:16 2001
+++ gcc/gcc/gcc.c	Thu Sep 27 19:36:09 2001
@@ -1372,9 +1372,12 @@
 #ifndef STANDARD_EXEC_PREFIX
 #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
 #endif /* !defined STANDARD_EXEC_PREFIX */
+#ifndef STANDARD_EXEC_PREFIX_1
+#define STANDARD_EXEC_PREFIX_1 "/usr/lib/gcc/"
+#endif /* !defined STANDARD_EXEC_PREFIX_1 */
 
 static const char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
-static const char *standard_exec_prefix_1 = "/usr/lib/gcc/";
+static const char *standard_exec_prefix_1 = STANDARD_EXEC_PREFIX_1;
 #ifdef MD_EXEC_PREFIX
 static const char *md_exec_prefix = MD_EXEC_PREFIX;
 #endif
@@ -1382,6 +1385,12 @@
 #ifndef STANDARD_STARTFILE_PREFIX
 #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
 #endif /* !defined STANDARD_STARTFILE_PREFIX */
+#ifndef STANDARD_STARTFILE_PREFIX_1
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#endif /* !defined STANDARD_STARTFILE_PREFIX_1 */
+#ifndef STANDARD_STARTFILE_PREFIX_2
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+#endif /* !defined STANDARD_STARTFILE_PREFIX_2 */
 
 #ifdef MD_STARTFILE_PREFIX
 static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
@@ -1390,8 +1399,8 @@
 static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
 #endif
 static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-static const char *standard_startfile_prefix_1 = "/lib/";
-static const char *standard_startfile_prefix_2 = "/usr/lib/";
+static const char *standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1;
+static const char *standard_startfile_prefix_2 = STANDARD_STARTFILE_PREFIX_2;
 
 #ifndef TOOLDIR_BASE_PREFIX
 #define TOOLDIR_BASE_PREFIX "/usr/local/"
@@ -1997,7 +2006,11 @@
 
   /* Determine the filename to execute (special case for absolute paths).  */
 
+#ifdef FILE_NAME_ABSOLUTE_P
+  if (FILE_NAME_ABSOLUTE_P (name)
+#else
   if (IS_DIR_SEPARATOR (*name)
+#endif
 #ifdef HAVE_DOS_BASED_FILESYSTEM
       /* Check for disk name on MS-DOS-based systems.  */
       || (name[0] && name[1] == ':' && IS_DIR_SEPARATOR (name[2]))
@@ -3530,9 +3543,13 @@
 		  /* Relative directories always come from -B,
 		     and it is better not to use them for searching
 		     at run time.  In particular, stage1 loses  */
+#ifndef FILE_NAME_ABSOLUTE_P
 		  if (!IS_DIR_SEPARATOR (pl->prefix[0]))
 		    continue;
-#endif
+#else
+		  if (! FILE_NAME_ABSOLUTE_P (pl->prefix))
+#endif /* FILE_NAME_ABSOLUTE_P */
+#endif /* RELATIVE_PREFIX_NOT_LINKDIR */
 		  /* Try subdirectory if there is one.  */
 		  if (multilib_dir != NULL)
 		    {
@@ -4609,12 +4626,11 @@
   /* Exclude directories that the linker is known to search.  */
   if (linker
       && ((cp - path == 6
-	   && strcmp (path, concat (dir_separator_str, "lib", 
-				    dir_separator_str, ".", NULL_PTR)) == 0)
+	   && strcmp (path, concat (STANDARD_STARTFILE_PREFIX_1, 
+				    ".", NULL_PTR)) == 0)
 	  || (cp - path == 10
-	      && strcmp (path, concat (dir_separator_str, "usr", 
-				       dir_separator_str, "lib", 
-				       dir_separator_str, ".", NULL_PTR)) == 0)))
+	      && strcmp (path, concat (STANDARD_STARTFILE_PREFIX_2, 
+				       ".", NULL_PTR)) == 0)))
     return 0;
 
   return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode));
--- gcc-2.95.3/gcc/genconfig.c	Fri Apr 16 21:52:24 1999
+++ gcc/gcc/genconfig.c	Thu Sep 27 19:36:09 2001
@@ -327,8 +327,8 @@
   printf ("/* Generated automatically by the program `genconfig'\n\
 from the machine description file `md'.  */\n\n");
 
-  /* Allow at least 10 operands for the sake of asm constructs.  */
-  max_recog_operands = 9;  /* We will add 1 later.  */
+  /* Allow at least 15 operands for the sake of asm constructs.  */
+  max_recog_operands = 14;  /* We will add 1 later.  */
   max_dup_operands = 1;
 
   /* Read the machine description.  */
--- gcc-2.95.3/gcc/ginclude/stdarg.h	Sat May  8 03:52:35 1999
+++ gcc/gcc/ginclude/stdarg.h	Fri Dec  7 23:06:10 2001
@@ -102,7 +102,7 @@
 /* We cast to void * and then to TYPE * because this avoids
    a warning about increasing the alignment requirement.  */
 
-#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__)
+#if (defined (__arm__) && ! defined (__ARMEB__)) || (defined (__i386__) && ! defined(__BIG_ENDIAN__) ) || defined (__i860__) || defined (__ns32000__) || defined (__vax__)
 /* This is for little-endian machines; small args are padded upward.  */
 #define va_arg(AP, TYPE)						\
  (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)),	\
--- gcc-2.95.3/gcc/ginclude/varargs.h	Wed Jul  7 02:19:05 1999
+++ gcc/gcc/ginclude/varargs.h	Fri Dec  7 23:00:30 2001
@@ -123,7 +123,7 @@
   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
 #endif
 
-#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__)
+#if (defined (__arm__) && ! defined (__ARMEB__)) || (defined (__i386__) && ! defined(__BIG_ENDIAN__) ) || defined (__i860__) || defined (__ns32000__) || defined (__vax__)
 /* This is for little-endian machines; small args are padded upward.  */
 #define va_arg(AP, TYPE)						\
  (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)),	\
--- gcc-2.95.3/gcc/longlong.h	Wed Jan  6 21:44:39 1999
+++ gcc/gcc/longlong.h	Sat Jan  5 16:41:39 2002
@@ -353,6 +353,22 @@
 	     "g" ((USItype) (bh)),					\
 	     "1" ((USItype) (al)),					\
 	     "g" ((USItype) (bl)))
+#if defined (__BIG_ENDIAN__)
+  /* Accept no memory operands for ix86/big endian target */
+#define umul_ppmm(w1, w0, u, v) \
+  __asm__ ("mull %3"							\
+	   : "=a" ((USItype) (w0)),					\
+	     "=d" ((USItype) (w1))					\
+	   : "%0" ((USItype) (u)),					\
+	     "r" ((USItype) (v)))
+#define udiv_qrnnd(q, r, n1, n0, d) \
+  __asm__ ("divl %4"							\
+	   : "=a" ((USItype) (q)),					\
+	     "=d" ((USItype) (r))					\
+	   : "0" ((USItype) (n0)),					\
+	     "1" ((USItype) (n1)),					\
+	     "r" ((USItype) (d)))
+#else
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ ("mull %3"							\
 	   : "=a" ((USItype) (w0)),					\
@@ -366,6 +382,7 @@
 	   : "0" ((USItype) (n0)),					\
 	     "1" ((USItype) (n1)),					\
 	     "rm" ((USItype) (d)))
+#endif
 #define count_leading_zeros(count, x) \
   do {									\
     USItype __cbtmp;							\
--- gcc-2.95.3/gcc/Makefile.in	Thu Jan 25 15:02:58 2001
+++ gcc/gcc/Makefile.in	Thu Oct  4 17:12:22 2001
@@ -367,7 +367,7 @@
 LIBGCC2_DEPS =
 
 # libgcc1-test target (must also be overridable for a target)
-LIBGCC1_TEST = libgcc1-test
+LIBGCC1_TEST = #libgcc1-test
 
 # List of extra executables that should be compiled for this target machine
 # that are used for compiling from source code to object code.
@@ -403,6 +403,12 @@
 # so don't override it here.
 USE_COLLECT2 = collect2$(exeext)
 
+### begin-GG-local: dynamic libraries
+# List of extra object files that should be compiled and linked with
+# collect2.
+EXTRA_COLLECT2_OBJS =
+### end-GG-local
+
 # List of extra C and assembler files to add to libgcc1.a.
 # Assembler files should have names ending in `.asm'.
 LIB1FUNCS_EXTRA = 
@@ -1359,7 +1365,7 @@
     hard-reg-set.h $(BASIC_BLOCK_H)
 sbitmap.o: sbitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H)
 
-COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o 
+COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o $(EXTRA_COLLECT2_OBJS)
 collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
 	-rm -f collect2$(exeext)
--- gcc-2.95.3/gcc/morphoscollect2.c	Thu Jan  1 01:00:00 1970
+++ gcc/gcc/morphoscollect2.c	Thu Sep 27 19:36:09 2001
@@ -0,0 +1,344 @@
+/* GG-local whole file: dynamic libraries */
+/* Supplimentary functions that get compiled and linked to collect2 for
+   MorphOS target.
+   Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+/* From collect2.c:  */
+
+void maybe_unlink(char *);
+char* xmalloc(unsigned);
+void fatal_perror(char *, ...);
+void fork_execute(char *, char **);
+void fatal(char*, ...);
+
+extern char *c_file_name;
+extern int debug;
+
+/* Names of temporary files we create.  */
+#define XLIBS_C_NAME "xlibs.c"
+#define XLIBS_O_NAME "xlibs.o"
+#define SHARED_X_NAME "shared.x"
+
+/* Suffix which is prepended to "-l" options for dynamic libraries.  */
+#define DYNAMIC_LIB_SUFFIX "_ixlibrary"
+
+/* Structure that holds library names.  */
+struct liblist
+{
+  struct liblist *next;
+  char *name;
+  char *cname;
+};
+
+/* Not zero if "-static" was specified on GCC command line or if all the
+   libraries are static.  */
+static int flag_static=0;
+
+/* Not zero if linking a base relative executable.  This is recognized by
+   presence of "-m amiga_bss" on the linker's commandline.  */
+static int flag_baserel=0;
+
+/* Not zero if some of the specified libraries are dynamic.  */
+static int found_dynamic_libs=0;
+
+/* List of linker libraries.  */
+struct liblist *head = NULL;
+
+/* Return 1 if collect2 should do something more apart from tlink. We want it
+   to call "postlink" and "strip" if linking with dynamic libraries.  */
+
+int
+morphos_do_collecting(void)
+{
+  return !flag_static;
+}
+
+/* Check for presence of "-static" on the GCC command line.  We should not do
+   collecting if this flag was specified.  */
+
+void
+morphos_gccopts_hook(char* arg)
+{
+  if (strncmp(arg, "-static", strlen("-static"))==0)
+    flag_static=1;
+}
+
+/* Replace unprintable characters with underscores.  Used by "add_lib()".  */
+
+static void
+safename(char *p)
+{
+  if (!isalpha(*p))
+    *p = '_';
+  p++;
+  while (*p)
+    {
+      if (!isalnum(*p))
+	*p = '_';
+      p++;
+    }
+}
+
+/* Add a library to the list of dynamic libraries.  First make sure that the
+   library is actually dynamic.  Used by "amigaos_libname_hook()".  */
+
+static void
+add_lib(char *name)
+{
+  struct liblist *lib;
+  static char buf[256];
+
+  for (lib = head; lib; lib = lib->next)
+    if (!strcmp(lib->name, name))
+      return;
+
+  /* A2IXDIR_PREFIX is passed by "make".  */
+  sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", name);
+  if (access(buf, R_OK))
+    return;
+
+  lib = (struct liblist*)xmalloc(sizeof(struct liblist));
+  lib->name = strdup(name);
+  lib->cname = strdup(name);
+  safename(lib->cname);
+  lib->next = head;
+  head = lib;
+
+  if (debug)
+    fprintf(stderr, "found dynamic library, name: %s, cname: %s\n", lib->name,
+	    lib->cname);
+
+  found_dynamic_libs=1;
+}
+
+/* Check if the argument is a linker library.  Call "add_lib()" if yes.  */
+
+void
+morphos_libname_hook(char* arg)
+{
+  int len = strlen(arg);
+  if (flag_static)
+    return;
+
+  if (len > 2 && !memcmp(arg, "-l", 2))
+    add_lib(arg + 2);
+  else if (len > 2 && !strcmp(arg + len - 2, ".a"))
+    {
+      char *lib;
+
+      arg[len - 2] = '\0';
+      lib = strrchr(arg, '/');
+      if (lib == NULL)
+	lib = strrchr(arg, ':');
+      if (lib == NULL)
+	lib = arg - 1;
+      if (!strncmp(lib + 1, "lib", 3))
+	add_lib(lib + 4);
+      arg[len - 2] = '.';
+    }
+}
+
+/* Delete temporary files.  */
+
+void
+morphos_collect2_cleanup(void)
+{
+  if (flag_static)
+    return;
+  maybe_unlink(XLIBS_C_NAME);
+  maybe_unlink(XLIBS_O_NAME);
+  maybe_unlink(SHARED_X_NAME);
+}
+
+/* Copy file named by FNAME to X.  */
+
+static void
+cat(char *fname, FILE *x)
+{
+#define BUFSIZE 16384
+  FILE *in;
+  static char buf[BUFSIZE];
+  int bytes;
+
+  in = fopen(fname, "r");
+  if (in == NULL)
+    fatal_perror("%s", fname);
+  while (!feof(in) && (bytes = fread(buf, 1, BUFSIZE, in)))
+    fwrite(buf, 1, bytes, x);
+  fclose(in);
+}
+
+/* If no dynamic libraries were found, perform like "-static".  Otherwise,
+   create "xlibs.c", "shared.x" and invoke "gcc" to create "xlibs.o".  We also
+   have to adjust the linker commandline.  */
+
+void
+morphos_prelink_hook(char** ld1_argv, int* strip_flag)
+{
+  if (flag_static)
+    return;
+
+  if (!found_dynamic_libs)
+    {
+      flag_static=1;
+      /* If the user has not requested "-static", but has requested "-s",
+	 collect2 removes "-s" from the "ld1_argv", and calls "strip" after
+	 linking.  However, this would not be efficient if we linked the
+	 executable without any dynamic library.  In this case, we put "-s"
+	 back.  */
+      if (*strip_flag)
+	{
+	  /* Add "-s" as the last argument on the command line.  */
+	  while (*ld1_argv)
+	    ld1_argv++;
+	  *ld1_argv++="-s";
+	  *ld1_argv=0;
+	  *strip_flag=0;
+	}
+    }
+  else
+    {
+      FILE *x, *out;
+      struct liblist *lib;
+      static char* argv[]={0, "-c", XLIBS_C_NAME, 0};
+      char **ld1_end, **ld1;
+
+      /* Prepend suffixes to dynamic lib names. In addition, check if we are
+	 linking a base relative executable.  */
+      for (ld1=ld1_argv; *ld1; ld1++)
+	{
+	  int len=strlen(*ld1);
+	  if (strncmp(*ld1, "-l", strlen("-l"))==0)
+	    {
+	      for (lib=head; lib; lib=lib->next)
+		if (strcmp(*ld1+strlen("-l"), lib->name)==0)
+		  {
+		    char *newname=
+			    xmalloc(strlen(*ld1)+strlen(DYNAMIC_LIB_SUFFIX)+1);
+		    strcpy(newname, *ld1);
+		    strcat(newname, DYNAMIC_LIB_SUFFIX);
+		    *ld1=newname;
+		    break;
+		  }
+	    }
+	  else if (len > 2 && !strcmp(*ld1 + len - 2, ".a"))
+	    {
+	      char *libname;
+	      int substituted=0;
+
+	      (*ld1)[len - 2] = '\0';
+	      libname = strrchr(*ld1, '/');
+	      if (libname == NULL)
+		libname = strrchr(*ld1, ':');
+	      if (libname == NULL)
+		libname = *ld1 - 1;
+	      if (!strncmp(libname + 1, "lib", 3))
+		for (lib=head; lib; lib=lib->next)
+		  if (strcmp(libname+4, lib->name)==0)
+		    {
+		      char *newname=xmalloc(strlen(*ld1)+
+					    strlen(DYNAMIC_LIB_SUFFIX)+3);
+		      strcpy(newname, *ld1);
+		      strcat(newname, DYNAMIC_LIB_SUFFIX);
+		      strcat(newname, ".a");
+		      *ld1=newname;
+		      substituted=1;
+		      break;
+		    }
+	      if (!substituted)
+		(*ld1)[len - 2] = '.';
+	    }
+	  else if (strcmp(ld1[0], "-m")==0 && ld1[1]
+		   && strcmp(ld1[1], "morphos_baserel")==0)
+	    {
+	      flag_baserel=1;
+	      break;
+	    }
+	}
+
+      out = fopen(XLIBS_C_NAME, "w");
+      if (out == NULL)
+	fatal_perror("%s", XLIBS_C_NAME);
+      x = fopen(SHARED_X_NAME, "w");
+      if (x == NULL)
+	fatal_perror("%s", SHARED_X_NAME);
+
+      cat((flag_baserel ? A2IXDIR_PREFIX "/morphos_exe_baserel_script.x"
+			: A2IXDIR_PREFIX "/morphos_exe_script.x"), x);
+      for (lib = head; lib; lib = lib->next)
+	{
+	  static char buf[256];
+	  sprintf(buf, A2IXDIR_PREFIX "/ldscripts/%s.x", lib->name);
+	  fprintf(out, "extern long %sBase; long *__p%sBase = &%sBase;\n",
+		  lib->cname, lib->cname, lib->cname);
+	  cat(buf, x);
+	} /* {{ */
+      fprintf(x, "}}\n");
+      fclose(out);
+      fclose(x);
+      argv[0]=c_file_name;
+      fork_execute("gcc", argv);
+
+      /* Unfortunately, unlike "-s", "-T" cannot be specified as the last
+	 argument. We put it after "-L" args.  */
+      ld1_end=ld1_argv;
+      while (*ld1_end)
+	ld1_end++;
+      ld1_end++;
+      /* "ld1_end" now points after the terminating 0 of "ld1_argv".  */
+
+      ld1=ld1_end-2;
+      while (ld1>ld1_argv && strncmp(*ld1, "-L", strlen("-L")))
+	ld1--;
+      if (ld1==ld1_argv)
+	fatal("no -L arguments");
+      ld1++;
+      /* "ld1" now points after "-L".  */
+
+      /* Shift all the arguments after "-L" one position right.  */
+      memmove(ld1+1, ld1, (ld1_end-ld1)*sizeof(*ld1));
+      /* Put -Tshared.x in the now empty space.  */
+      *ld1="-T" SHARED_X_NAME;
+    }
+}
+
+/* Be lazy and just call "postlink".  */
+
+void
+morphos_postlink_hook(char* output_file)
+{
+  static char* argv[]={"postlink", 0, 0, 0};
+  if (flag_static)
+    return;
+
+  if (flag_baserel)
+    {
+      argv[1]="-mbaserel";
+      argv[2]=output_file;
+    }
+  else
+    argv[1]=output_file;
+  fork_execute("postlink", argv);
+}
--- gcc-2.95.3/gcc/prefix.c	Sat Apr 10 06:27:09 1999
+++ gcc/gcc/prefix.c	Thu Sep 27 19:36:10 2001
@@ -275,7 +275,11 @@
     prefix = PREFIX;
 
   /* Remove any trailing directory separator from what we got.  */
+#if defined (__amigaos__) || defined (__morphos__)	/* Don't kill ':' on Amiga! */
+  if (prefix[strlen (prefix) - 1] == DIR_SEPARATOR)
+#else
   if (IS_DIR_SEPARATOR (prefix[strlen (prefix) - 1]))
+#endif
     {
       char * temp = save_string (prefix, strlen (prefix));
       temp[strlen (temp) - 1] = 0;
@@ -303,6 +307,7 @@
 	path = translate_name (path);
     }
 
+#if !defined (__amigaos__) && !defined (__morphos__)	/* Don't convert ':' on Amiga! */
 #ifdef DIR_SEPARATOR_2
   /* Convert DIR_SEPARATOR_2 to DIR_SEPARATOR. */
   if (DIR_SEPARATOR != DIR_SEPARATOR_2)
@@ -316,6 +321,7 @@
       path = new_path;
     }
 #endif
+#endif
       
 #if defined (DIR_SEPARATOR) && !defined (DIR_SEPARATOR_2)
   if (DIR_SEPARATOR != '/')
--- gcc-2.95.3/gcc/reload.c	Thu Jan 25 15:03:20 2001
+++ gcc/gcc/reload.c	Fri Sep 28 13:21:57 2001
@@ -2125,13 +2125,17 @@
       /* On a WORDS_BIG_ENDIAN machine, point to the last register of a
 	 multiple hard register group, so that for example (reg:DI 0) and
 	 (reg:SI 1) will be considered the same register.  */
-      if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD
+
+      if (((!FLOAT_MODE_P (GET_MODE (x)) && WORDS_BIG_ENDIAN) ||
+	   ( FLOAT_MODE_P (GET_MODE (x)) && FLOAT_WORDS_BIG_ENDIAN))
+	  && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD
 	  && i < FIRST_PSEUDO_REGISTER)
 	i += (GET_MODE_SIZE (GET_MODE (x)) / UNITS_PER_WORD) - 1;
-      if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD
+      if (((!FLOAT_MODE_P (GET_MODE (y)) && WORDS_BIG_ENDIAN) ||
+	   ( FLOAT_MODE_P (GET_MODE (y)) && FLOAT_WORDS_BIG_ENDIAN))
+	  && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD
 	  && j < FIRST_PSEUDO_REGISTER)
 	j += (GET_MODE_SIZE (GET_MODE (y)) / UNITS_PER_WORD) - 1;
-
       return i == j;
     }
   /* If two operands must match, because they are really a single
--- gcc-2.95.3/gcc/toplev.c	Thu Jan 25 15:03:23 2001
+++ gcc/gcc/toplev.c	Thu Sep 27 19:36:10 2001
@@ -924,6 +924,10 @@
   {"pic", &flag_pic, 1,
    "Generate position independent code, if possible"},
   {"PIC", &flag_pic, 2, ""},
+  {"baserel", &flag_pic, 3,
+   "Generate base relative code"},
+  {"baserel32", &flag_pic, 4,
+   "Generate base relative code with no data limits"},
   {"exceptions", &flag_exceptions, 1,
    "Enable exception handling" },
   {"new-exceptions", &flag_new_exceptions, 1,
@@ -2569,7 +2573,11 @@
   /* NA gets INPUT_NAME sans directory names.  */
   while (na > input_name)
     {
-      if (na[-1] == '/')
+      if (na[-1] == '/'
+#ifdef VOL_SEPARATOR
+	  || na[-1] == VOL_SEPARATOR
+#endif
+	  )
 	break;
 #ifdef DIR_SEPARATOR
       if (na[-1] == DIR_SEPARATOR)
@@ -4776,6 +4784,9 @@
 #ifdef DIR_SEPARATOR
 	 && p[-1] != DIR_SEPARATOR
 #endif
+#ifdef VOL_SEPARATOR
+	 && p[-1] != VOL_SEPARATOR
+#endif
 	 )
     --p;
   progname = p;
@@ -5449,7 +5460,7 @@
 
   compile_file (filename);
 
-#if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN__)) && !defined(__INTERIX)
+#if !defined(OS2) && !defined(VMS) && (!defined(_WIN32) || defined (__CYGWIN__)) && !defined(__INTERIX) && !defined (__amigaos__) && !defined (__morphos__)
   if (flag_print_mem)
     {
       char *lim = (char *) sbrk (0);
@@ -5465,7 +5476,7 @@
 #endif /* not USG */
 #endif
     }
-#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX */
+#endif /* ! OS2 && ! VMS && (! _WIN32 || CYGWIN) && ! __INTERIX  && ! __amigaos__ && ! __morphos__ */
 
   if (errorcount)
     exit (FATAL_EXIT_CODE);
--- gcc-2.95.3/gcc/version.c	Fri Mar 16 13:52:12 2001
+++ gcc/gcc/version.c	Sun Jun 23 20:19:51 2002
@@ -1 +1 @@
-char *version_string = "2.95.3 20010315 (release)";
+char *version_string = "2.95.3 20010315 (release/lcs-2002-04-12)";
--- gcc-2.95.3/libiberty/choose-temp.c	Sun Apr 25 02:23:06 1999
+++ gcc/libiberty/choose-temp.c	Thu Sep 27 19:36:10 2001
@@ -51,6 +51,9 @@
 #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN))
 #define DIR_SEPARATOR '\\'
 #endif
+#if defined(__amigaos__) || defined(__morphos__)
+#define VOL_SEPARATOR ':'
+#endif
 #endif
 
 #ifndef DIR_SEPARATOR
@@ -131,7 +134,11 @@
 
   if (len != 0
       && temp_filename[len-1] != '/'
-      && temp_filename[len-1] != DIR_SEPARATOR)
+      && temp_filename[len-1] != DIR_SEPARATOR
+#ifdef VOL_SEPARATOR
+      && temp_filename[len-1] != VOL_SEPARATOR
+#endif
+	  )
     temp_filename[len++] = DIR_SEPARATOR;
   strcpy (temp_filename + len, TEMP_FILE);
 
@@ -184,7 +191,11 @@
 
   if (base_len != 0
       && temp_filename[base_len-1] != '/'
-      && temp_filename[base_len-1] != DIR_SEPARATOR)
+      && temp_filename[base_len-1] != DIR_SEPARATOR
+#ifdef VOL_SEPARATOR
+      && temp_filename[base_len-1] != VOL_SEPARATOR
+#endif
+	  )
     temp_filename[base_len++] = DIR_SEPARATOR;
   strcpy (temp_filename + base_len, TEMP_FILE);
 
--- gcc-2.95.3/libio/fileops.c	Mon Apr 12 20:27:49 1999
+++ gcc/libio/fileops.c	Sun Jun 30 16:09:44 2002
@@ -419,7 +419,10 @@
   return retval;
 }
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_file_seekoff (fp, offset, dir, mode)
      _IO_FILE *fp;
      _IO_off_t offset;
@@ -587,7 +590,10 @@
   return read (fp->_fileno, buf, size);
 }
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_file_seek (fp, offset, dir)
      _IO_FILE *fp;
      _IO_off_t offset;
--- gcc-2.95.3/libio/genops.c	Fri Mar  5 01:19:08 1999
+++ gcc/libio/genops.c	Sun Jun 30 16:09:44 2002
@@ -467,10 +467,13 @@
     return fp;
 }
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_default_seekpos (fp, pos, mode)
      _IO_FILE *fp;
-     _IO_pos_t pos;
+     _IO_off_t pos;
      int mode;
 {
   return _IO_SEEKOFF (fp, _IO_pos_as_off (pos), 0, mode);
@@ -551,7 +554,10 @@
   _IO_un_link (fp);
 }
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_default_seekoff (fp, offset, dir, mode)
      _IO_FILE *fp;
      _IO_off_t offset;
@@ -882,7 +888,10 @@
   return (unsigned char) *fp->_IO_read_ptr;
 }
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_default_seek (fp, offset, dir)
      _IO_FILE *fp;
      _IO_off_t offset;
--- gcc-2.95.3/libio/ioseekoff.c	Tue Sep 16 18:00:21 1997
+++ gcc/libio/ioseekoff.c	Sun Jun 30 16:09:44 2002
@@ -25,7 +25,10 @@
 
 #include <libioP.h>
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_seekoff (fp, offset, dir, mode)
      _IO_FILE *fp;
      _IO_off_t offset;
--- gcc-2.95.3/libio/ioseekpos.c	Tue Sep 16 18:00:23 1997
+++ gcc/libio/ioseekpos.c	Sun Jun 30 16:09:44 2002
@@ -25,10 +25,13 @@
 
 #include <libioP.h>
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_seekpos (fp, pos, mode)
      _IO_FILE *fp;
-     _IO_pos_t pos;
+     _IO_off_t pos;
      int mode;
 {
   _IO_pos_t retval;
--- gcc-2.95.3/libio/strops.c	Fri May 22 22:40:02 1998
+++ gcc/libio/strops.c	Sun Jun 30 16:09:44 2002
@@ -205,7 +205,10 @@
 	  - fp->_IO_read_base);
 }
 
-_IO_pos_t
+// Changed 2001-04-05 Andreas Wolff <andreas.wolff@dusnet.de>
+// Avoid conflicting types with libioP.h 
+// This may be obsolete for future versions of libio
+_IO_off_t
 _IO_str_seekoff (fp, offset, dir, mode)
      _IO_FILE *fp;
      _IO_off_t offset;
--- gcc-2.95.3/texinfo/info/tilde.c	Tue Mar 24 20:40:56 1998
+++ gcc/texinfo/info/tilde.c	Sun Jun 30 16:09:44 2002
@@ -31,11 +31,11 @@
 /* Include config.h before doing alloca.  */
 #include "info.h"
 
-#ifdef __GNUC__
+#if defined (__GNUC__) && !defined (C_ALLOCA)
 # undef alloca
 # define alloca __builtin_alloca
 #else
-# ifdef HAVE_ALLOCA_H
+# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA)
 #  include <alloca.h>
 # else
 #  ifndef _AIX
--- gcc-2.95.3/texinfo/makeinfo/makeinfo.c	Fri May 28 04:10:10 1999
+++ gcc/texinfo/makeinfo/makeinfo.c	Sun Jun 30 16:09:44 2002
@@ -37,11 +37,11 @@
 #include <time.h>
 #endif /* !TM_IN_SYS_TIME */
 
-#ifdef __GNUC__
+#if defined (__GNUC__) && !defined (C_ALLOCA)
 # undef alloca
 # define alloca __builtin_alloca
 #else
-# ifdef HAVE_ALLOCA_H
+# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA)
 #  include <alloca.h>
 # else
 #  ifndef _AIX
