summaryrefslogtreecommitdiff
path: root/cmd/platlibs.mk
diff options
context:
space:
mode:
authorElio Maldonado <emaldona@redhat.com>2013-04-09 22:37:08 -0700
committerElio Maldonado <emaldona@redhat.com>2013-04-09 22:37:08 -0700
commitf5751eef41594717893f21834cb1ba1c225886f5 (patch)
tree5d4054f094dd6487440a4da612cbd8ace5e69a89 /cmd/platlibs.mk
parent05eb18708b148d874d8aa6dd9a0eb5a5bf25b50f (diff)
downloadnss-hg-f5751eef41594717893f21834cb1ba1c225886f5.tar.gz
Bug 835919 - Allow optionally building nss without softoken in the tree, r=rrelya
Diffstat (limited to 'cmd/platlibs.mk')
-rw-r--r--cmd/platlibs.mk31
1 files changed, 28 insertions, 3 deletions
diff --git a/cmd/platlibs.mk b/cmd/platlibs.mk
index 332681dd4..200faf701 100644
--- a/cmd/platlibs.mk
+++ b/cmd/platlibs.mk
@@ -36,7 +36,18 @@ ifdef USE_STATIC_LIBS
DEFINES += -DNSS_USE_STATIC_LIBS
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
-CRYPTOLIB=$(SOFTOKEN_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
+ifndef USE_SYSTEM_FREEBL
+CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
+SOFTOKENLIB=$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX)
+else
+# Use the system freebl and softoken libraries
+CRYPTOLIB=$(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
+SOFTOKENLIB=
+EXTRA_SHARED_LIBS += \
+ -L$(SOFTOKEN_LIB_DIR) \
+ -lsoftokn3 \
+ $(NULL)
+endif
PKIXLIB = \
$(DIST)/lib/$(LIB_PREFIX)pkixtop.$(LIB_SUFFIX) \
@@ -67,7 +78,7 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
+ $(SOFTOKENLIB) \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
@@ -102,7 +113,7 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \
- $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
+ $(SOFTOKENLIB) \
$(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
@@ -185,8 +196,22 @@ EXTRA_SHARED_LIBS += \
$(NULL)
endif
+ifdef SOFTOKEN_LIB_DIR
+ifdef NSS_USE_SYSTEM_FREEBL
+EXTRA_SHARED_LIBS += -L$(SOFTOKEN_LIB_DIR) -lsoftokn3
+endif
+endif
+
endif # USE_STATIC_LIBS
+# If a platform has a system freebl, set USE_SYSTEM_FREEBL to 1 and
+# FREEBL_LIBS to the linker command-line arguments for the system nss-util
+# (for example, -lfreebl3 on fedora) in the platform's config file in coreconf.
+ifdef NSS_USE_SYSTEM_FREEBL
+FREEBL_LIBS = $(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
+EXTRA_LIBS += $(FREEBL_LIBS)
+endif
+
# 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.