Fix code structure (if ... else if ... where both parts
[openssl.git] / config
diff --git a/config b/config
index 3390d1e76aa40e0dfee580c97d1928bdf5f02b95..c89e69a17c9bbeae82de8350476300d23bb4978d 100755 (executable)
--- a/config
+++ b/config
@@ -27,6 +27,7 @@ RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
 SYSTEM=`(uname -s) 2>/dev/null`  || SYSTEM="unknown"
 VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
 
+
 # Now test for ISC and SCO, since it is has a braindamaged uname.
 #
 # We need to work around FreeBSD 1.1.5.1 
@@ -50,6 +51,8 @@ if [ "x$XREL" != "x" ]; then
            4.2MP)
                if [ "x$VERSION" = "x2.1.1" ]; then
                    echo "${MACHINE}-whatever-unixware211"; exit 0
+               elif [ "x$VERSION" = "x2.1.2" ]; then
+                   echo "${MACHINE}-whatever-unixware212"; exit 0
                else
                    echo "${MACHINE}-whatever-unixware2"; exit 0
                fi
@@ -57,8 +60,10 @@ if [ "x$XREL" != "x" ]; then
            4.2)
                echo "whatever-whatever-unixware1"; exit 0
                ;;
-           5*)
-               echo "${MACHINE}-sco-unixware7"; exit 0
+           5)
+               if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
+                   echo "${MACHINE}-sco-unixware7"; exit 0
+               fi
                ;;
        esac
     fi
@@ -159,7 +164,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
         ;;
 
     NetBSD:*:*:*386*)
-        echo "`sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whateve\r-netbsd"; exit 0
+        echo "`/usr/sbin/sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
        ;;
 
     NetBSD:*)
@@ -287,6 +292,8 @@ TEST="false"
 for i
 do
 case "$i" in 
+# shared library support (behnke@trustcenter.de)
+-shared) SHARED=true;;
 -d*) PREFIX="debug-";;
 -t*) TEST="true";;
 -h*) TEST="true"; cat <<EOF
@@ -402,6 +409,8 @@ case "$GUESSOS" in
        ;;
   mips-*-linux?) OUT="linux-mips" ;;
   ppc-*-linux2) OUT="linux-ppc" ;;
+  m68k-*-linux*) OUT="linux-m68k" ;;
+  ia64-*-linux?) OUT="linux-ia64" ;;
   ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
   sparc64-*-linux2)
        #Before we can uncomment following lines we have to wait at least
@@ -419,6 +428,7 @@ case "$GUESSOS" in
        sun4d)  OUT="linux-sparcv8" ;;
        *)      OUT="linux-sparcv7" ;;
        esac ;;
+  arm*-*-linux2) OUT="linux-elf-arm" ;;
   *-*-linux2) OUT="linux-elf" ;;
   *-*-linux1) OUT="linux-aout" ;;
   sun4u*-sun-solaris2)
@@ -471,6 +481,16 @@ then
   options="$options -DATALLA"
 fi
 
+#get some basic shared lib support (behnke@trustcenter.de)
+case "$OUT" in
+   solaris-*-gcc)
+       if  [ "$SHARED" = "true" ] 
+        then
+         options="$options -DPIC -fPIC"
+        fi
+     ;;
+esac
+
 # gcc < 2.8 does not support -mcpu=ultrasparc
 if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
 then