Configure - move the addition of the zlib / libz lib to configs Configure had the Unix centric addition of -lz when linking with zlib is enabled, which doesn't work on other platforms. Therefore, we move it to the BASE_unix config template and add corresponding ones in the other BASE_* config templates. The Windows one is probably incomplete, but that doesn't matter for the moment, as mk1mf does it's own thing anyway. This required making the %withargs table global, so perl snippets in the configs can use it. Reviewed-by: Andy Polyakov <appro@openssl.org>
diff --git a/Configure b/Configure index 9226b90..57a57bd 100755 --- a/Configure +++ b/Configure
@@ -138,6 +138,7 @@ our %table = (); our %config = (); +our %withargs = (); # Forward declarations ############################################### @@ -437,7 +438,6 @@ my $libs=""; my $target=""; $config{options}=""; -my %withargs=(); my $build_prefix = "release_"; my @argvcopy=@ARGV; @@ -980,26 +980,6 @@ push @{$config{openssl_thread_defines}}, @thread_defines; } -unless ($disabled{zlib}) - { - push @{$config{defines}}, "ZLIB"; - if (defined($disabled{"zlib-dynamic"})) - { - if (defined($withargs{zlib_lib})) - { - $config{ex_libs} .= " -L" . $withargs{zlib_lib} . " -lz"; - } - else - { - $config{ex_libs} .= " -lz"; - } - } - else - { - push @{$config{defines}}, "ZLIB_SHARED"; - } - } - # With "deprecated" disable all deprecated features. if (defined($disabled{"deprecated"})) { $config{api} = $maxapi;