summaryrefslogtreecommitdiffstats
path: root/Configurations/00-base-templates.conf
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-27 11:37:33 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-02 19:15:42 +0100
commit98fdbce09144a8addc6682a0ffd8ac92b2ce70b1 (patch)
tree35c5da21605d51543ea872ea5a7237e375f17fdf /Configurations/00-base-templates.conf
parentd2b2221a04053578911d34a45026543e4c39ce0c (diff)
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>
Diffstat (limited to 'Configurations/00-base-templates.conf')
-rw-r--r--Configurations/00-base-templates.conf47
1 files changed, 47 insertions, 0 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf
index 3424f12089..60cd90eec1 100644
--- a/Configurations/00-base-templates.conf
+++ b/Configurations/00-base-templates.conf
@@ -45,12 +45,37 @@
},
BASE_common => {
+ template => 1,
+ defines =>
+ [ sub {
+ unless ($disabled{zlib}) {
+ if (defined($disabled{"zlib-dynamic"})) {
+ return "ZLIB";
+ } else {
+ return "ZLIB_SHARED";
+ }
+ }
+ return (); }
+ ],
},
BASE_unix => {
inherit_from => [ "BASE_common" ],
template => 1,
+ ex_libs =>
+ sub {
+ unless ($disabled{zlib}) {
+ if (defined($disabled{"zlib-dynamic"})) {
+ if (defined($withargs{zlib_lib})) {
+ return "-L".$withargs{zlib_lib}." -lz";
+ } else {
+ return "-lz";
+ }
+ }
+ }
+ return (); },
+
build_scheme => "unixmake",
build_file => "Makefile",
},
@@ -59,6 +84,15 @@
inherit_from => [ "BASE_common" ],
template => 1,
+ ex_libs =>
+ sub {
+ unless ($disabled{zlib}) {
+ if (defined($disabled{"zlib-dynamic"})) {
+ return "zlib1.lib";
+ }
+ }
+ return (); },
+
build_scheme => [ "mk1mf" ],
},
@@ -66,6 +100,19 @@
inherit_from => [ "BASE_common" ],
template => 1,
+ ex_libs =>
+ sub {
+ unless ($disabled{zlib}) {
+ if (defined($disabled{"zlib-dynamic"})) {
+ if (defined($withargs{zlib_lib})) {
+ return $withargs{zlib_lib}.'GNV$LIBZSHR.EXE/SHARED'
+ } else {
+ return 'GNV$LIBZSHR/SHARE';
+ }
+ }
+ }
+ return (); },
+
build_file => "descrip.mms",
build_scheme => [ "unified", "VMS" ],
},