diff --git a/mozilla/config/autoconf.mk.in b/mozilla/config/autoconf.mk.in index 1ec240f9315..e43072dd14a 100644 --- a/mozilla/config/autoconf.mk.in +++ b/mozilla/config/autoconf.mk.in @@ -59,6 +59,7 @@ GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@ NS_TRACE_MALLOC = @NS_TRACE_MALLOC@ USE_ELF_DYNSTR_GC = @USE_ELF_DYNSTR_GC@ MOZ_MAIL_NEWS = @MOZ_MAIL_NEWS@ +MOZ_PLAINTEXT_EDITOR_ONLY = @MOZ_PLAINTEXT_EDITOR_ONLY@ BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@ BUILD_STATIC_LIBS = @BUILD_STATIC_LIBS@ MOZ_STATIC_COMPONENTS = @MOZ_STATIC_COMPONENTS@ diff --git a/mozilla/configure.in b/mozilla/configure.in index a5f50f84517..f5ad229d2f2 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -2603,6 +2603,16 @@ MOZ_ARG_DISABLE_BOOL(mailnews, MOZ_MAIL_NEWS= ) AC_SUBST(MOZ_MAIL_NEWS) +dnl Libeditor can be build as plaintext-only, +dnl or as a full html and text editing component. +dnl We build both by default. +MOZ_PLAINTEXT_EDITOR_ONLY= +MOZ_ARG_ENABLE_BOOL(plaintext-editor-only, +[ --enable-plaintext-editor-only Allow only plaintext editing], + MOZ_PLAINTEXT_EDITOR_ONLY=1 ) +dnl Note the #define is MOZILLA, not MOZ, for compat with the Mac build. +AC_SUBST(MOZ_PLAINTEXT_EDITOR_ONLY) + dnl ========================================================= dnl = LDAP dnl ========================================================= diff --git a/mozilla/editor/libeditor/Makefile.in b/mozilla/editor/libeditor/Makefile.in index ea4d6a8c59a..218b79fb045 100644 --- a/mozilla/editor/libeditor/Makefile.in +++ b/mozilla/editor/libeditor/Makefile.in @@ -26,7 +26,14 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = base text html build +ifdef MOZ_PLAINTEXT_EDITOR_ONLY +HTML_DIR = +else +HTML_DIR = html +endif + +DIRS = base text $(HTML_DIR) build + include $(topsrcdir)/config/rules.mk diff --git a/mozilla/editor/libeditor/build/Makefile.in b/mozilla/editor/libeditor/build/Makefile.in index 62919d28e0d..011e489a5dd 100644 --- a/mozilla/editor/libeditor/build/Makefile.in +++ b/mozilla/editor/libeditor/build/Makefile.in @@ -52,14 +52,14 @@ REQUIRES = xpcom \ xuldoc \ $(NULL) -# MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY=1 -ifdef MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY +ifdef MOZ_PLAINTEXT_EDITOR_ONLY # We're only building the Core PlainText Editor Source so just include # the plain text registration file. CPPSRCS = nsTextEditorReg.cpp SHARED_LIBRARY_LIBS = $(NULL) else +# We're building both plain and html editing CPPSRCS = nsEditorRegistration.cpp SHARED_LIBRARY_LIBS = \ ../html/libhtmleditor_s.$(LIB_SUFFIX) \