Skip to content

Commit

Permalink
Bugzilla Bug 302670: enable NSS to use system zlib and do that on Linux.
Browse files Browse the repository at this point in the history
r=nelsonb.
Modified Files:
	coreconf/Linux.mk nss/cmd/Makefile nss/cmd/manifest.mn
	nss/cmd/platlibs.mk
  • Loading branch information
wtchang%redhat.com committed Aug 16, 2005
1 parent e7e46cf commit b8f0407
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
3 changes: 3 additions & 0 deletions security/coreconf/Linux.mk
Expand Up @@ -172,3 +172,6 @@ G++INCLUDES = -I/usr/include/g++
# Always set CPU_TAG on Linux, OpenVMS, WINCE.
#
CPU_TAG = _$(CPU_ARCH)

USE_SYSTEM_ZLIB = 1
ZLIB_LIBS = -lz
4 changes: 4 additions & 0 deletions security/nss/cmd/Makefile
Expand Up @@ -42,6 +42,10 @@ DEPTH = ../..
include manifest.mn
include $(CORE_DEPTH)/coreconf/config.mk

ifndef USE_SYSTEM_ZLIB
ZLIB_SRCDIR = zlib # Add the zlib directory to DIRS.
endif

# These sources were once in this directory, but now are gone.
MISSING_SOURCES = \
addcert.c \
Expand Down
2 changes: 1 addition & 1 deletion security/nss/cmd/manifest.mn
Expand Up @@ -41,7 +41,7 @@ DEPTH = ../..
REQUIRES = nss nspr libdbm

DIRS = lib \
zlib \
$(ZLIB_SRCDIR) \
addbuiltin \
atob \
bltest \
Expand Down
27 changes: 11 additions & 16 deletions security/nss/cmd/platlibs.mk
Expand Up @@ -82,10 +82,6 @@ EXTRA_LIBS += \
wsock32.lib \
winmm.lib \
$(NULL)

JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) \
$(NULL)
else

# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
Expand Down Expand Up @@ -144,10 +140,6 @@ EXTRA_SHARED_LIBS += \
endif
endif

JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) \
$(NULL)

else # USE_STATIC_LIBS
# can't do this in manifest.mn because OS_ARCH isn't defined there.
ifeq ($(OS_ARCH), WINNT)
Expand All @@ -168,10 +160,6 @@ EXTRA_LIBS += \
wsock32.lib \
winmm.lib \
$(NULL)

JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) \
$(NULL)
else

# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
Expand Down Expand Up @@ -227,10 +215,17 @@ EXTRA_SHARED_LIBS += \
-lplds4 \
-lnspr4 \
$(NULL)

JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) \
$(NULL)
endif

endif # USE_STATIC_LIBS

# If a platform has a system zlib, set USE_SYSTEM_ZLIB to 1 and
# ZLIB_LIBS to the linker command-line arguments for the system zlib
# (for example, -lz) in the platform's config file in coreconf.
ifndef USE_SYSTEM_ZLIB
ZLIB_LIBS = $(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX)
endif

JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) \
$(ZLIB_LIBS) \
$(NULL)

0 comments on commit b8f0407

Please sign in to comment.