Bug 223084 - enable the static component loader by default r/sr=dougt

This commit is contained in:
bsmedberg%covad.net 2003-10-30 21:11:07 +00:00
Родитель 0ccc04b259
Коммит 940aae9127
6 изменённых файлов: 26 добавлений и 12 удалений

Просмотреть файл

@ -81,6 +81,7 @@ MOZ_PLAINTEXT_EDITOR_ONLY = @MOZ_PLAINTEXT_EDITOR_ONLY@
MOZ_COMPOSER = @MOZ_COMPOSER@
BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@
BUILD_STATIC_LIBS = @BUILD_STATIC_LIBS@
MOZ_STATIC_COMPONENT_LOADER = @MOZ_STATIC_COMPONENT_LOADER@
MOZ_STATIC_COMPONENTS = @MOZ_STATIC_COMPONENTS@
MOZ_META_COMPONENTS = @MOZ_META_COMPONENTS@
MOZ_STATIC_COMPONENT_LIBS = @MOZ_STATIC_COMPONENT_LIBS@

Просмотреть файл

@ -4637,6 +4637,19 @@ if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") ||
AC_MSG_ERROR([Only one of --enable-shared or --enable-static must be specified.])
fi
dnl ========================================================
dnl static component loader
dnl ========================================================
MOZ_STATIC_COMPONENT_LOADER=1
MOZ_ARG_DISABLE_BOOL(static-component-loader,
[ --disable-static-component-loader
Disable the static component loader],
MOZ_STATIC_COMPONENT_LOADER=)
if test -n "$MOZ_STATIC_COMPONENT_LOADER"; then
AC_DEFINE(ENABLE_STATIC_COMPONENT_LOADER)
fi
dnl ========================================================
dnl Generate static component from list of modules
dnl ========================================================
@ -5054,6 +5067,7 @@ AC_SUBST(MOZ_ENABLE_XINERAMA)
AC_SUBST(XPCOM_USE_LEA)
AC_SUBST(BUILD_SHARED_LIBS)
AC_SUBST(BUILD_STATIC_LIBS)
AC_SUBST(MOZ_STATIC_COMPONENT_LOADER)
AC_SUBST(MOZ_STATIC_COMPONENT_LIBS)
AC_SUBST(MOZ_STATIC_COMPONENTS)
AC_SUBST(MOZ_META_COMPONENTS)
@ -5329,6 +5343,7 @@ HAVE_MBRTOWC
HAVE_SYS_MOUNT_H
HAVE_SYS_VFS_H
HAVE_WCRTOMB
ENABLE_STATIC_COMPONENT_LOADER
"
AC_CONFIG_HEADER(

Просмотреть файл

@ -119,10 +119,6 @@ DEFINES += \
-DEXPORT_XPTC_API \
-DEXPORT_XPTI_API
ifdef MOZ_STATIC_COMPONENT_LIBS
DEFINES += -DENABLE_STATIC_COMPONENT_LOADER=1
endif
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
ifdef GC_LEAK_DETECTOR
@ -144,4 +140,3 @@ ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
endif
endif # WINNT

Просмотреть файл

@ -43,10 +43,8 @@ CPPSRCS = \
xcDll.cpp \
$(NULL)
# XXX not really right.
ifdef MOZ_STATIC_COMPONENT_LIBS
ifdef MOZ_STATIC_COMPONENT_LOADER
CPPSRCS += nsStaticComponentLoader.cpp
DEFINES += -DENABLE_STATIC_COMPONENT_LOADER=1
endif
EXPORTS = \

Просмотреть файл

@ -89,10 +89,8 @@ nsStaticComponentLoader::GetModuleInfo()
}
if (! NSGetStaticModuleInfo) {
// apparently we're a static build with no static modules
// to register. Suspicious, but might be as intended in certain
// shared uses (such as by the stand-alone install engine)
NS_WARNING("NSGetStaticModuleInfo not initialized -- is this right?");
// We're a static build with no static modules to
// register. This can happen in shared uses (such as the GRE)
return NS_OK;
}
@ -198,6 +196,9 @@ nsStaticComponentLoader::AutoRegisterComponents(PRInt32 when, nsIFile *dir)
if (mAutoRegistered)
return NS_OK;
if (dir)
return NS_OK;
nsresult rv;
if (NS_FAILED(rv = GetModuleInfo()))
return rv;
@ -206,6 +207,7 @@ nsStaticComponentLoader::AutoRegisterComponents(PRInt32 when, nsIFile *dir)
PL_DHashTableEnumerate(&mInfoHash, info_RegisterSelf, &data);
mAutoRegistered = PR_TRUE;
return NS_OK;
}

Просмотреть файл

@ -3,6 +3,9 @@
#ifndef _XPCOM_PRIVATE_H_
#define _XPCOM_PRIVATE_H_
/* Define to build the static component loader */
#undef ENABLE_STATIC_COMPONENT_LOADER
/* Define if getpagesize() is available */
#undef HAVE_GETPAGESIZE