diff --git a/ChangeLog b/ChangeLog
index ec95138145d151df540b3e96f7bee7179cef3b73..441816483b871b66f35317642e95a603c255d460 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,6 +102,8 @@ Fri Jul 24 17:01:42 1998  Ian Lance Taylor  <ian@cygnus.com>
 
 	* config.sub: Merge with FSF.
 
+	* config.guess: Merge with FSF.
+
 Sat Jul 18 14:32:43 CDT 1998  Robert Lipe  <robertl@dgii.com>
 
 	* config.guess: (*-pc-sco3.2v5) Add detection for Pentium II.
diff --git a/config.guess b/config.guess
index 63f1afbd2f9bed05e2ebfbbb5b2f118067ef55a9..500098f14a156d695792e1e8bcafc72928936677 100755
--- a/config.guess
+++ b/config.guess
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc.
+#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -112,6 +112,9 @@ EOF
     amiga:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
     arc64:OpenBSD:*:*)
 	echo mips64el-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -150,6 +153,9 @@ EOF
     NILE:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
@@ -367,7 +373,7 @@ EOF
 	    9000/8[67]1 | 9000/80[24] | 9000/8[78]9 | 9000/893 )
 				  HP_ARCH=hppa1.1 ;; # FIXME: really hppa2.0
 	    9000/8?[13679] )	  HP_ARCH=hppa1.1 ;;
-	    9000/8?? )		  HP_ARCH=hppa1.0 ;;
+	    9000/8?? )            HP_ARCH=hppa1.0 ;;
 	esac
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -797,7 +803,7 @@ EOF
     news*:NEWS-OS:*:6*)
 	echo mips-sony-newsos6
 	exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
+    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
@@ -810,6 +816,9 @@ EOF
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
 	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2