$vc_win64a_info = { as => "nasm",
asflags => "-f win64 -DNEAR -Ox -g",
asoutflag => "-o" };
- } else {
+ } elsif ($disabled{asm}) {
$vc_win64a_info = { as => "ml64",
asflags => "/c /Cp /Cx /Zi",
asoutflag => "/Fo" };
+ } else {
+ die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
}
}
return $vc_win64a_info;
}
+my $vc_win32_info = {};
+sub vc_win32_info {
+ unless (%$vc_win32_info) {
+ my $ver=`nasm -v 2>NUL`;
+ my $vew=`nasmw -v 2>NUL`;
+ if ($ver ne "" || $vew ne "") {
+ $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw",
+ asflags => "-f win32",
+ asoutflag => "-o",
+ perlasm_scheme => "win32n" };
+ } elsif ($disabled{asm}) {
+ $vc_win32_info = { as => "ml",
+ asflags => "/nologo /Cp /coff /c /Cx /Zi",
+ asoutflag => "/Fo",
+ perlasm_scheme => "win32" };
+ } else {
+ die "NASM not found - please read INSTALL and NOTES.WIN for further details\n";
+ }
+ }
+ return $vc_win32_info;
+}
+
my $vc_wince_info = {};
sub vc_wince_info {
unless (%$vc_wince_info) {
my $vms_info = {};
sub vms_info {
unless (%$vms_info) {
- $vms_info->{disable_warns} = [ ];
- $vms_info->{disable_warns_p32} = [ ];
- $vms_info->{disable_warns_p64} = [ ];
- `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
- if ($? == 0) {
- push @{$vms_info->{disable_warns_p64}}, "MAYLOSEDATA3";
- }
+ my $pointer_size = shift;
+ my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size";
+
+ $vms_info->{disable_warns} = [ ];
+ if ($pointer_size == 64) {
+ `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`;
+ if ($? == 0) {
+ push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3";
+ }
+ }
+
+ unless ($disabled{zlib}) {
+ my $default_zlib = 'GNV$LIBZSHR' . $pointer_size_str;
+ if (defined($disabled{"zlib-dynamic"})) {
+ $vms_info->{zlib} = $withargs{zlib_lib} || "$default_zlib/SHARE";
+ } else {
+ $vms_info->{def_zlib} = $withargs{zlib_lib} || $default_zlib;
+ # In case the --with-zlib-lib value contains something like
+ # /SHARE or /LIB or so at the end, remove it.
+ $vms_info->{def_zlib} =~ s|/.*$||g;
+ }
+ }
}
return $vms_info;
}
template => 1,
cc => "cl",
cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
+ defines => add(sub { my @defs = ();
+ unless ($disabled{"zlib-dynamic"}) {
+ push @defs,
+ quotify("perl",
+ 'LIBZ="' . $withargs{zlib_lib} . '"');
+ }
+ return [ @defs ];
+ }),
coutflag => "/Fo",
rc => "rc",
rcoutflag => "/fo",
release => sub { $disabled{shared} ? "/MT" : () },
)),
bin_lflags => add("/subsystem:console /opt:ref"),
- ex_libs => sub {
+ ex_libs => add(sub {
my @ex_libs = ();
push @ex_libs, 'ws2_32.lib' unless $disabled{sock};
push @ex_libs, 'gdi32.lib advapi32.lib crypt32.lib user32.lib';
return join(" ", @ex_libs);
- },
+ }),
},
"VC-WIN64-common" => {
inherit_from => [ "VC-noCE-common" ],
- ex_libs => sub {
+ ex_libs => add(sub {
my @ex_libs = ();
push @ex_libs, 'bufferoverflowu.lib' if (`cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
return join(" ", @_, @ex_libs);
- },
+ }),
bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
build_scheme => add("VC-W64", { separator => undef }),
},
# configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
inherit_from => [ "VC-noCE-common", asm("x86_asm"),
sub { $disabled{shared} ? () : "uplink_common" } ],
- as => sub { my $ver=`nasm -v 2>NUL`;
- my $vew=`nasmw -v 2>NUL`;
- return $ver ge $vew ? "nasm" : "nasmw" },
- asflags => "-f win32",
- asoutflag => "-o",
- ex_libs => sub {
+ as => sub { vc_win32_info()->{as} },
+ asflags => sub { vc_win32_info()->{asflags} },
+ asoutflag => sub { vc_win32_info()->{asoutflag} },
+ ex_libs => add(sub {
my @ex_libs = ();
# WIN32 UNICODE build gets linked with unicows.lib for
# backward compatibility with Win9x.
push @ex_libs, 'unicows.lib'
if (grep { $_ eq "UNICODE" } @user_defines);
return join(" ", @ex_libs, @_);
- },
+ }),
sys_id => "WIN32",
bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
- perlasm_scheme => "win32n",
+ perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
build_scheme => add("VC-W32", { separator => undef }),
},
"VC-CE" => {
? "/entry:mainCRTstartup" : (); }),
sys_id => "WINCE",
bn_ops => "BN_LLONG EXPORT_VAR_AS_FN",
- ex_libs => sub {
+ ex_libs => add(sub {
my @ex_libs = ();
push @ex_libs, 'ws2.lib' unless $disabled{sock};
push @ex_libs, 'crypt32.lib';
push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
if ($ENV{'TARGETCPU'} eq "X86");
return @ex_libs;
- },
+ }),
build_scheme => add("VC-WCE", { separator => undef }),
},
shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
ranlib => "$ENV{'RANLIB'}",
},
+ "haiku-common" => {
+ template => 1,
+ cc => "cc",
+ cflags => add_before(picker(default => "-DL_ENDIAN -Wall",
+ debug => "-g -O0",
+ release => "-O2"),
+ threads("-D_REENTRANT")),
+ sys_id => "HAIKU",
+ lflags => "-lnetwork",
+ perlasm_scheme => "elf",
+ thread_scheme => "pthreads",
+ dso_scheme => "dlfcn",
+ shared_target => "haiku-shared",
+ shared_cflag => "-fPIC",
+ shared_ldflag => "-shared",
+ shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ },
+ "haiku-x86" => {
+ inherit_from => [ "haiku-common", asm("x86_elf_asm") ],
+ cflags => add(picker(default => "",
+ release => "-fomit-frame-pointer")),
+ bn_ops => "BN_LLONG",
+ },
+ # Haiku builds with no-asm
+ "haiku-x86_64" => {
+ inherit_from => [ "haiku-common", asm("x86_64_asm") ],
+ cflags => add("-m64"),
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
+ },
+
##### VMS
"vms-generic" => {
"vms-alpha" => {
inherit_from => [ "vms-generic" ],
cflags => add(sub { my @warnings =
- @{vms_info()->{disable_warns}};
+ @{vms_info(0)->{disable_warns}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
+ defines =>
+ add(sub {
+ return vms_info(0)->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
#as => "???",
#debug_aflags => "/NOOPTIMIZE/DEBUG",
#release_aflags => "/OPTIMIZE/NODEBUG",
bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
},
"vms-alpha-p32" => {
- inherit_from => [ "vms-alpha" ],
+ inherit_from => [ "vms-generic" ],
cflags =>
add("/POINTER_SIZE=32",
sub { my @warnings =
- @{vms_info()->{disable_warns_p32}};
+ @{vms_info(32)->{disable_warns}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info(32)->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
},
"vms-alpha-p64" => {
- inherit_from => [ "vms-alpha" ],
+ inherit_from => [ "vms-generic" ],
cflags =>
add("/POINTER_SIZE=64=ARGV",
sub { my @warnings =
- @{vms_info()->{disable_warns_p64}};
+ @{vms_info(64)->{disable_warns}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info(64)->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
},
"vms-ia64" => {
inherit_from => [ "vms-generic" ],
cflags => add(sub { my @warnings =
- @{vms_info()->{disable_warns}};
+ @{vms_info(0)->{disable_warns}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }),
+ defines =>
+ add(sub {
+ return vms_info(0)->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info(0)->{zlib} || (); }),
#as => "I4S",
#debug_aflags => "/NOOPTIMIZE/DEBUG",
#release_aflags => "/OPTIMIZE/NODEBUG",
bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR",
},
"vms-ia64-p32" => {
- inherit_from => [ "vms-ia64" ],
+ inherit_from => [ "vms-generic" ],
cflags =>
add("/POINTER_SIZE=32",
sub { my @warnings =
- @{vms_info()->{disable_warns_p32}};
+ @{vms_info(32)->{disable_warns}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info(32)->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info(32)->{zlib} || (); }),
},
"vms-ia64-p64" => {
- inherit_from => [ "vms-ia64" ],
+ inherit_from => [ "vms-generic" ],
cflags =>
add("/POINTER_SIZE=64=ARGV",
sub { my @warnings =
- @{vms_info()->{disable_warns_p64}};
+ @{vms_info(64)->{disable_warns}};
@warnings
? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : ();
} ),
- ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
+ defines =>
+ add(sub {
+ return vms_info(64)->{def_zlib}
+ ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : ();
+ }),
+ ex_libs => add(sub { return vms_info(64)->{zlib} || (); }),
},
);