add --disable-cookies build option.

b=221885, r=bsmedberg, r+sr=darin
This commit is contained in:
dwitte%stanford.edu 2004-07-19 04:57:02 +00:00
Родитель 8ad12148c3
Коммит 2abcffe70a
5 изменённых файлов: 31 добавлений и 3 удалений

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

@ -153,6 +153,7 @@ MOZ_XUL = @MOZ_XUL@
NECKO_PROTOCOLS = @NECKO_PROTOCOLS@
NECKO_DISK_CACHE = @NECKO_DISK_CACHE@
NECKO_SMALL_BUFFERS = @NECKO_SMALL_BUFFERS@
NECKO_COOKIES = @NECKO_COOKIES@
MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
MOZ_NATIVE_JPEG = @SYSTEM_JPEG@

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

@ -5385,6 +5385,19 @@ if test "$NECKO_SMALL_BUFFERS"; then
AC_DEFINE(NECKO_SMALL_BUFFERS)
fi
dnl
dnl option to disable cookies
dnl
NECKO_COOKIES=1
MOZ_ARG_DISABLE_BOOL(cookies,
[ --disable-cookies Disable cookie support],
NECKO_COOKIES=,
NECKO_COOKIES=1)
AC_SUBST(NECKO_COOKIES)
if test "$NECKO_COOKIES"; then
AC_DEFINE(NECKO_COOKIES)
fi
dnl NECKO_ configuration options are not global
_NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_"

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

@ -80,7 +80,6 @@ SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)neckobase_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)neckodns_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)neckosocket_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)neckocookie_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nkconv_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nkcnvts_s.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nkmime_s.$(LIB_SUFFIX) \
@ -94,7 +93,6 @@ LOCAL_INCLUDES = \
-I$(srcdir)/../base/src \
-I$(srcdir)/../dns/src \
-I$(srcdir)/../socket/base \
-I$(srcdir)/../cookie/src \
-I$(srcdir)/../streamconv/src \
-I$(srcdir)/../streamconv/converters \
-I$(srcdir)/../mime/src \
@ -104,6 +102,13 @@ LOCAL_INCLUDES = \
-I$(srcdir)/../protocol/${d}/src) \
$(NULL)
ifdef NECKO_COOKIES
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)neckocookie_s.$(LIB_SUFFIX) \
$(NULL)
LOCAL_INCLUDES += -I$(srcdir)/../cookie/src
endif
ifdef MOZ_PERF_METRICS
EXTRA_DSO_LIBS += mozutil_s
endif

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

@ -140,8 +140,10 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsStreamListenerTee)
///////////////////////////////////////////////////////////////////////////////
#ifdef NECKO_COOKIES
#include "nsCookieService.h"
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsCookieService, nsCookieService::GetSingleton)
#endif
///////////////////////////////////////////////////////////////////////////////
// protocols
@ -1036,6 +1038,7 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
nsCacheService::Create
},
#ifdef NECKO_COOKIES
{ NS_COOKIEMANAGER_CLASSNAME,
NS_COOKIEMANAGER_CID,
NS_COOKIEMANAGER_CONTRACTID,
@ -1047,6 +1050,7 @@ static const nsModuleComponentInfo gNetModuleInfo[] = {
NS_COOKIESERVICE_CONTRACTID,
nsCookieServiceConstructor
},
#endif
};

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

@ -42,6 +42,11 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
# export required interfaces, even if --disable-cookies has been given
DIRS = public
ifdef NECKO_COOKIES
DIRS += src
endif
include $(topsrcdir)/config/rules.mk