Recognize CPU version on NetBSD and FreeBSD.
authorUlf Möller <ulf@openssl.org>
Fri, 23 Apr 1999 16:32:04 +0000 (16:32 +0000)
committerUlf Möller <ulf@openssl.org>
Fri, 23 Apr 1999 16:32:04 +0000 (16:32 +0000)
NetBSD entry submitted by: Todd Vierling <tv@pobox.com>

config

diff --git a/config b/config
index fc344a7fc544ef1848d6db9671b148727989405c..a6633a7055692910e2beb6468ecd352c9a3a2ed3 100755 (executable)
--- a/config
+++ b/config
@@ -123,16 +123,23 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
        echo "${MACHINE}-whatever-freebsd3"; exit 0
        ;;
 
-    FreeBSD:*:*:*486*)
-       echo "i486-whatever-freebsd"; exit 0
+    FreeBSD:*:*:*386*)
+        case `sysctl -n hw.model` in
+           Pentium*)
+                echo "i586-whatever-freebsd"; exit 0
+                ;;
+            *)
+                echo "i386-whatever-freebsd"; exit 0
+                ;;
+            esac;
        ;;
 
     FreeBSD:*)
        echo "${MACHINE}-whatever-freebsd"; exit 0
        ;;
 
-    NetBSD:*:*:*486*)
-       echo "i486-whatever-netbsd"; exit 0
+    NetBSD:*:*:*386*)
+        echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0
        ;;
 
     NetBSD:*)