Apply the Tru64 patch from Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
[openssl.git] / config
diff --git a/config b/config
index ec549098e7bc077db5a33b032add139a70188bb8..1b4cb3fe79c94e5fcb9fdfaa5e073bee8b8123ad 100755 (executable)
--- a/config
+++ b/config
@@ -135,10 +135,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
     HP-UX:*)
        HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        case "$HPUXVER" in
     HP-UX:*)
        HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        case "$HPUXVER" in
-           11.*)
-               echo "${MACHINE}-hp-hpux11"; exit 0
-               ;;
-           10.*)
+           1[0-9].*)   # HPUX 10 and 11 targets are unified
                echo "${MACHINE}-hp-hpux10"; exit 0
                ;;
            *)
                echo "${MACHINE}-hp-hpux10"; exit 0
                ;;
            *)
@@ -225,7 +222,18 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
        ;;
 
     OSF1:*:*:*alpha*)
        ;;
 
     OSF1:*:*:*alpha*)
-       echo "${MACHINE}-dec-osf"; exit 0
+       OSFMAJOR=`echo ${RELEASE}| sed -e 's/^V\([0-9]*\)\..*$/\1/'`
+       case "$OSFMAJOR" in
+           4|5)
+               echo "${MACHINE}-dec-tru64"; exit 0
+               ;;
+           1|2|3)
+               echo "${MACHINE}-dec-osf"; exit 0
+               ;;
+           *)
+               echo "${MACHINE}-dec-osf"; exit 0
+               ;;
+       esac
        ;;
 
     QNX:*)
        ;;
 
     QNX:*)
@@ -554,7 +562,8 @@ EOF
   pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
   *-*-openbsd) OUT="OpenBSD" ;;
   *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
   pmax*-*-openbsd) OUT="OpenBSD-mips" ;;
   *-*-openbsd) OUT="OpenBSD" ;;
   *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
-  *-*-osf) OUT="alpha-cc" ;;
+  *-*-osf) OUT="alphaold-cc" ;;
+  *-*-tru64) OUT="alpha-cc" ;;
   *-*-unixware7) OUT="unixware-7" ;;
   *-*-UnixWare7) OUT="unixware-7" ;;
   *-*-Unixware7) OUT="unixware-7" ;;
   *-*-unixware7) OUT="unixware-7" ;;
   *-*-UnixWare7) OUT="unixware-7" ;;
   *-*-Unixware7) OUT="unixware-7" ;;
@@ -567,8 +576,40 @@ EOF
   BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
   RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
   *-siemens-sysv4) OUT="SINIX" ;;
   BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
   RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
   *-siemens-sysv4) OUT="SINIX" ;;
-  *-hpux1*)    OUT="hpux-parisc-$CC"
-               options="$options -D_REENTRANT" ;;
+  *-hpux1*)
+       OUT="hpux-parisc-$CC"
+       KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
+       KERNEL_BITS=${KERNEL_BITS:-32}
+       CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
+       CPU_VERSION=${CPU_VERSION:-0}
+       # See <sys/unistd.h> for further info on CPU_VERSION.
+       if   [ $CPU_VERSION -ge 768 ]; then     # IA-64 CPU
+            echo "NOTICE! 64-bit is the only ABI currently operational on HP-UXi."
+            echo "        Post request to openssl-dev@openssl.org for 32-bit support."
+            if [ "$TEST" = "false" ]; then
+               (stty -icanon min 0 time 50; read waste) < /dev/tty
+            fi
+            OUT="hpux64-ia64-cc"
+       elif [ $CPU_VERSION -ge 532 ]; then     # PA-RISC 2.x CPU
+            if [ "$CC" = "cc" ]; then
+               OUT="hpux-parisc2-cc" # can't we have hpux-parisc2-gcc?
+            fi
+            if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
+               echo "WARNING! If you wish to build 64-bit library then you have to"
+               echo "         invoke './Configure hpux64-parisc2-cc' *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
+            fi
+       elif [ $CPU_VERSION -ge 528 ]; then     # PA-RISC 1.1+ CPU
+            :
+       elif [ $CPU_VERSION -ge 523 ]; then     # PA-RISC 1.0 CPU
+            :
+       else                                    # Motorola(?) CPU
+            OUT="hpux-$CC"
+       fi
+       options="$options -D_REENTRANT" ;;
   *-hpux)      OUT="hpux-parisc-$CC" ;;
   # these are all covered by the catchall below
   # *-aix) OUT="aix-$CC" ;;
   *-hpux)      OUT="hpux-parisc-$CC" ;;
   # these are all covered by the catchall below
   # *-aix) OUT="aix-$CC" ;;