Opportunistic change to work around pod2latex bug: rename NAME OPTIONS
[openssl.git] / config
diff --git a/config b/config
index 775344ecab5ff4c24621e729a87d79e2b1ac4842..87e7f870946d526733a31bb14f2db12bf0c828bf 100755 (executable)
--- a/config
+++ b/config
@@ -390,20 +390,33 @@ exit 0
 
 # figure out if gcc is available and if so we use it otherwise
 # we fallback to whatever cc does on the system
-GCCVER=`(gcc --version) 2>/dev/null | head -1`
+GCCVER=`(gcc -dumpversion) 2>/dev/null`
 if [ "$GCCVER" != "" ]; then
   CC=gcc
-  # then strip off whatever prefix Cygnus as well as GCC 3.1 prepends
-  # the number with...  Hopefully, this will work for any future prefixes
-  # as well.
-  GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z ()---]*//'`
+  # then strip off whatever prefix egcs prepends the number with...
+  # Hopefully, this will work for any future prefixes as well.
+  GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
+  # Since gcc 3.1 gcc --version behaviour has changed.  gcc -dumpversion
+  # does give us what we want though, so we use that.  We just just the
+  # major and minor version numbers.
   # peak single digit before and after first dot, e.g. 2.95.1 gives 29
   GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
 else
   CC=cc
 fi
 GCCVER=${GCCVER:-0}
-
+if [ "$SYSTEM" = "HP-UX" ];then
+  # By default gcc is a ILP32 compiler (with long long == 64).
+  GCC_BITS="32"
+  if [ $GCCVER -ge 30 ]; then
+    # PA64 support only came in with gcc 3.0.x.
+    # We look for the preprocessor symbol __LP64__ indicating
+    # 64bit bit long and pointer.  sizeof(int) == 32 on HPUX64.
+    if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
+      GCC_BITS="64"
+    fi
+  fi
+fi
 if [ "$SYSTEM" = "SunOS" ]; then
   if [ $GCCVER -ge 30 ]; then
     # 64-bit ABI isn't officially supported in gcc 3.0, but it appears
@@ -661,7 +674,16 @@ EOF
   RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
   *-siemens-sysv4) OUT="SINIX" ;;
   *-hpux1*)
-       OUT="hpux-parisc-$CC"
+       if [ $CC = "gcc" ];
+       then
+         if [ $GCC_BITS = "64" ]; then
+           OUT="hpux64-parisc-gcc"
+         else
+           OUT="hpux-parisc-gcc"
+         fi
+       else
+         OUT="hpux-parisc-$CC"
+       fi
        KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
        KERNEL_BITS=${KERNEL_BITS:-32}
        CPU_VERSION=`(getconf CPU_VERSION) 2>/dev/null`
@@ -737,7 +759,7 @@ case "$GUESSOS" in
   i386-*) options="$options 386" ;;
 esac
 
-for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 rijndael ripemd rsa sha
+for i in bf cast des dh dsa ec hmac idea md2 md5 mdc2 rc2 rc4 rc5 aes ripemd rsa sha
 do
   if [ ! -d crypto/$i ]
   then