support MOZ_PSM build flag in toolkit/library. b=418652, r=bsmedberg, a=damons
authordougt@meer.net
Fri, 22 Feb 2008 17:13:20 -0800
changeset 12128 3bba100e9968d6dbf2de9f3293229d07f8379831
parent 12127 98fcfb7508fabce2644e245165f460863e897794
child 12129 eabd3d01d2ed316af0b520492e177bf48def550d
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, damons
bugs418652
milestone1.9b4pre
support MOZ_PSM build flag in toolkit/library. b=418652, r=bsmedberg, a=damons
toolkit/library/libxul-config.mk
toolkit/library/libxul-rules.mk
toolkit/library/nsStaticXULComponents.cpp
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -117,19 +117,24 @@ COMPONENT_LIBS += \
 	docshell \
 	embedcomponents \
 	webbrwsr \
 	nsappshell \
 	txmgr \
 	chrome \
 	commandlines \
 	toolkitcomps \
+	$(NULL)
+
+ifdef MOZ_PSM_
+COMPONENT_LIBS += \
 	pipboot \
 	pipnss \
 	$(NULL)
+endif
 
 ifdef MOZ_XMLEXTRAS
 COMPONENT_LIBS += \
 	xmlextras \
 	$(NULL)
 endif
   
 ifdef MOZ_PLUGINS
@@ -250,20 +255,26 @@ COMPONENT_LIBS += \
 endif
 endif
 endif
 
 ifdef MOZ_XUL
 COMPONENT_LIBS += \
 	tkautocomplete \
 	satchel \
+	$(NULL)
+
+ifdef MOZ_PSM_
+COMPONENT_LIBS += \
 	pippki \
 	$(NULL)
 endif
 
+endif
+
 ifdef MOZ_MATHML
 COMPONENT_LIBS += ucvmath
 endif
 
 ifdef MOZ_ENABLE_GTK2
 COMPONENT_LIBS += widget_gtk2
 ifdef MOZ_PREF_EXTENSIONS
 COMPONENT_LIBS += system-pref
--- a/toolkit/library/libxul-rules.mk
+++ b/toolkit/library/libxul-rules.mk
@@ -37,19 +37,22 @@
 # ***** END LICENSE BLOCK *****
 
 EXTRA_DSO_LDOPTS += \
 	$(LIBS_DIR) \
 	$(JPEG_LIBS) \
 	$(PNG_LIBS) \
 	$(LCMS_LIBS) \
 	$(MOZ_JS_LIBS) \
-	$(NSS_LIBS) \
 	$(NULL)
 
+ifdef MOZ_PSM
+EXTRA_DSO_LDOPTS += $(NSS_LIBS)
+endif
+
 ifdef MOZ_NATIVE_ZLIB
 EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
 else
 EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
 endif
 
 ifdef MOZ_NATIVE_HUNSPELL
 EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
--- a/toolkit/library/nsStaticXULComponents.cpp
+++ b/toolkit/library/nsStaticXULComponents.cpp
@@ -224,33 +224,41 @@
 #define PLACES_MODULES
 #endif
 #endif    
 
 #ifdef MOZ_XUL
 #define XULENABLED_MODULES                   \
     MODULE(tkAutoCompleteModule)             \
     MODULE(satchel)                          \
-    MODULE(PKI)
 #else
 #define XULENABLED_MODULES
 #endif
 
 #ifdef MOZ_SPELLCHECK
 #define SPELLCHECK_MODULE MODULE(mozSpellCheckerModule)
 #else
 #define SPELLCHECK_MODULE
 #endif
 
 #ifdef MOZ_XMLEXTRAS
 #define XMLEXTRAS_MODULE MODULE(nsXMLExtrasModule)
 #else
 #define XMLEXTRAS_MODULE
 #endif
 
+#ifdef MOZ_PSM
+#define PSM_MODULES \
+    MODULE(BOOT)    \
+    MODULE(NSS)     \
+    MODULE(PKI)
+#else
+#define PSM_MODULES
+#endif
+
 #ifdef MOZ_XUL
 #ifdef MOZ_ENABLE_GTK2
 #define UNIXPROXY_MODULE MODULE(nsUnixProxyModule)
 #endif
 #endif
 #ifndef UNIXPROXY_MODULE
 #define UNIXPROXY_MODULE
 #endif
@@ -295,18 +303,17 @@
     FILEVIEW_MODULE                          \
     STORAGE_MODULE                           \
     PLACES_MODULES                           \
     XULENABLED_MODULES                       \
     MODULE(nsToolkitCompsModule)             \
     XREMOTE_MODULES                          \
     XPINSTALL_MODULES                        \
     JSDEBUGGER_MODULES                       \
-    MODULE(BOOT)                             \
-    MODULE(NSS)                              \
+    PSM_MODULES                              \
     SYSTEMPREF_MODULES                       \
     SPELLCHECK_MODULE                        \
     XMLEXTRAS_MODULE                         \
     LAYOUT_DEBUG_MODULE                      \
     UNIXPROXY_MODULE                         \
     /* end of list */
 
 #define MODULE(_name) \