Refine PowerPC platform support.
[openssl.git] / config
diff --git a/config b/config
index 98f6d9fdc7c4a74d33c1b0c420d042391eb0dc52..9d6788708f089c697674eaabbb64d464ebecb15a 100755 (executable)
--- a/config
+++ b/config
@@ -111,12 +111,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
        echo "m68k-apple-aux3"; exit 0
        ;;
 
+    AIX:[3-9]:4:*)
+       echo "${MACHINE}-ibm-aix"; exit 0
+       ;;
+
     AIX:*:[5-9]:*)
-       echo "${MACHINE}-ibm-aix5"; exit 0
+       echo "${MACHINE}-ibm-aix"; exit 0
        ;;
 
     AIX:*)
-       echo "${MACHINE}-ibm-aix"; exit 0
+       echo "${MACHINE}-ibm-aix3"; exit 0
        ;;
 
     dgux:*)
@@ -542,7 +546,15 @@ EOF
        ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
        rm dummy dummy.c
        ;;
-  ppc64-*-linux2) OUT="linux-ppc64" ;;
+  ppc64-*-linux2)
+       echo "WARNING! If you wish to build 64-bit library, then you have to"
+       echo "         invoke './Configure linux-ppc64' *manually*."
+       if [ "$TEST" = "false" ]; then
+           echo "         You have about 5 seconds to press Ctrl-C to abort."
+           (stty -icanon min 0 time 50; read waste) < /dev/tty
+       fi
+       OUT="linux-ppc"
+       ;;
   ppc-*-linux2) OUT="linux-ppc" ;;
   m68k-*-linux*) OUT="linux-m68k" ;;
   ia64-*-linux?) OUT="linux-ia64" ;;
@@ -725,37 +737,28 @@ EOF
        fi
        options="$options -D_REENTRANT" ;;
   *-hpux)      OUT="hpux-parisc-$CC" ;;
-  *-aix5)
+  *-aix)
        KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
        KERNEL_BITS=${KERNEL_BITS:-32}
-       if [ $KERNEL_BITS -eq 64 ]; then
-           # we default to 64-bit because PKI performance is >3x better...
-           OBJECT_MODE=${OBJECT_MODE:-$KERNEL_BITS}
-       else
-           OBJECT_MODE=32
-       fi
-       OUT="aix-cc"
-       if [ "$CC" = "cc" -a $OBJECT_MODE -eq 64 ]; then
-           OUT="aix64-cc"
-           echo "WARNING! If you wish to build 32-bit kit, then you have to"
-           echo "         invoke './Configure aix-cc' *manually*."
-           if [ "$TEST" = "false" ]; then
-               echo "         You have ~5 seconds to press Ctrl-C to abort."
-               (stty -icanon min 0 time 50; read waste) < /dev/tty
-           fi
-       elif [ "$CC" = "gcc" ]; then
-           OUT="aix-gcc"
-       fi
-       ;;
-  *-aix)
+       OBJECT_MODE=${OBJECT_MODE:-32}
        if [ "$CC" = "gcc" ]; then
            OUT="aix-gcc"
+       elif [ $OBJECT_MODE -eq 64 ]; then
+           echo 'Your $OBJECT_MODE was found to be set to 64' 
+           OUT="aix64-cc"
        else
-           OUT="aix43-cc"
+           OUT="aix-cc"
+           if [ $KERNEL_BITS -eq 64 ]; then
+               echo "WARNING! If you wish to build 64-bit kit, then you have to"
+               echo "         invoke './Configure aix64-cc' *manually*."
+               if [ "$TEST" = "false" ]; then
+                   echo "         You have ~5 seconds to press Ctrl-C to abort."
+                   (/bin/stty -icanon min 0 time 50; read waste) < /dev/tty
+               fi
+           fi
        fi
        ;;
   # these are all covered by the catchall below
-  # *-aix) OUT="aix-$CC" ;;
   # *-dgux) OUT="dgux" ;;
   mips-sony-newsos4) OUT="newsos4-gcc" ;;
   *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;