diff options
author | Richard Levitte <levitte@openssl.org> | 2016-04-12 16:35:32 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-04-13 11:36:46 +0200 |
commit | da430a5555b97cc0fe5e9bf6cfd64be98e8b5bcb (patch) | |
tree | 60f15303afa962ffa28de6e50fc4c5a1e6ccda31 | |
parent | Remake the way dynamic zlib is loaded (diff) | |
download | openssl-da430a5555b97cc0fe5e9bf6cfd64be98e8b5bcb.tar.xz openssl-da430a5555b97cc0fe5e9bf6cfd64be98e8b5bcb.zip |
Fix the handling of --with-zlib-include
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>
-rw-r--r-- | Configurations/descrip.mms.tmpl | 11 | ||||
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 5 | ||||
-rw-r--r-- | Configurations/windows-makefile.tmpl | 5 | ||||
-rwxr-xr-x | Configure | 2 |
4 files changed, 20 insertions, 3 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index c916ddccb2..85e1cd9e21 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -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:)"; } diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index af708f0e00..9054f6a863 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -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}}; diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index c67ff83af4..6a450b14de 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -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}}; @@ -672,7 +672,7 @@ foreach (@argvcopy) } elsif (/^--with-zlib-include=(.*)$/) { - $withargs{zlib_include}="-I$1"; + $withargs{zlib_include}=$1; } elsif (/^--with-fipslibdir=(.*)$/) { |