From b8c5929130ff41f5e60475d8dcb084ed719c40a8 Mon Sep 17 00:00:00 2001
From: Andy Polyakov <appro@openssl.org>
Date: Wed, 19 Sep 2012 20:58:07 +0000
Subject: [PATCH] config: detect linux-mips* targets.

---
 CHANGES |  4 ++++
 config  | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/CHANGES b/CHANGES
index 55be3622db..be586a2f8a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -359,6 +359,10 @@
 
  Changes between 1.0.1 and 1.0.2 [xx XXX xxxx]
 
+  *) MIPS assembly pack updates: support for MIPS32r2 and SmartMIPS ASE,
+     platform support for Linux and Android.
+     [Andy Polyakov]
+
   *) Call OCSP Stapling callback after ciphersuite has been chosen, so
      the right response is stapled. Also change current certificate to
      the certificate actually sent.
diff --git a/config b/config
index 851a161136..bebaef2308 100755
--- a/config
+++ b/config
@@ -596,6 +596,16 @@ case "$GUESSOS" in
 	OUT="linux-ppc"
 	;;
   ppc-*-linux2) OUT="linux-ppc" ;;
+  mips64*-*-linux2)
+	echo "WARNING! If you wish to build 64-bit library, then you have to"
+	echo "         invoke './Configure linux64-mips64' *manually*."
+	if [ "$TEST" = "false" -a -t 1 ]; then
+	    echo "         You have about 5 seconds to press Ctrl-C to abort."
+	    (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
+	fi
+	OUT="linux-mips64"
+	;;
+  mips*-*-linux2) OUT="linux-mips32" ;;
   ppc60x-*-vxworks*) OUT="vxworks-ppc60x" ;;
   ppcgen-*-vxworks*) OUT="vxworks-ppcgen" ;;
   pentium-*-vxworks*) OUT="vxworks-pentium" ;;