Fix bug in copy_email() which would not
[openssl.git] / config
diff --git a/config b/config
index f2b92e3e4b30911a314c9fb24095c62dbbcab767..1b44dc6ba306df0ac5af25b0cec46be3fd4d2feb 100755 (executable)
--- a/config
+++ b/config
 # Be as similar to the output of config.guess/config.sub
 # as possible.
 
+PREFIX=""
+SUFFIX=""
+TEST="false"
+
+# pick up any command line args to config
+for i
+do
+case "$i" in 
+-d*) PREFIX="debug-";;
+-t*) TEST="true";;
+-h*) TEST="true"; cat <<EOF
+Usage: config [options]
+ -d    Add a debug- prefix to machine choice.
+ -t    Test mode, do not run the Configure perl script.
+ -h    This help.
+
+Any other text will be passed to the Configure perl script.
+See INSTALL for instructions.
+
+EOF
+;;
+*) options=$options" $i" ;;
+esac
+done
+
 # First get uname entries that we use below
 
 MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
@@ -300,31 +325,6 @@ exit 0
 # this is where the translation occurs into SSLeay terms
 # ---------------------------------------------------------------------------
 
-PREFIX=""
-SUFFIX=""
-TEST="false"
-
-# pick up any command line args to config
-for i
-do
-case "$i" in 
--d*) PREFIX="debug-";;
--t*) TEST="true";;
--h*) TEST="true"; cat <<EOF
-Usage: config [options]
- -d    Add a debug- prefix to machine choice.
- -t    Test mode, do not run the Configure perl script.
- -h    This help.
-
-Any other text will be passed to the Configure perl script.
-See INSTALL for instructions.
-
-EOF
-;;
-*) options=$options" $i" ;;
-esac
-done
-
 # figure out if gcc is available and if so we use it otherwise
 # we fallback to whatever cc does on the system
 GCCVER=`(gcc --version) 2>/dev/null`
@@ -401,10 +401,18 @@ case "$GUESSOS" in
        ;;
   mips4-sgi-irix64)
        echo "WARNING! If you wish to build 64-bit library, then you have to"
-       echo "         invoke './Configre irix64-mips4-$CC' *manually*."
+       echo "         invoke './Configure irix64-mips4-$CC' *manually*."
        echo "         Type return if you want to continue, Ctrl-C to abort."
-       read waste < /dev/tty
-       options="$options -mips4"
+       if [ "$TEST" = "false" ]; then
+         read waste < /dev/tty
+       fi
+        CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
+        CPU=${CPU:-0}
+        if [ $CPU -ge 5000 ]; then
+                options="$options -mips4"
+        else
+                options="$options -mips3"
+        fi
        OUT="irix-mips3-$CC"
        ;;
   alpha-*-linux2)
@@ -468,7 +476,9 @@ EOF
                echo "WARNING! If you wish to build 64-bit library, then you have to"
                echo "         invoke './Configure solaris64-sparcv9-cc' *manually*."
                echo "         Type return if you want to continue, Ctrl-C to abort."
-               read waste < /dev/tty
+               if [ "$TEST" = "false" ]; then
+                 read waste < /dev/tty
+               fi
        fi
        OUT="solaris-sparcv9-$CC" ;;
   sun4m-*-solaris2)    OUT="solaris-sparcv8-$CC" ;;