fix EC_GROUP_copy for EC_GFp_nist_method()
[openssl.git] / util / mk1mf.pl
index 18ef2f5708fceeef7e2be09a136f91654ba3f4f9..e14391164f74ed5fccd260d5cf80705fd5c08f02 100755 (executable)
@@ -65,6 +65,9 @@ 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
        gaswin                                  - Use GNU as with Mingw32
        no-socks                                - No socket code
@@ -234,6 +237,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 +279,17 @@ $defs= <<"EOF";
 # The one monster makefile better suits building in non-unix
 # environments.
 
+EOF
+
+if ($platform eq "VC-CE")
+       {
+       $defs.= <<"EOF";
+!INCLUDE <\$(WCECOMPAT)/wcedefs.mak>
+
+EOF
+       }
+
+$defs.= <<"EOF";
 INSTALLTOP=$INSTALLTOP
 
 # Set your compiler options
@@ -652,6 +669,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/;
@@ -712,6 +731,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;
@@ -914,6 +935,9 @@ 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;