Bug 464088 - Option to build NSS without dbm, non-nss changes r=ted
authorBrad Lassey <blassey@mozilla.com>
Wed, 03 Dec 2008 08:42:03 -0500
changeset 22249 20a011760de7f770f71c1187f4760efeda64ff62
parent 22248 3ba7d5a29839fb5cc73c2a63c3bc3306a3fdc466
child 22250 ebabcc8e40e76c6dc1f18b6264fc9f49efddf8a2
push id3878
push userblassey@mozilla.com
push dateWed, 03 Dec 2008 13:43:58 +0000
treeherdermozilla-central@20a011760de7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs464088
milestone1.9.2a1pre
Bug 464088 - Option to build NSS without dbm, non-nss changes r=ted
config/autoconf.mk.in
configure.in
db/Makefile.in
security/manager/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -459,16 +459,17 @@ SQLITE_LIBS       = @SQLITE_LIBS@
 NSPR_CONFIG	= @NSPR_CONFIG@
 NSPR_CFLAGS	= @NSPR_CFLAGS@
 NSPR_LIBS	= @NSPR_LIBS@
 
 NSS_CONFIG	= @NSS_CONFIG@
 NSS_CFLAGS	= @NSS_CFLAGS@
 NSS_LIBS	= @NSS_LIBS@
 NSS_DEP_LIBS	= @NSS_DEP_LIBS@
+NSS_DISABLE_DBM = @NSS_DISABLE_DBM@
 
 XPCOM_GLUE_LDOPTS = @XPCOM_GLUE_LDOPTS@
 XPCOM_STANDALONE_GLUE_LDOPTS = @XPCOM_STANDALONE_GLUE_LDOPTS@
 MOZ_XPCOM_OBSOLETE_LIBS = @MOZ_XPCOM_OBSOLETE_LIBS@
 
 USE_DEPENDENT_LIBS = @USE_DEPENDENT_LIBS@
 
 # UNIX98 iconv support
--- a/configure.in
+++ b/configure.in
@@ -5150,16 +5150,24 @@ dnl ====================================
 dnl = Disable plugin support
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(plugins,
 [  --disable-plugins       Disable plugins support],
     MOZ_PLUGINS=,
     MOZ_PLUGINS=1)
 
 dnl ========================================================
+dnl = Disable building dbm
+dnl ========================================================
+MOZ_ARG_DISABLE_BOOL(dbm,
+[  --disable-dbm       Disable building dbm],
+    NSS_DISABLE_DBM=1,
+    NSS_DISABLE_DBM=)
+
+dnl ========================================================
 dnl = Open JVM Interface (OJI) support
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(oji,
 [  --disable-oji           Disable Open JVM Integration support],
     MOZ_OJI=,
     MOZ_OJI=1)
 if test -n "$MOZ_OJI"; then
     AC_DEFINE(OJI)
@@ -7982,16 +7990,17 @@ AC_SUBST(MOZ_PNG_LIBS)
 AC_SUBST(NSPR_CFLAGS)
 AC_SUBST(NSPR_LIBS)
 AC_SUBST(MOZ_NATIVE_NSPR)
 
 AC_SUBST(NSS_CFLAGS)
 AC_SUBST(NSS_LIBS)
 AC_SUBST(NSS_DEP_LIBS)
 AC_SUBST(MOZ_NATIVE_NSS)
+AC_SUBST(NSS_DISABLE_DBM)
 
 AC_SUBST(CFLAGS)
 AC_SUBST(CXXFLAGS)
 AC_SUBST(CPPFLAGS)
 AC_SUBST(COMPILE_CFLAGS)
 AC_SUBST(COMPILE_CXXFLAGS)
 AC_SUBST(LDFLAGS)
 AC_SUBST(LIBS)
--- a/db/Makefile.in
+++ b/db/Makefile.in
@@ -37,17 +37,20 @@
 
 DEPTH		= ..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
+ifndef NSS_DISABLE_DBM
 ifdef MOZ_MORK
 DIRS		= mdb mork
 endif
+endif 
+
 ifdef MOZ_MORKREADER
 DIRS		+= morkreader
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/security/manager/Makefile.in
+++ b/security/manager/Makefile.in
@@ -50,17 +50,22 @@ LOADABLE_ROOT_MODULE = $(DLL_PREFIX)nssc
 endif
 
 NSS3_LIB = $(DLL_PREFIX)nss3$(DLL_SUFFIX)
 NSSUTIL3_LIB = $(DLL_PREFIX)nssutil3$(DLL_SUFFIX)
 SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX)
 SSL3_LIB =  $(DLL_PREFIX)ssl3$(DLL_SUFFIX)
 SOFTOKEN3_LIB = $(DLL_PREFIX)softokn3$(DLL_SUFFIX)
 SOFTOKEN3_CHK = $(DLL_PREFIX)softokn3.chk
+
+ifndef NSS_DISABLE_DBM
 NSSDBM3_LIB = $(DLL_PREFIX)nssdbm3$(DLL_SUFFIX)
+else
+NSSDBM3_LIB = 
+endif
 
 ifndef MOZ_NATIVE_NSS
 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
 SDK_LIBS = \
   $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
   $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \
   $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \
   $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \
@@ -158,16 +163,19 @@ DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1"
 DEFAULT_GMAKE_FLAGS += CC="$(CC)"
 DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST)
 DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
 DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=$(NSPR_INCLUDE_DIR)
 DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
 DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
 DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1
+ifdef NSS_DISABLE_DBM 
+DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
+endif
 ABS_topsrcdir   := $(shell cd $(topsrcdir); pwd)
 ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
 DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
 endif
 ifndef MOZ_DEBUG
 DEFAULT_GMAKE_FLAGS += BUILD_OPT=1 OPT_CODE_SIZE=1
 endif
 ifdef GNU_CC
@@ -258,17 +266,19 @@ dependclean export packages chrome::
 	$(MAKE) -C locales $@
 ifdef MOZ_XUL
 	$(MAKE) -C pki $@
 endif
 
 libs::
 ifndef MOZ_NATIVE_NSS
 	$(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS)
+ifndef NSS_DISABLE_DBM
 	$(MAKE) -C $(topsrcdir)/security/dbm $(DEFAULT_GMAKE_FLAGS) 
+endif
 	$(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS)
 ifdef ENABLE_TESTS
 	# Need certutil binary for mochitest certificates generation
 	$(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS)
 	$(MAKE) -C $(topsrcdir)/security/nss/cmd/certutil $(DEFAULT_GMAKE_FLAGS)
 	$(MAKE) -C $(topsrcdir)/security/nss/cmd/pk12util $(DEFAULT_GMAKE_FLAGS)
 endif
 ifndef SKIP_CHK
@@ -277,17 +287,19 @@ ifndef ENABLE_TESTS # Just avoid seconda
 endif
 	$(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS)
 endif
 	$(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin
 ifndef SKIP_CHK
 	$(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DIST)/bin
 endif
 	$(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin
+ifndef NSS_DISABLE_DBM
 	$(INSTALL) -m 755 $(DIST)/lib/$(NSSDBM3_LIB) $(DIST)/bin
+endif
 	$(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin
 	$(INSTALL) -m 755 $(DIST)/lib/$(NSSUTIL3_LIB) $(DIST)/bin
 	$(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin
 	$(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin
 	$(INSTALL) -m 755 $(SDK_LIBS) $(DIST)/sdk/lib
 ifdef HAVE_FREEBL_LIBS
 ifndef SKIP_CHK
 	$(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DIST)/bin