use saner default parameters for scrypt
[openssl.git] / util / mk1mf.pl
index 085db5f4c5ad4bf964d0ac54705f6789373b1b34..4fb3a539f675bc919c44bc44d07ab6e8b4602b3d 100755 (executable)
@@ -53,6 +53,7 @@ my %mf_import = (
        CC             => \$mf_cc,
        CFLAG          => \$mf_cflag,
        CFLAG_Q        => \$mf_cflag_q,
+       SHARED_CFLAG   => \$mf_shared_cflag,
         DEPFLAG        => \$mf_depflag,
        CPUID_OBJ      => \$mf_cpuid_asm,
        BN_ASM         => \$mf_bn_asm,
@@ -175,8 +176,6 @@ foreach (grep(!/^$/, split(/ /, $OPTIONS)))
        print STDERR "unknown option - $_\n" if !&read_options;
        }
 
-$no_static_engine = 0 if (!$shlib);
-
 $no_mdc2=1 if ($no_des);
 
 $no_ssl3=1 if ($no_md5);
@@ -309,7 +308,7 @@ $cflags.=" -DOPENSSL_FIPS"    if $fips;
 $cflags.=" -DOPENSSL_NO_EC2M"    if $no_ec2m;
 $cflags.= " -DZLIB" if $zlib_opt;
 $cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
-$cflags.=" -DOPENSSL_PIC" if $shlib;
+$cflags.=" -DOPENSSL_PIC";
 
 if ($no_static_engine)
        {
@@ -328,7 +327,7 @@ else
        { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
 
 if ($orig_platform eq 'copy') {
-    $cflags = $mf_cflag;
+    $cflags = "$mf_cflag $mf_shared_cflag";
     $cc = $mf_cc;
 }
 
@@ -807,7 +806,7 @@ reallyclean:
 
 EOF
 
-$rules .= &do_rehash_rule("rehash.time", "certs/demo apps tools");
+$rules .= &do_rehash_rule("rehash.time", "apps tools");
 $rules .= &do_test_rule("test", "rehash.time", "run_tests.pl");
 
 $rules .= <<"EOF";
@@ -1462,11 +1461,11 @@ sub read_options
                {
                $zlib_opt = 2;
                }
-       elsif (/^no-static-engine/)
+       elsif (/^no-static-engine/ or /^enable-dynamic-engine/)
                {
                $no_static_engine = 1;
                }
-       elsif (/^enable-static-engine/)
+       elsif (/^no-dynamic-engine/ or /^enable-static-engine/)
                {
                $no_static_engine = 0;
                }
@@ -1480,18 +1479,6 @@ sub read_options
                if (exists $valid_options{$t})
                        {return 1;}
                return 0;
-               }
-       # experimental-xxx is mostly like enable-xxx, but opensslconf.v
-       # will still set OPENSSL_NO_xxx unless we set OPENSSL_EXPERIMENTAL_xxx.
-       # (No need to fail if we don't know the algorithm -- this is for adventurous users only.)
-       elsif (/^experimental-/)
-               {
-               my $algo, $ALGO;
-               ($algo = $_) =~ s/^experimental-//;
-               ($ALGO = $algo) =~ tr/[a-z]/[A-Z]/;
-
-               $xcflags="-DOPENSSL_EXPERIMENTAL_$ALGO $xcflags";
-               
                }
        elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; }
        elsif (/^-[lL].*$/)     { $l_flags.="$_ "; }