Newer
Older
$make_targets .= " depend" if $depflags ne $default_depflags && $make_depend;
(system $make_command.$make_targets) == 0 or die "make $make_targets failed"
if ( $perl =~ m@^/@) {
&dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";', '^my \$prefix;$', 'my $prefix = "' . $prefix . '";');
&dofile("apps/CA.pl",$perl,'^#!/', '#!%s');
} else {
# No path for Perl known ...
&dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";', '^my \$prefix;$', 'my $prefix = "' . $prefix . '";');
&dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
if ($depflags ne $default_depflags && !$make_depend) {
Since you've disabled or enabled at least one algorithm, you need to do
the following before building:
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
my ($v1, $v2, $v3, $v4);
if ($version_num =~ /(^[0-9a-f]{1})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i) {
$v1=hex $1;
$v2=hex $2;
$v3=hex $3;
$v4=hex $4;
}
open (OUT,">ms/version32.rc") || die "Can't open ms/version32.rc";
print OUT <<EOF;
#include <winver.h>
LANGUAGE 0x09,0x01
1 VERSIONINFO
FILEVERSION $v1,$v2,$v3,$v4
PRODUCTVERSION $v1,$v2,$v3,$v4
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x01L
#else
FILEFLAGS 0x00L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
VALUE "FileDescription", "OpenSSL Shared Library\\0"
VALUE "FileVersion", "$version\\0"
#if defined(CRYPTO)
VALUE "InternalName", "libeay32\\0"
VALUE "OriginalFilename", "libeay32.dll\\0"
#elif defined(SSL)
VALUE "InternalName", "ssleay32\\0"
VALUE "OriginalFilename", "ssleay32.dll\\0"
VALUE "ProductName", "The OpenSSL Toolkit\\0"
VALUE "ProductVersion", "$version\\0"
// Optional:
//VALUE "Comments", "\\0"
VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"
//VALUE "LegalTrademarks", "\\0"
//VALUE "PrivateBuild", "\\0"
//VALUE "SpecialBuild", "\\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 0x4b0
END
END
EOF
close(OUT);
}
print <<EOF;
Configured for $target.
print <<\EOF if (!$no_threads && !$threads);
The library could not be configured for supporting multi-threaded
applications as the compiler options required on this system are not known.
See file INSTALL for details if you need multi-threading.
Richard Levitte
committed
print <<\EOF if ($no_shared_warn);
You gave the option 'shared'. Normally, that would give you shared libraries.
Unfortunately, the OpenSSL configuration doesn't include shared library support
for this platform yet, so it will pretend you gave the option 'no-shared'. If
you can inform the developpers (openssl-dev\@openssl.org) how to support shared
libraries on this platform, they will at least look at it and try their best
(but please first make sure you have tried with a current version of OpenSSL).
Richard Levitte
committed
EOF
print STDERR $usage;
print STDERR "\npick os/compiler from:\n";
next if $i =~ /^debug/;
$k += length($i) + 1;
if ($k > 78)
{
print STDERR "\n";
$k=length($i);
}
print STDERR $i . " ";
}
foreach $i (sort keys %table)
{
next if $i !~ /^debug/;
$k += length($i) + 1;
if ($k > 78)
{
print STDERR "\n";
$k=length($i);
}
print STDERR $i . " ";
print STDERR "\n\nNOTE: If in doubt, on Unix-ish systems use './config'.\n";
sub which
{
my($name)=@_;
my $path;
foreach $path (split /:/, $ENV{PATH})
{
if (-f "$path/$name$exe_ext" and -x _)
return "$path/$name$exe_ext" unless ($name eq "perl" and
system("$path/$name$exe_ext -e " . '\'exit($]<5.0);\''));
sub dofile
{
my $f; my $p; my %m; my @a; my $k; my $ff;
($f,$p,%m)=@_;
open(IN,"<$f.in") || open(IN,"<$f") || die "unable to open $f:$!\n";
@a=<IN>;
close(IN);
foreach $k (keys %m)
{
grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a);
}
open(OUT,">$f.new") || die "unable to open $f.new:$!\n";
print OUT @a;
close(OUT);
rename($f,"$f.bak") || die "unable to rename $f\n" if -e $f;
rename("$f.new",$f) || die "unable to rename $f.new\n";
sub print_table_entry
{
my $target = shift;
my $type = shift;
# Don't print the templates
return if $table{$target}->{template};
if ($type eq "TABLE") {
print <<EOF
\$cc = $table{$target}->{cc}
\$cflags = $table{$target}->{cflags}
\$debug_cflags = $table{$target}->{debug_cflags}
\$release_cflags = $table{$target}->{release_cflags}
\$unistd = $table{$target}->{unistd}
\$thread_cflag = $table{$target}->{thread_cflag}
\$sys_id = $table{$target}->{sys_id}
\$lflags = $table{$target}->{lflags}
\$debug_lflags = $table{$target}->{debug_lflags}
\$release_lflags = $table{$target}->{release_lflags}
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
\$bn_ops = $table{$target}->{bn_ops}
\$cpuid_obj = $table{$target}->{cpuid_obj}
\$bn_obj = $table{$target}->{bn_obj}
\$ec_obj = $table{$target}->{ec_obj}
\$des_obj = $table{$target}->{des_obj}
\$aes_obj = $table{$target}->{aes_obj}
\$bf_obj = $table{$target}->{bf_obj}
\$md5_obj = $table{$target}->{md5_obj}
\$sha1_obj = $table{$target}->{sha1_obj}
\$cast_obj = $table{$target}->{cast_obj}
\$rc4_obj = $table{$target}->{rc4_obj}
\$rmd160_obj = $table{$target}->{rmd160_obj}
\$rc5_obj = $table{$target}->{rc5_obj}
\$wp_obj = $table{$target}->{wp_obj}
\$cmll_obj = $table{$target}->{cmll_obj}
\$modes_obj = $table{$target}->{modes_obj}
\$engines_obj = $table{$target}->{engines_obj}
\$perlasm_scheme = $table{$target}->{perlasm_scheme}
\$dso_scheme = $table{$target}->{dso_scheme}
\$shared_target= $table{$target}->{shared_target}
\$shared_cflag = $table{$target}->{shared_cflag}
\$shared_ldflag = $table{$target}->{shared_ldflag}
\$shared_extension = $table{$target}->{shared_extension}
\$ranlib = $table{$target}->{ranlib}
\$arflags = $table{$target}->{arflags}
\$multilib = $table{$target}->{multilib}
} elsif ($type eq "HASH") {
my @sequence = (
"cc",
"cflags",
"unistd",
"thread_cflag",
"sys_id",
"lflags",
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
"bn_ops",
"cpuid_obj",
"bn_obj",
"ec_obj",
"des_obj",
"aes_obj",
"bf_obj",
"md5_obj",
"sha1_obj",
"cast_obj",
"rc4_obj",
"rmd160_obj",
"rc5_obj",
"wp_obj",
"cmll_obj",
"modes_obj",
"engines_obj",
"perlasm_scheme",
"dso_scheme",
"shared_target",
"shared_cflag",
"shared_ldflag",
"shared_extension",
"ranlib",
"arflags",
"multilib",
);
my $largest =
length((sort { length($a) <=> length($b) } @sequence)[-1]);
print " '$target' => {\n";
foreach (@sequence) {
if ($table{$target}->{$_}) {
print " '",$_,"'"," " x ($largest - length($_))," => '",$table{$target}->{$_},"',\n";
}
}
print " },\n";
}
sub test_sanity
{
my $errorcnt = 0;
print STDERR "=" x 70, "\n";
print STDERR "=== SANITY TESTING!\n";
print STDERR "=== No configuration will be done, all other arguments will be ignored!\n";
print STDERR "=" x 70, "\n";
foreach $target (sort keys %table)
{
my $pre_dso_scheme = "perlasm_scheme";
my $dso_scheme = "dso_scheme";
my $post_dso_scheme = "shared_target";
if ($table{$target}->{$pre_dso_scheme} =~ /^(beos|dl|dlfcn|win32|vms)$/)
print STDERR "SANITY ERROR: '$target' has the dso_scheme values\n";
print STDERR " in the previous field\n";
}
elsif ($table{$target}->{$post_dso_scheme} =~ /^(beos|dl|dlfcn|win32|vms)$/)
print STDERR "SANITY ERROR: '$target' has the dso_scheme values\n";
print STDERR " in the following field\n";
}
elsif ($table{$target}->{$dso_scheme} !~ /^(beos|dl|dlfcn|win32|vms|)$/)
{
$errorcnt++;
print STDERR "SANITY ERROR: '$target' has the dso_scheme field = ",$table{$target}->{$dso_scheme},"\n";
print STDERR " valid values are 'beos', 'dl', 'dlfcn', 'win32' and 'vms'\n";
}
}
print STDERR "No sanity errors detected!\n" if $errorcnt == 0;
return $errorcnt;
}