Configuration: move the handling of zlib_include to config files
[openssl.git] / Configurations / 00-base-templates.conf
index 0d0f8b8a7f4a403d23a0e7a766e87d4a31aaf0a3..951aeaa599cc358cd88efb851984d952c0039aa1 100644 (file)
@@ -7,6 +7,7 @@ my %targets=(
        cppflags        => "",
        lflags          => "",
        defines         => [],
+       includes        => [],
        thread_scheme   => "(unknown)", # Assume we don't know
        thread_defines  => [],
 
@@ -70,6 +71,13 @@ my %targets=(
                 push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
                 return [ @defs ];
             },
+        includes        =>
+            sub {
+                my @incs = ();
+                push @incs, $withargs{zlib_include}
+                    if !$disabled{zlib} && $withargs{zlib_include};
+                return [ @incs ];
+            },
     },
 
     BASE_unix => {
@@ -129,6 +137,16 @@ my %targets=(
         inherit_from    => [ "BASE_common" ],
         template        => 1,
 
+        includes        =>
+            add(sub {
+                    my @incs = ();
+                    # GNV$ZLIB_INCLUDE is the standard logical name for later
+                    # zlib incarnations.
+                    push @incs, 'GNV$ZLIB_INCLUDE:'
+                        if !$disabled{zlib} && !$withargs{zlib_include};
+                    return [ @incs ];
+                }),
+
         build_file       => "descrip.mms",
         build_scheme     => [ "unified", "VMS" ],
     },