Separate general linking flags from extra libraries
[openssl.git] / Configurations / 00-base-templates.conf
index ce59fbf2963e7da57e8a9f412907a79de06416d2..f1539929ef5fa12b69a94fe1900a5e213d151bfc 100644 (file)
@@ -59,18 +59,12 @@ my %targets=(
         inherit_from    => [ "BASE_common" ],
         template        => 1,
 
+        lflags          =>
+            sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
         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 (); },
+            sub { !defined($disabled{zlib})
+                  && defined($disabled{"zlib-dynamic"})
+                  ? "-lz" : () },
 
         build_scheme    => [ "unified", "unix" ],
         build_file      => "Makefile",