Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1603438 - Fix native tools build failure due to lack of zlib incl…
…ude dir if external r=jcj

Add ZLIB_INCLUDE_DIR variable

On Linux platform[1], the build system forces to use zlib from the
system instead of compiling the one located intree.

The following error is raised when the zlib header is installed
somewhere else than in the default system include path:

	ssl3con.c:39:18: fatal error: zlib.h: No such file or directory
	 #include "zlib.h"

The same trick setup for sqlite include directory is reproduced for
zlib. The build system disallows in any manner to give arguments to the
compiler explicity.

The variable ZLIB_INCLUDE_DIR point to the directory where the zlib
header is located.

[1]:
https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/coreconf/Linux.mk#l180
[2]:
https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/lib/softoken/manifest.mn#l17

--HG--
extra : rebase_source : c44bcaeb505ac2df346e2f9886a3f6d0d9e4c43c
extra : amend_source : a9cb45d7e7d48c1993b4eedceb4220865b9c2b13
  • Loading branch information
giuliobenetti committed Jan 7, 2020
1 parent 7755a62 commit 81f2cb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/signtool/manifest.mn
Expand Up @@ -6,6 +6,10 @@ CORE_DEPTH = ../..

MODULE = nss

ifdef ZLIB_INCLUDE_DIR
INCLUDES += -I$(ZLIB_INCLUDE_DIR)
endif

EXPORTS =

CSRCS = signtool.c \
Expand Down
4 changes: 4 additions & 0 deletions lib/ssl/manifest.mn
Expand Up @@ -5,6 +5,10 @@ CORE_DEPTH = ../..

# DEFINES = -DTRACE

ifdef ZLIB_INCLUDE_DIR
INCLUDES += -I$(ZLIB_INCLUDE_DIR)
endif

EXPORTS = \
ssl.h \
sslt.h \
Expand Down

0 comments on commit 81f2cb6

Please sign in to comment.