提交 085ed4f1 编写于 作者: R Richard Levitte

Stop having Unix defaults in Configure (partial)

Default values belong in the DEFAULT config target template, in
Configurations/00-base-templates.conf.

This isn't a complete move, but takes care of the most blatant
examples.
Reviewed-by: NTim Hudson <tjh@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5177)
上级 5b18235a
...@@ -38,6 +38,8 @@ my %targets=( ...@@ -38,6 +38,8 @@ my %targets=(
shared_rcflag => "", shared_rcflag => "",
shared_extension => "", shared_extension => "",
hashbangperl => "PERL", # Only Unix actually cares
build_scheme => [ "unified", "unix" ], build_scheme => [ "unified", "unix" ],
build_file => "Makefile", build_file => "Makefile",
}, },
...@@ -61,12 +63,19 @@ my %targets=( ...@@ -61,12 +63,19 @@ my %targets=(
inherit_from => [ "BASE_common" ], inherit_from => [ "BASE_common" ],
template => 1, template => 1,
ar => "ar",
arflags => "r",
cc => "cc",
lflags => lflags =>
sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () }, sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
ex_libs => ex_libs =>
sub { !defined($disabled{zlib}) sub { !defined($disabled{zlib})
&& defined($disabled{"zlib-dynamic"}) && defined($disabled{"zlib-dynamic"})
? "-lz" : () }, ? "-lz" : () },
hashbangperl => "/usr/bin/env perl", # Only Unix actually cares
ranlib => sub { which("$config{cross_compile_prefix}ranlib") ?
"\$(CROSS_COMPILE)ranlib" : "true"; },
rc => "windres",
build_scheme => [ "unified", "unix" ], build_scheme => [ "unified", "unix" ],
build_file => "Makefile", build_file => "Makefile",
......
...@@ -576,16 +576,6 @@ my %user_to_target = ( ...@@ -576,16 +576,6 @@ my %user_to_target = (
LDFLAGS => 'lflags', LDFLAGS => 'lflags',
LDLIBS => 'ex_libs', LDLIBS => 'ex_libs',
); );
my %user_defaults = (
AR => 'ar',
ARFLAGS => [ 'r' ],
CC => 'cc',
CXX => 'c++',
HASHBANGPERL=> '/usr/bin/env perl', # Only Unix actually cares
RANLIB => sub { which("$config{cross_compile_prefix}ranlib") ?
"\$(CROSS_COMPILE)ranlib" : "true"; },
RC => 'windres',
);
$config{openssl_api_defines}=[]; $config{openssl_api_defines}=[];
$config{openssl_algorithm_defines}=[]; $config{openssl_algorithm_defines}=[];
...@@ -1158,8 +1148,6 @@ foreach (keys %user) { ...@@ -1158,8 +1148,6 @@ foreach (keys %user) {
$config{$target_key} = $config{$target_key} =
$mkvalue->($ref_type, $user{$_}) $mkvalue->($ref_type, $user{$_})
|| $mkvalue->($ref_type, $target{$target_key}); || $mkvalue->($ref_type, $target{$target_key});
$config{$target_key} ||=$mkvalue->($ref_type, $user_defaults{$_})
if exists $user_defaults{$_};
if (defined $useradd{$_} && @{$useradd{$_}}) { if (defined $useradd{$_} && @{$useradd{$_}}) {
if (defined $config{$target_key}) { if (defined $config{$target_key}) {
push @{$config{$target_key}}, @{$useradd{$_}}; push @{$config{$target_key}}, @{$useradd{$_}};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册