More information about installing.
[openssl.git] / config
diff --git a/config b/config
index fc344a7fc544ef1848d6db9671b148727989405c..5f3446b05128dcf449919542a6fa47b3c1274cf5 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:*)
@@ -233,7 +240,7 @@ esac
 # At this point we gone through all the one's
 # we know of: Punt
 
-echo "${MACHINE}-whatever-${SYSTEM}|${RELEASE}|${VERSION}
+echo "${MACHINE}-whatever-${SYSTEM}" 
 exit 0
 ) 2>/dev/null | (
 
@@ -243,7 +250,6 @@ exit 0
 
 PREFIX=""
 SUFFIX=""
-VERBOSE="false"
 TEST="false"
 
 # pick up any command line args to config
@@ -251,21 +257,15 @@ for i
 do
 case "$i" in 
 -d*) PREFIX="debug-";;
--v*) VERBOSE="true";;
 -t*) TEST="true";;
 -h*) TEST="true"; cat <<EOF
 Usage: config [options]
  -d    Add a debug- prefix to machine choice.
- -v    Verbose mode.
  -t    Test mode, do not run the Configure perl script.
  -h    This help.
 
 Any other text will be passed to the Configure perl script.
-Useful options include
- no-asm Build with no assember code.
- -Dxxx Add xxx define to compilation.
- -Lxxx Add xxx library include path to build.
- -lxxx Add xxx library to build.
+See INSTALL for instructions.
 
 EOF
 ;;
@@ -285,9 +285,7 @@ fi
 # read the output of the embedded GuessOS 
 read GUESSOS
 
-if [ "$VERBOSE" = "true" ]; then
-  echo GUESSOS $GUESSOS
-fi
+echo Operating system: $GUESSOS
 
 # now map the output into SSLeay terms ... really should hack into the
 # script above so we end up with values in vars but that would take
@@ -363,16 +361,16 @@ fi
 
 OUT="$PREFIX$OUT"
 
-# at this point we have the answer ... which we could check again
-# and then fallback to a vanilla SSLeay build but then this script
-# wouldn't get updated
-echo Configuring for $OUT
+$PERL ./Configure 2>&1 | grep "$OUT" > /dev/null
+if [ $? = "0" ]; then
+  echo Configuring for $OUT
 
-if [ "$TEST" = "true" ]; then
-  echo $PERL ./Configure $OUT $options
+  if [ "$TEST" = "true" ]; then
+    echo $PERL ./Configure $OUT $options
+  else
+    $PERL ./Configure $OUT $options
+  fi
 else
-  $PERL ./Configure $OUT $options
+  echo "This system is not supported. See file INSTALL for details."
 fi
-
 )
-