forked from pool/MozillaThunderbird
305 lines
9.8 KiB
Diff
305 lines
9.8 KiB
Diff
Index: config/autoconf.mk.in
|
|
===================================================================
|
|
RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
|
|
retrieving revision 3.363.2.20
|
|
diff -u -p -6 -r3.363.2.20 autoconf.mk.in
|
|
--- config/autoconf.mk.in 14 Sep 2006 18:07:03 -0000 3.363.2.20
|
|
+++ config/autoconf.mk.in 29 Dec 2008 13:52:18 -0000
|
|
@@ -187,12 +187,16 @@ 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_MYSPELL = @SYSTEM_MYSPELL@
|
|
+MOZ_MYSPELL_LIBS = @MOZ_MYSPELL_LIBS@
|
|
+MOZ_MYSPELL_CFLAGS = @MOZ_MYSPELL_CFLAGS@
|
|
+
|
|
MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
|
|
MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
|
|
MOZ_NATIVE_PNG = @SYSTEM_PNG@
|
|
MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
|
|
|
|
MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
|
|
Index: extensions/spellcheck/myspell/src/Makefile.in
|
|
===================================================================
|
|
RCS file: /cvsroot/mozilla/extensions/spellcheck/myspell/src/Attic/Makefile.in,v
|
|
retrieving revision 1.11.4.1
|
|
diff -u -p -6 -r1.11.4.1 Makefile.in
|
|
--- extensions/spellcheck/myspell/src/Makefile.in 29 Jun 2006 21:23:45 -0000 1.11.4.1
|
|
+++ extensions/spellcheck/myspell/src/Makefile.in 29 Dec 2008 13:52:22 -0000
|
|
@@ -57,28 +57,36 @@ REQUIRES = xpcom \
|
|
uconv \
|
|
unicharutil \
|
|
spellchecker \
|
|
xulapp \
|
|
$(NULL)
|
|
|
|
-CPPSRCS = affentry.cpp \
|
|
- affixmgr.cpp \
|
|
- hashmgr.cpp \
|
|
- suggestmgr.cpp \
|
|
- csutil.cpp \
|
|
- myspell.cpp \
|
|
- mozMySpell.cpp \
|
|
- mozMySpellFactory.cpp \
|
|
+CPPSRCS = mozMySpell.cpp \
|
|
+ mozMySpellFactory.cpp \
|
|
$(NULL)
|
|
+ifndef MOZ_NATIVE_MYSPELL
|
|
+CPPSRCS += affentry.cpp \
|
|
+ affixmgr.cpp \
|
|
+ hashmgr.cpp \
|
|
+ suggestmgr.cpp \
|
|
+ csutil.cpp \
|
|
+ myspell.cpp \
|
|
+ $(NULL)
|
|
+endif
|
|
|
|
ifdef MOZ_XUL_APP
|
|
CPPSRCS += mozMySpellDirProvider.cpp
|
|
endif
|
|
|
|
EXTRA_DSO_LDOPTS = \
|
|
$(LIBS_DIR) \
|
|
$(XPCOM_LIBS) \
|
|
$(NSPR_LIBS) \
|
|
$(MOZ_UNICHARUTIL_LIBS) \
|
|
+ $(MOZ_MYSPELL_LIBS) \
|
|
$(NULL)
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
+
|
|
+ifdef MOZ_NATIVE_MYSPELL
|
|
+CXXFLAGS += $(MOZ_MYSPELL_CFLAGS)
|
|
+endif
|
|
Index: extensions/spellcheck/myspell/src/mozMySpell.h
|
|
===================================================================
|
|
RCS file: /cvsroot/mozilla/extensions/spellcheck/myspell/src/Attic/mozMySpell.h,v
|
|
retrieving revision 1.3.12.3
|
|
diff -u -p -6 -r1.3.12.3 mozMySpell.h
|
|
--- extensions/spellcheck/myspell/src/mozMySpell.h 29 Jun 2006 21:46:59 -0000 1.3.12.3
|
|
+++ extensions/spellcheck/myspell/src/mozMySpell.h 29 Dec 2008 13:52:22 -0000
|
|
@@ -53,13 +53,17 @@
|
|
* (the home page for ispell)
|
|
*
|
|
* ***** END LICENSE BLOCK ***** */
|
|
#ifndef mozMySpell_h__
|
|
#define mozMySpell_h__
|
|
|
|
+#ifdef MOZ_NATIVE_MYSPELL
|
|
+#include "hunspell.hxx"
|
|
+#else
|
|
#include "myspell.hxx"
|
|
+#endif
|
|
#include "mozISpellCheckingEngine.h"
|
|
#include "mozIPersonalDictionary.h"
|
|
#include "nsString.h"
|
|
#include "nsCOMPtr.h"
|
|
#include "nsIObserver.h"
|
|
#include "nsIUnicodeEncoder.h"
|
|
Index: config/system-headers
|
|
===================================================================
|
|
RCS file: /cvsroot/mozilla/config/system-headers,v
|
|
retrieving revision 3.4.4.4
|
|
diff -u -p -6 -r3.4.4.4 system-headers
|
|
--- config/system-headers 8 Nov 2007 09:03:24 -0000 3.4.4.4
|
|
+++ config/system-headers 29 Dec 2008 15:11:37 -0000
|
|
@@ -929,6 +929,7 @@ pk11sdr.h
|
|
#if MOZ_NATIVE_PNG==1
|
|
png.h
|
|
#endif
|
|
#if MOZ_NATIVE_ZLIB==1
|
|
zlib.h
|
|
#endif
|
|
+hunspell/hunspell.hxx
|
|
Index: configure.in
|
|
===================================================================
|
|
RCS file: /cvsroot/mozilla/configure.in,v
|
|
retrieving revision 1.1503.2.112
|
|
diff -u -p -r1.1503.2.112 configure.in
|
|
--- configure.in 19 Oct 2008 16:14:06 -0000 1.1503.2.112
|
|
+++ configure.in 29 Dec 2008 15:44:08 -0000
|
|
@@ -3916,6 +3916,24 @@ fi
|
|
|
|
fi # SKIP_LIBRARY_CHECKS
|
|
|
|
+dnl system MySpell Support
|
|
+dnl ========================================================
|
|
+MOZ_ARG_ENABLE_BOOL(system-myspell,
|
|
+[ --enable-system-myspell Use system myspell (located with pkgconfig)],
|
|
+ SYSTEM_MYSPELL=1 )
|
|
+
|
|
+if test -n "$SYSTEM_MYSPELL"; then
|
|
+ PKG_CHECK_MODULES(MOZ_MYSPELL, hunspell)
|
|
+ MOZ_MYSPELL_CFLAGS="$MOZ_MYSPELL_CFLAGS -DMySpell=Hunspell"
|
|
+fi
|
|
+
|
|
+if test "$SYSTEM_MYSPELL" = 1; then
|
|
+ AC_DEFINE(MOZ_NATIVE_MYSPELL)
|
|
+fi
|
|
+AC_SUBST(SYSTEM_MYSPELL)
|
|
+AC_SUBST(MOZ_MYSPELL_LIBS)
|
|
+AC_SUBST(MOZ_MYSPELL_CFLAGS)
|
|
+
|
|
dnl ========================================================
|
|
dnl Java SDK support
|
|
dnl ========================================================
|
|
Index: configure
|
|
===================================================================
|
|
RCS file: /cvsroot/mozilla/configure,v
|
|
retrieving revision 1.1492.2.130
|
|
diff -u -p -r1.1492.2.130 configure
|
|
--- configure 19 Oct 2008 16:21:23 -0000 1.1492.2.130
|
|
+++ configure 29 Dec 2008 15:44:16 -0000
|
|
@@ -60,6 +60,8 @@ ac_help="$ac_help
|
|
--with-system-png[=PFX]
|
|
Use system libpng [installed at prefix PFX]"
|
|
ac_help="$ac_help
|
|
+ --enable-system-myspell Use system myspell (located with pkgconfig)"
|
|
+ac_help="$ac_help
|
|
--with-java-include-path=dir Location of Java SDK headers"
|
|
ac_help="$ac_help
|
|
--with-java-bin-path=dir Location of Java binaries (java, javac, jar)"
|
|
@@ -12185,6 +12187,124 @@ fi
|
|
|
|
fi # SKIP_LIBRARY_CHECKS
|
|
|
|
+# Check whether --enable-system-myspell or --disable-system-myspell was given.
|
|
+if test "${enable_system_myspell+set}" = set; then
|
|
+ enableval="$enable_system_myspell"
|
|
+ if test "$enableval" = "yes"; then
|
|
+ SYSTEM_MYSPELL=1
|
|
+ elif test "$enableval" = "no"; then
|
|
+ :
|
|
+ else
|
|
+ { echo "configure: error: Option, system-myspell, does not take an argument ($enableval)." 1>&2; exit 1; }
|
|
+ fi
|
|
+fi
|
|
+
|
|
+
|
|
+if test -n "$SYSTEM_MYSPELL"; then
|
|
+
|
|
+ succeeded=no
|
|
+
|
|
+ if test -z "$PKG_CONFIG"; then
|
|
+ # Extract the first word of "pkg-config", so it can be a program name with args.
|
|
+set dummy pkg-config; ac_word=$2
|
|
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
+echo "configure:12212: checking for $ac_word" >&5
|
|
+if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
|
|
+ echo $ac_n "(cached) $ac_c" 1>&6
|
|
+else
|
|
+ case "$PKG_CONFIG" in
|
|
+ /*)
|
|
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
|
+ ;;
|
|
+ ?:/*)
|
|
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
|
|
+ ;;
|
|
+ *)
|
|
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
+ ac_dummy="$PATH"
|
|
+ for ac_dir in $ac_dummy; do
|
|
+ test -z "$ac_dir" && ac_dir=.
|
|
+ if test -f $ac_dir/$ac_word; then
|
|
+ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
|
|
+ break
|
|
+ fi
|
|
+ done
|
|
+ IFS="$ac_save_ifs"
|
|
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
|
|
+ ;;
|
|
+esac
|
|
+fi
|
|
+PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
|
|
+if test -n "$PKG_CONFIG"; then
|
|
+ echo "$ac_t""$PKG_CONFIG" 1>&6
|
|
+else
|
|
+ echo "$ac_t""no" 1>&6
|
|
+fi
|
|
+
|
|
+ fi
|
|
+
|
|
+ if test "$PKG_CONFIG" = "no" ; then
|
|
+ echo "*** The pkg-config script could not be found. Make sure it is"
|
|
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
|
|
+ echo "*** to the full path to pkg-config."
|
|
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
|
+ else
|
|
+ PKG_CONFIG_MIN_VERSION=0.9.0
|
|
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
|
+ echo $ac_n "checking for hunspell""... $ac_c" 1>&6
|
|
+echo "configure:12256: checking for hunspell" >&5
|
|
+
|
|
+ if $PKG_CONFIG --exists "hunspell" ; then
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ succeeded=yes
|
|
+
|
|
+ echo $ac_n "checking MOZ_MYSPELL_CFLAGS""... $ac_c" 1>&6
|
|
+echo "configure:12263: checking MOZ_MYSPELL_CFLAGS" >&5
|
|
+ MOZ_MYSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"`
|
|
+ echo "$ac_t""$MOZ_MYSPELL_CFLAGS" 1>&6
|
|
+
|
|
+ echo $ac_n "checking MOZ_MYSPELL_LIBS""... $ac_c" 1>&6
|
|
+echo "configure:12268: checking MOZ_MYSPELL_LIBS" >&5
|
|
+ ## don't use --libs since that can do evil things like add
|
|
+ ## -Wl,--export-dynamic
|
|
+ MOZ_MYSPELL_LIBS="`$PKG_CONFIG --libs-only-L \"hunspell\"` `$PKG_CONFIG --libs-only-l \"hunspell\"`"
|
|
+ echo "$ac_t""$MOZ_MYSPELL_LIBS" 1>&6
|
|
+ else
|
|
+ MOZ_MYSPELL_CFLAGS=""
|
|
+ MOZ_MYSPELL_LIBS=""
|
|
+ ## If we have a custom action on failure, don't print errors, but
|
|
+ ## do set a variable so people can do so.
|
|
+ MOZ_MYSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"`
|
|
+ echo $MOZ_MYSPELL_PKG_ERRORS
|
|
+ fi
|
|
+
|
|
+
|
|
+
|
|
+ else
|
|
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
|
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
|
+ fi
|
|
+ fi
|
|
+
|
|
+ if test $succeeded = yes; then
|
|
+ :
|
|
+ else
|
|
+ { echo "configure: error: Library requirements (hunspell) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; }
|
|
+ fi
|
|
+
|
|
+ MOZ_MYSPELL_CFLAGS="$MOZ_MYSPELL_CFLAGS -DMySpell=Hunspell"
|
|
+fi
|
|
+
|
|
+if test "$SYSTEM_MYSPELL" = 1; then
|
|
+ cat >> confdefs.h <<\EOF
|
|
+#define MOZ_NATIVE_MYSPELL 1
|
|
+EOF
|
|
+
|
|
+fi
|
|
+
|
|
+
|
|
+
|
|
+
|
|
JAVA_INCLUDE_PATH=
|
|
# Check whether --with-java-include-path or --without-java-include-path was given.
|
|
if test "${with_java_include_path+set}" = set; then
|
|
@@ -20459,10 +20579,13 @@ s%@NSPR_LIBS@%$NSPR_LIBS%g
|
|
s%@NSS_CONFIG@%$NSS_CONFIG%g
|
|
s%@NSS_CFLAGS@%$NSS_CFLAGS%g
|
|
s%@NSS_LIBS@%$NSS_LIBS%g
|
|
+s%@PKG_CONFIG@%$PKG_CONFIG%g
|
|
+s%@MOZ_MYSPELL_CFLAGS@%$MOZ_MYSPELL_CFLAGS%g
|
|
+s%@MOZ_MYSPELL_LIBS@%$MOZ_MYSPELL_LIBS%g
|
|
+s%@SYSTEM_MYSPELL@%$SYSTEM_MYSPELL%g
|
|
s%@GTK_CONFIG@%$GTK_CONFIG%g
|
|
s%@GTK_CFLAGS@%$GTK_CFLAGS%g
|
|
s%@GTK_LIBS@%$GTK_LIBS%g
|
|
-s%@PKG_CONFIG@%$PKG_CONFIG%g
|
|
s%@MOZ_GTK2_CFLAGS@%$MOZ_GTK2_CFLAGS%g
|
|
s%@MOZ_GTK2_LIBS@%$MOZ_GTK2_LIBS%g
|
|
s%@HOST_MOC@%$HOST_MOC%g
|