Improved PowerPC support. Proper ./config support for ppc targets,
[openssl.git] / config
diff --git a/config b/config
index a0dc457..46102ce 100755 (executable)
--- a/config
+++ b/config
@@ -110,12 +110,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
        echo "m68k-apple-aux3"; exit 0
        ;;
 
-    AIX:[3456789]:4:*)
-       echo "${MACHINE}-ibm-aix43"; exit 0
-       ;;
-
-    AIX:*:[56789]:*)
-       echo "${MACHINE}-ibm-aix43"; exit 0
+    AIX:*:[5-9]:*)
+       echo "${MACHINE}-ibm-aix5"; exit 0
        ;;
 
     AIX:*)
@@ -537,10 +533,7 @@ EOF
        ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
        rm dummy dummy.c
        ;;
-  ppc64-*-linux2)
-       #Use the standard target for PPC architecture until we create a
-       #special one for the 64bit architecture.
-       OUT="linux-ppc" ;;
+  ppc64-*-linux2) OUT="linux-ppc64" ;;
   ppc-*-linux2) OUT="linux-ppc" ;;
   m68k-*-linux*) OUT="linux-m68k" ;;
   ia64-*-linux?) OUT="linux-ia64" ;;
@@ -719,6 +712,35 @@ EOF
        fi
        options="$options -D_REENTRANT" ;;
   *-hpux)      OUT="hpux-parisc-$CC" ;;
+  *-aix5)
+       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)
+       if [ "$CC" = "gcc" ]; then
+           OUT="aix-gcc"
+       else
+           OUT="aix43-cc"
+       fi
+       ;;
   # these are all covered by the catchall below
   # *-aix) OUT="aix-$CC" ;;
   # *-dgux) OUT="dgux" ;;