X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configure;h=b7f910f2848e6a29cb02b5fce9a9d5e95a0d5600;hp=d70667709f36e096d223456d90a2a41894519e35;hb=31ff97b28a7d9c64192b8987b204ad9820c7b2c7;hpb=f020bef164824af5365a5214294a7b28bc0818b4 diff --git a/Configure b/Configure index d70667709f..b7f910f284 100755 --- a/Configure +++ b/Configure @@ -93,7 +93,7 @@ my %table=( # Our development configs "purify", "purify gcc:-g -DPURIFY -Wall:(unknown):-lsocket -lnsl::::", "debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:(unknown):-lefence::::", -"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -pedantic -Wall -Wshadow -Werror -pipe:(unknown):::::", +"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -DPEDANTIC -O2 -pedantic -Wall -Wshadow -Werror -pipe:(unknown):::::", "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", @@ -108,6 +108,7 @@ my %table=( "solaris-sparc-gcc","gcc:-O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8.o::", "solaris-usparc-gcc","gcc:-O3 -fomit-frame-pointer -mcpu=ultrasparc -Wall -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus-gcc.o::", "debug-solaris-sparc-gcc","gcc:-O3 -g -mv8 -Wall -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:::", +"debug-solaris-usparc-gcc","gcc:-O3 -g -mcpu=ultrasparc -Wall -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL BF_PTR:asm/sparcv8plus-gcc.o::", # DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests "solaris-sparc-cc","cc:-fast -O -Xa -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_UNROLL BF_PTR:::", @@ -239,6 +240,7 @@ my %table=( # CygWin32 "CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:", +"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:(unknown):BN_LLONG $x86_gcc_des $x86_gcc_opts:", # Ultrix from Bernhard Simon "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN:(unknown)::::::", @@ -255,7 +257,7 @@ my %table=( ); my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32 - BC-16 CygWin32); + BC-16 CygWin32 Mingw32); my $prefix=""; my $openssldir=""; @@ -296,6 +298,7 @@ my $flags=""; my $depflags=""; my $libs=""; my $target=""; +my $options=""; foreach (@ARGV) { if (/^no-asm$/) @@ -319,7 +322,7 @@ foreach (@ARGV) $libs.= "-lRSAglue -lrsaref "; $flags.= "-DRSAref "; } - elsif (/^-/) + elsif (/^[-+]/) { if (/^-[lL](.*)$/) { @@ -347,15 +350,17 @@ foreach (@ARGV) exit(1); } } - elsif ($_ =~ /^([^:]+):(.+)$/) { + elsif ($_ =~ /^([^:]+):(.+)$/) + { eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string $target=$1; - } + } else { die "target already defined - $target\n" if ($target ne ""); $target=$_; } + $options .= $_ unless $_ eq $target; } &usage if (!defined($table{$target})); @@ -475,6 +480,7 @@ while () s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/; s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/; s/^PLATFORM=.*$/PLATFORM=$target/; + s/^OPTIONS=.*$/OPTIONS=$options/; s/^CC=.*$/CC= $cc/; s/^CFLAG=.*$/CFLAG= $cflags/; s/^DEPFLAG=.*$/DEPFLAG= $depflags/; @@ -634,15 +640,13 @@ if($IsWindows) { open (OUT,">crypto/date.h") || die "Can't open date.h"; printf OUT "#define DATE \"%s\"\n", scalar gmtime(); close(OUT); + system "perl crypto/objects/obj_dat.pl crypto/objects/obj_dat.h"; } else { (system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?; (system 'make depend') == 0 or exit $? if $depflags ne ""; &dofile("tools/c_rehash",$openssldir,'^DIR=', 'DIR=%s',); - &dofile("util/mk1mf.pl",$openssldir, - ('^\$INSTALLTOP=','$INSTALLTOP="%s";',)); } - my $pwd; if($IsWindows) { @@ -727,7 +731,7 @@ sub dofile my $f; my $p; my %m; my @a; my $k; my $ff; ($f,$p,%m)=@_; - open(IN,"<$f") || die "unable to open $f:$!\n"; + open(IN,"<$f.in") || open(IN,"<$f") || die "unable to open $f:$!\n"; @a=; close(IN); foreach $k (keys %m) @@ -738,6 +742,6 @@ sub dofile open(OUT,">$ff.new") || die "unable to open $f:$!\n"; print OUT @a; close(OUT); - rename($f,"$ff.bak") || die "unable to rename $f\n"; + rename($f,"$ff.bak") || die "unable to rename $f\n" if -e $f; rename("$ff.new",$f) || die "unable to rename $ff.new\n"; }