Judging from various messages on the OpenSSL mailing lists, HP-UX 10
[openssl.git] / Configure
index f529c8508102bbb08ebfc187b504538d91c99548..d88ae2397780046111c2d9a68bab3bd57be70d51 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -97,7 +97,7 @@ my %table=(
 "debug-ben-debug",     "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::",
 "debug-ben-strict",    "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown):::::",
 "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
-"debug-bodo",  "gcc:-DL_ENDIAN -DREF_CHECK -DCRYPTO_MDEBUG -g -m486 -Wall::-D_REENTRANT::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
+"debug-bodo",  "gcc:-DBIO_PAIR_DEBUG -DL_ENDIAN -DREF_CHECK -DCRYPTO_MDEBUG -g -m486 -Wall::-D_REENTRANT::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "dist",                "cc:-O::(unknown):::::",
 
 # Basic configs that should work on any box
@@ -147,7 +147,7 @@ my %table=(
 # If hpux-cc fails (e.g. during "make test"), try the next one; otherwise,
 # please report your OS and compiler version to the bugs@openssl.org
 # mailing list.
-"hpux-brokencc",       "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O4 -z::(unknown)::DES_PTR DES_UNROLL DES_RISC1:::",
+"hpux-brokencc",       "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown)::DES_PTR DES_UNROLL DES_RISC1:::",
 
 "hpux-gcc",    "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
 # If hpux-gcc fails, try this one:
@@ -155,8 +155,8 @@ my %table=(
 
 # HPUX 10.X config.  Supports threads.
 "hpux10-cc",   "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O4 -z::-D_REENTRANT::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
-# If hpux10-cc fails, try this one:
-"hpux10-brokencc",     "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O4 -z::-D_REENTRANT::DES_PTR DES_UNROLL DES_RISC1:::",
+# If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG):
+"hpux10-brokencc",     "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
 
 "hpux10-gcc",  "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
 # If hpux10-gcc fails, try this one:
@@ -390,7 +390,13 @@ foreach (@ARGV)
                die "target already defined - $target\n" if ($target ne "");
                $target=$_;
                }
-       $options .= $_ unless $_ eq $target;
+       unless ($_ eq $target) {
+               if ($options eq "") {
+                       $options = $_;
+               } else {
+                       $options .= " ".$_;
+               }
+       }
 }
 
 if ($target eq "TABLE") {
@@ -682,6 +688,14 @@ print "BF_PTR2 used\n" if $bf_ptr == 2;
 if($IsWindows) {
        open (OUT,">crypto/date.h") || die "Can't open date.h";
        printf OUT "#define DATE \"%s\"\n", scalar gmtime();
+       printf OUT <<EOF; # Kludge -- usually those are passed on the command line
+#ifndef CFLAGS
+#define CFLAGS "$cc $cflags"
+#endif
+#ifndef PLATFORM
+#define PLATFORM "$target"
+#endif
+EOF
        close(OUT);
        system "perl crypto/objects/obj_dat.pl <crypto/objects/objects.h >crypto/objects/obj_dat.h";
 } else {