Fix the handling of --with-zlib-include
authorRichard Levitte <levitte@openssl.org>
Tue, 12 Apr 2016 14:35:32 +0000 (16:35 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 13 Apr 2016 09:36:46 +0000 (11:36 +0200)
The handling was Unix centric, already in Configure.  Change that to
just collect the value and let the build file templates figure out
what to do with it.

Reviewed-by: Matt Caswell <matt@openssl.org>
Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configurations/windows-makefile.tmpl
Configure

index c916ddccb2a452135417f1d0a478ffd18757650f..85e1cd9e21ae031d2ca94de78b8affc7ef2b1023 100644 (file)
@@ -468,13 +468,20 @@ EOF
       my $incs_on = "\@ !";
       my $incs_off = "\@ !";
       my $incs = "";
-      if (@{$args{incs}}) {
+      my @incs = ();
+      push @incs, @{$args{incs}} if @{$args{incs}};
+      unless ($disabled{zlib}) {
+          # GNV$ZLIB_INCLUDE is the standard logical name for later zlib
+          # incarnations.
+          push @incs, ($withargs{zlib_include} || 'GNV$ZLIB_INCLUDE:');
+      }
+      if (@incs) {
           $incs_on =
               "DEFINE tmp_includes "
               .join(",-\n\t\t\t", map {
                                       file_name_is_absolute($_)
                                       ? $_ : catdir($backward,$_)
-                                  } @{$args{incs}});
+                                  } @incs);
           $incs_off = "DEASSIGN tmp_includes";
           $incs = " /INCLUDE=(tmp_includes:)";
       }
index af708f0e00cb9eb73fa3e632b1b0716f34a4b7b2..9054f6a863d66f76d876beaf5c688ca35f5d8923 100644 (file)
@@ -860,6 +860,11 @@ EOF
       my $srcs = join(" ",  @srcs);
       my $deps = join(" ", @srcs, @{$args{deps}});
       my $incs = join("", map { " -I".$_ } @{$args{incs}});
+      unless ($disabled{zlib}) {
+          if ($withargs{zlib_include}) {
+              $incs .= " -I".$withargs{zlib_include};
+          }
+      }
       my $ecflags = { lib => '$(LIB_CFLAGS)',
                       dso => '$(DSO_CFLAGS)',
                       bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
index c67ff83af4938f61d1d5600f4b4661b66534ce17..6a450b14de5a350726b6afb08d730092bf419b2b 100644 (file)
@@ -300,6 +300,11 @@ EOF
      my $srcs = join(" ",  @srcs);
      my $deps = join(" ", @srcs, @{$args{deps}});
      my $incs = join("", map { " /I ".$_ } @{$args{incs}});
+     unless ($disabled{zlib}) {
+         if ($withargs{zlib_include}) {
+             $incs .= " /I ".$withargs{zlib_include};
+         }
+     }
      my $ecflags = { lib => '$(LIB_CFLAGS)',
                     dso => '$(DSO_CFLAGS)',
                     bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
index 8e42ebf170193a21bfc609a80ecdedd5ebae4842..4e0e34298c76d4c413e5cd278f6e19b0f4d6e5e8 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -672,7 +672,7 @@ foreach (@argvcopy)
                        }
                elsif (/^--with-zlib-include=(.*)$/)
                        {
-                       $withargs{zlib_include}="-I$1";
+                       $withargs{zlib_include}=$1;
                        }
                elsif (/^--with-fipslibdir=(.*)$/)
                        {