From 3d2741562bb855a49d18b762978625d8854fb9e7 Mon Sep 17 00:00:00 2001
From: Ben Elliston <bje@gnu.org>
Date: Mon, 24 Jul 2000 12:04:33 +0000
Subject: [PATCH] 2000-07-24  Ben Elliston  <bje@redhat.com>

	* config.guess: Detect Plan 9.
---
 ChangeLog    |  4 ++++
 config.guess | 13 ++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9972432..ae6b0fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-07-24  Ben Elliston  <bje@redhat.com>
+
+	* config.guess: Detect Plan 9.
+
 2000-07-06  Andrew Cagney  <cagney@b1.cygnus.com>
 
 	* config.sub: Recognise d30v as a valid basic_machine.
diff --git a/config.guess b/config.guess
index 4994964..323f8c9 100755
--- a/config.guess
+++ b/config.guess
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
 
-version='2000-06-13'
+version='2000-07-24'
 
 # 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
@@ -1088,6 +1088,17 @@ EOF
     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 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2