Add new function, EVP_MD_CTX_copy() to replace frequent use of memcpy.
[openssl.git] / Configure
index 6098af778560aa3dd5571cf5ccd02fcbf89d8255..79edba214ccbd820a65a4a68f4c6e45574f8e73a 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1,6 +1,8 @@
 #!/usr/local/bin/perl -w
 
+require 5.000;
 use strict;
+use POSIX qw(:errno_h);
 
 #
 # see PROBLEMS for instructions on what sort of things to do when 
@@ -76,7 +78,7 @@ my %table=(
 # A few of my development configs
 "purify",      "purify gcc:-g -DPURIFY -Wall:-lsocket -lnsl::::",
 "debug",       "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:-lefence::::",
-"debug-rse","gcc:-DTERMIOS -DL_ENDIAN -DREF_CHECK -DCRYPTO_MDEBUG -g -ggdb3 -Wall:::::",
+"debug-rse","gcc:-DTERMIOS -DL_ENDIAN -O -g -ggdb3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
 "dist",                "cc:-O -DNOPROTO::::",
 
 # Basic configs that should work on any box
@@ -198,9 +200,8 @@ my %table=(
 
 # Windows NT, Microsoft Visual C++ 4.0
 
-# hmm... bug in perl under NT, I need to concatinate :-(
-"VC-NT","cl:::BN_LLONG RC4_INDEX ".$x86_gcc_opts.":::",
-"VC-WIN32","cl:::BN_LLONG RC4_INDEX ".$x86_gcc_opts.":::",
+"VC-NT","cl:::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::",
+"VC-WIN32","cl:::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::",
 "VC-WIN16","cl:::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
 "VC-W31-16","cl:::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 "VC-W31-32","cl:::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
@@ -210,6 +211,9 @@ my %table=(
 "BC-32","bcc32:::DES_PTR RC4_INDEX:::",
 "BC-16","bcc:::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
 
+# CygWin32
+"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:",
+
 # Our old Ultrix box :-). -O2 breaks some of the bignum stuff (now fixed,
 # it is a compiler bug, look in bug/ultrixcc.c for example code.
 "ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN:::asm/mips1.o:::",
@@ -268,7 +272,7 @@ foreach (@ARGV)
                        }
                else
                        {
-                       die "unknown options, only -Dxxx, -Lxxx -lxxx supported\n";
+                       die "unknown options, only -Dxxx, -Lxxx and -lxxx supported\n";
                        }
                }
        else
@@ -326,9 +330,8 @@ if ($rmd160_obj =~ /\.o$/)
        $cflags.=" -DRMD160_ASM";
        }
 
-my $n=&file_new($Makefile);
-open(IN,"<".$Makefile) || die "unable to read $Makefile:$!\n";
-open(OUT,">".$n) || die "unable to read $n:$!\n";
+open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
+open(OUT,">$Makefile") || die "unable to create $Makefile:$!\n";
 while (<IN>)
        {
        chop;
@@ -349,8 +352,7 @@ while (<IN>)
        }
 close(IN);
 close(OUT);
-&Rename($Makefile,&file_old($Makefile));
-&Rename($n,$Makefile);
+
 print "CC            =$cc\n";
 print "CFLAG         =$cflags\n";
 print "EX_LIBS       =$lflags\n";
@@ -408,7 +410,7 @@ foreach (sort split(/\s+/,$bn_ops))
        }
 
 ((my $in=$bn) =~ s/\.([^.]+)/.$postfix/);
-$n=&file_new($bn);
+my $n=&file_new($bn);
 open(IN,"<".$in) || die "unable to read $bn:$!\n";
 open(OUT,">$n") || die "unable to read $n:$!\n";
 while (<IN>)
@@ -610,7 +612,10 @@ sub Rename
        my($from,$to)=@_;
 
        unlink($to);
-       rename($from,$to) || die "unable to rename $from to $to:$!\n";
+       if(!rename($from,$to))
+           {
+           POSIX::errno() == POSIX::ENOENT || die "unable to rename $from to $to:$!\n";
+           }
        }
 
 sub file_new { local($a)=@_; $a =~ s/(\.[^.]+$|$)/.new/; $a; }