More Kerberos SSL changes from Jeffrey Altman <jaltman@columbia.edu>
[openssl.git] / config
diff --git a/config b/config
index 55aa3db6554c18e054f29e8f25ad4bab070acb4f..9b40add6d516d02a1519b3eda048faa6f01b3799 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
-           11.*)
-               echo "${MACHINE}-hp-hpux11"; exit 0
-               ;;
-           10.*)
+           1[0-9].*)   # HPUX 10 and 11 targets are unified
                echo "${MACHINE}-hp-hpux10"; exit 0
                ;;
            *)
@@ -513,7 +510,7 @@ EOF
                echo "         invoke './Configure solaris64-sparcv9-cc' *manually*."
                if [ "$TEST" = "false" ]; then
                  echo "         You have about 5 seconds to press Ctrl-C to abort."
-                 (stty -icanon min 0 max 50; read waste) < /dev/tty
+                 (stty -icanon min 0 time 50; read waste) < /dev/tty
                fi
            elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then
                # $GCC_ARCH denotes default ABI chosen by compiler driver
@@ -525,7 +522,7 @@ EOF
                echo "         invoke './Configure solaris-sparcv9-gcc' *manually*."
                if [ "$TEST" = "false" ]; then
                  echo "         You have about 5 seconds to press Ctrl-C to abort."
-                 (stty -icanon min 0 max 50; read waste) < /dev/tty
+                 (stty -icanon min 0 time 50; read waste) < /dev/tty
                fi
            elif [ "$GCC_ARCH" = "-m32" ]; then
                echo "NOTICE! If you *know* that your GNU C supports 64-bit/V9 ABI"
@@ -533,7 +530,7 @@ EOF
                echo "        invoke './Configure solaris64-sparcv9-gcc' *manually*."
                if [ "$TEST" = "false" ]; then
                  echo "         You have about 5 seconds to press Ctrl-C to abort."
-                 (stty -icanon min 0 max 50; read waste) < /dev/tty
+                 (stty -icanon min 0 time 50; read waste) < /dev/tty
                fi
            fi
        fi
@@ -567,8 +564,40 @@ EOF
   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" ;;