Enhance EVP code to generate random symmetric keys of the
[openssl.git] / util / mk1mf.pl
index 18ef2f5708fceeef7e2be09a136f91654ba3f4f9..15813461f0767898a1cdbd06b783e4107705f796 100755 (executable)
@@ -39,6 +39,8 @@ $infile="MINFO";
        "ultrix-mips","DEC mips ultrix",
        "FreeBSD","FreeBSD distribution",
        "OS2-EMX", "EMX GCC OS/2",
+       "netware-clib", "CodeWarrior for NetWare - CLib",
+       "netware-libc", "CodeWarrior for NetWare - LibC",
        "default","cc under unix",
        );
 
@@ -65,7 +67,12 @@ and [options] can be one of
        no-krb5                                 - No KRB5
        no-ec                                   - No EC
        no-ecdsa                                - No ECDSA
+       no-ecdh                                 - No ECDH
+       no-engine                               - No engine
+       no-hw                                   - No hw
        nasm                                    - Use NASM for x86 asm
+       nw-nasm                                 - Use NASM x86 asm for NetWare
+       nw-mwasm                                        - Use Metrowerks x86 asm for NetWare
        gaswin                                  - Use GNU as with Mingw32
        no-socks                                - No socket code
        no-err                                  - No error strings
@@ -195,6 +202,11 @@ elsif ($platform eq "OS2-EMX")
        $wc=1;
        require 'OS2-EMX.pl';
        }
+elsif (($platform eq "netware-clib") || ($platform eq "netware-libc"))
+       {
+   $LIBC=1 if $platform eq "netware-libc";
+       require 'netware.pl';
+       }
 else
        {
        require "unix.pl";
@@ -219,7 +231,7 @@ $cflags.=" -DOPENSSL_NO_MD4"  if $no_md4;
 $cflags.=" -DOPENSSL_NO_MD5"  if $no_md5;
 $cflags.=" -DOPENSSL_NO_SHA"  if $no_sha;
 $cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1;
-$cflags.=" -DOPENSSL_NO_RIPEMD" if $no_rmd160;
+$cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd;
 $cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2;
 $cflags.=" -DOPENSSL_NO_BF"  if $no_bf;
 $cflags.=" -DOPENSSL_NO_CAST" if $no_cast;
@@ -234,6 +246,9 @@ $cflags.=" -DOPENSSL_NO_ERR"  if $no_err;
 $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
 $cflags.=" -DOPENSSL_NO_EC"   if $no_ec;
 $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
+$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
+$cflags.=" -DOPENSSL_NO_ENGINE"   if $no_engine;
+$cflags.=" -DOPENSSL_NO_HW"   if $no_hw;
 #$cflags.=" -DRSAref"  if $rsaref ne "";
 
 ## if ($unix)
@@ -273,6 +288,19 @@ $defs= <<"EOF";
 # The one monster makefile better suits building in non-unix
 # environments.
 
+EOF
+
+$defs .= $preamble if defined $preamble;
+
+if ($platform eq "VC-CE")
+       {
+       $defs.= <<"EOF";
+!INCLUDE <\$(WCECOMPAT)/wcedefs.mak>
+
+EOF
+       }
+
+$defs.= <<"EOF";
 INSTALLTOP=$INSTALLTOP
 
 # Set your compiler options
@@ -652,6 +680,8 @@ sub var_add
        local($dir,$val)=@_;
        local(@a,$_,$ret);
 
+       return("") if $no_engine && $dir =~ /\/engine/;
+       return("") if $no_hw   && $dir =~ /\/hw/;
        return("") if $no_idea && $dir =~ /\/idea/;
        return("") if $no_aes  && $dir =~ /\/aes/;
        return("") if $no_rc2  && $dir =~ /\/rc2/;
@@ -661,6 +691,7 @@ sub var_add
        return("") if $no_rsa  && $dir =~ /^rsaref/;
        return("") if $no_dsa  && $dir =~ /\/dsa/;
        return("") if $no_dh   && $dir =~ /\/dh/;
+       return("") if $no_ec   && $dir =~ /\/ec/;
        if ($no_des && $dir =~ /\/des/)
                {
                if ($val =~ /read_pwd/)
@@ -695,7 +726,7 @@ sub var_add
        @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2;
        @a=grep(!/(^md4)|(_md4$)/,@a) if $no_md4;
        @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5;
-       @a=grep(!/(rmd)|(ripemd)/,@a) if $no_rmd160;
+       @a=grep(!/(rmd)|(ripemd)/,@a) if $no_ripemd;
 
        @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa;
        @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa;
@@ -712,6 +743,8 @@ sub var_add
        @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1;
        @a=grep(!/_mdc2$/,@a) if $no_mdc2;
 
+       @a=grep(!/^engine$/,@a) if $no_engine;
+       @a=grep(!/^hw$/,@a) if $no_hw;
        @a=grep(!/(^rsa$)|(^genrsa$)/,@a) if $no_rsa;
        @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa;
        @a=grep(!/^gendsa$/,@a) if $no_sha1;
@@ -906,6 +939,8 @@ sub read_options
        elsif (/^no-aes$/)      { $no_aes=1; }
        elsif (/^no-asm$/)      { $no_asm=1; }
        elsif (/^nasm$/)        { $nasm=1; }
+       elsif (/^nw-nasm$/)     { $nw_nasm=1; }
+       elsif (/^nw-mwasm$/)    { $nw_mwasm=1; }
        elsif (/^gaswin$/)      { $gaswin=1; }
        elsif (/^no-ssl2$/)     { $no_ssl2=1; }
        elsif (/^no-ssl3$/)     { $no_ssl3=1; }
@@ -914,10 +949,13 @@ sub read_options
        elsif (/^no-krb5$/)     { $no_krb5=1; }
        elsif (/^no-ec$/)       { $no_ec=1; }
        elsif (/^no-ecdsa$/)    { $no_ecdsa=1; }
+       elsif (/^no-ecdh$/)     { $no_ecdh=1; }
+       elsif (/^no-engine$/)   { $no_engine=1; }
+       elsif (/^no-hw$/)       { $no_hw=1; }
 
        elsif (/^just-ssl$/)    { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1;
                                  $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1;
-                                 $no_ssl2=$no_err=$no_rmd160=$no_rc5=1;
+                                 $no_ssl2=$no_err=$no_ripemd=$no_rc5=1;
                                  $no_aes=1; }
 
        elsif (/^rsaref$/)      { }