From 6791c09f56eeb86f77409f22ef9e09c36974ef2a Mon Sep 17 00:00:00 2001 From: Ted Mielczarek Date: Tue, 15 Dec 2009 01:52:21 -0500 Subject: [PATCH] NSS: Allow the specification of an alternate library for SQLite. b=519550 r=rrelyea --- security/nss/cmd/platlibs.mk | 3 ++- security/nss/lib/softoken/config.mk | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/security/nss/cmd/platlibs.mk b/security/nss/cmd/platlibs.mk index ab8024386bd..d81670da2c8 100644 --- a/security/nss/cmd/platlibs.mk +++ b/security/nss/cmd/platlibs.mk @@ -92,6 +92,7 @@ ifdef USE_STATIC_LIBS # can't do this in manifest.mn because OS_ARCH isn't defined there. ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH))) +SQLITE = $(LIB_PREFIX)sqlite3.$(LIB_SUFFIX) DEFINES += -DNSS_USE_STATIC_LIBS # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) @@ -129,7 +130,7 @@ EXTRA_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ $(PKIXLIB) \ $(DBMLIB) \ - $(DIST)/lib/$(LIB_PREFIX)sqlite3.$(LIB_SUFFIX) \ + $(DIST)/lib/$(SQLITE) \ $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \ diff --git a/security/nss/lib/softoken/config.mk b/security/nss/lib/softoken/config.mk index c434af286ba..18ec1d8e05e 100644 --- a/security/nss/lib/softoken/config.mk +++ b/security/nss/lib/softoken/config.mk @@ -53,11 +53,12 @@ RES = $(OBJDIR)/$(LIBRARY_NAME).res RESNAME = $(LIBRARY_NAME).rc ifdef NS_USE_GCC +SQLITE = -lsqlite3 EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ -L$(NSSUTIL_LIB_DIR) \ -lnssutil3 \ - -lsqlite3 \ + $(SQLITE) \ -L$(NSPR_LIB_DIR) \ -lplc4 \ -lplds4 \ @@ -65,8 +66,9 @@ EXTRA_SHARED_LIBS += \ $(NULL) else # ! NS_USE_GCC +SQLITE = sqlite3.lib EXTRA_SHARED_LIBS += \ - $(DIST)/lib/sqlite3.lib \ + $(DIST)/lib/$(SQLITE) \ $(DIST)/lib/nssutil3.lib \ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \ @@ -79,11 +81,12 @@ else # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. +SQLITE = -lsqlite3 EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ -L$(NSSUTIL_LIB_DIR) \ -lnssutil3 \ - -lsqlite3 \ + $(SQLITE) \ -L$(NSPR_LIB_DIR) \ -lplc4 \ -lplds4 \