Avoid error message about missing gcc.
[openssl.git] / Configure
index 51e4b83f9264b60ca60e4a86e96dbd7d9ff3a939..5e78dd11a7cc541b186fae90ea230b804a06372b 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -82,7 +82,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-ben",   "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -Wall -Wshadow -Werror:::::",
+"debug-ben",   "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -Wall -Wshadow -Werror -pipe:::::",
 "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "dist",                "cc:-O -DNOPROTO::::",
 
@@ -105,6 +105,8 @@ my %table=(
 "solaris-usparc-sc4","cc:-xtarget=ultra -xarch=v8plus -Xa -xO5 -DB_ENDIAN:\
        -lsocket -lnsl:\
        BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparc.o::",
+"solaris-sparc-sc4-pic","cc:-xO5 -Xa -DB_ENDIAN -KPIC:-lsocket -lnsl:\
+       BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparc.o::",
 
 # Sunos configs, assuming sparc for the gcc one.
 "sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::DES_UNROLL:::",
@@ -149,15 +151,15 @@ my %table=(
 "linux-elf",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "debug-linux-elf","gcc:-DREF_CHECK -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall:-lefence:BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "linux-aout",  "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
-"linux-mips",    "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
--Wuninitialized:::BN_LLONG:",
+"linux-mips",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wuninitialized::BN_LLONG:::",
+"linux-ppc",    "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::::",
 "NetBSD-sparc",        "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
 "NetBSD-m68",  "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
 "NetBSD-x86",  "gcc:-DTERMIOS -D_ANSI_SOURCE -O3 -fomit-frame-pointer -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:",
 #"FreeBSD",   "gcc:-DTERMIOS -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
 "FreeBSD",      "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm",
 "FreeBSD-elf",  "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
-#"bsdi-gcc",     "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::RSA_LLONG $x86_gc_des $x86_gcc_opts:$x86_bsdi_asm",
+"bsdi-gcc",     "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::RSA_LLONG $x86_gcc_des $x86_gcc_opts:$x86_bsdi_asm",
 "nextstep",    "cc:-O3 -Wall::BN_LLONG $x86_gcc_des ${x86_gcc_opts}:::",
 # NCR MP-RAS UNIX ver 02.03.01
 "ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw:-lsocket -lnsl:$x86_gcc_des ${x86_gcc_opts}:::",
@@ -270,6 +272,12 @@ my $rc5_enc="rc5_enc.o";
 my $md5_obj="";
 my $sha1_obj="";
 my $rmd160_obj="";
+my $processor="";
+my $ranlib;
+my $perl;
+
+$ranlib=&which("ranlib") or $ranlib="true";
+$perl=&which("perl5") or $perl=&which("perl");
 
 if ($#ARGV < 0)
        {
@@ -284,6 +292,8 @@ foreach (@ARGV)
        {
        if ($_ =~ /^no-asm$/)
                { $no_asm=1; }
+       elsif ($_ =~ /^386$/)
+               { $processor=386; }
        elsif ($_ =~ /^-/)
                {
                if ($_ =~ /^-[lL](.*)$/)
@@ -387,6 +397,9 @@ while (<IN>)
        s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/;
        s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
        s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
+       s/^PROCESSOR=.*/PROCESSOR= $processor/;
+       s/^RANLIB=.*/RANLIB= $ranlib/;
+       s/^PERL=.*/PERL= $perl/;
        print OUT $_."\n";
        }
 close(IN);
@@ -404,6 +417,9 @@ print "RC5_ENC       =$rc5_obj\n";
 print "MD5_OBJ_ASM   =$md5_obj\n";
 print "SHA1_OBJ_ASM  =$sha1_obj\n";
 print "RMD160_OBJ_ASM=$rmd160_obj\n";
+print "PROCESSOR     =$processor\n";
+print "RANLIB        =$ranlib\n";
+print "PERL          =$perl\n";
 
 my $des_ptr=0;
 my $des_risc1=0;
@@ -676,7 +692,7 @@ print "RC2 uses u$type[$rc2_int]\n" if $rc2_int != $def_int;
 print "BF_PTR used\n" if $bf_ptr == 1; 
 print "BF_PTR2 used\n" if $bf_ptr == 2; 
 
-system 'make links' if !$IsWindows;
+system 'make -f Makefile.ssl links' if !$IsWindows;
 
 exit(0);
 
@@ -706,3 +722,17 @@ sub Rename
 
 sub file_new { my($a)=@_; $a =~ s/(\.[^.]+$|$)/.new/; $a; }
 sub file_old { my($a)=@_; $a =~ s/(\.[^.]+$|$)/.old/; $a; }
+
+sub which
+       {
+       my($name)=@_;
+       my $path;
+       foreach $path (split /:/, $ENV{PATH})
+               {
+               if (-x "$path/$name")
+                       {
+                       return "$path/$name";
+                       }
+               }
+       }
+