summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2011-11-22 12:55:17 +0000
committerAriel Constenla-Haile <arielch@apache.org>2011-11-22 12:55:17 +0000
commit3b177a54bcd49efc0d8580ad85b9b73ccecdb9eb (patch)
tree784ba56be0fccfb91053399a880506a2969dc6f6
parent65d79d61a3d2714bfff5b0e9bbf745b95cd0a6c9 (diff)
lingucomponent related fixes for i118627, i118628, i118629
* 118627 - Hyphenator: building the UNO component breaks due to name clash The three UNO components have been renamed to use the naming scheme compname.uno: spell.uno, hyphen.uno, lnth.uno * 118629 - remove hunspell dependency from mythes hunspell was only needed for building the mythes example. Added a patch to patch the source in AOO builds and disable the example. * 118628 - remove hunspell dependency from Hyphenator and Thesaurus UNO components The dependency has been remove. Now the three components can be built independently from each other: * mythes has a category A license http://www.apache.org/legal/3party.html#category-a As a category A license, the library is ENABLED by default and is built unconditionally if the optional configure switch --with-system-mythes is missing As a side effect, building the UNO Thesaurus component is always enabled. * hunspell has a category B license http://www.apache.org/legal/3party.html#category-b as such, it is DISABLED by default. To enable the library use --enable-hunspell To use the library already present in the system instead of building it, use --with-system-hunspell As a side effect, building the UNO spell checking component is only enabled when hunspell is enabled. * hyphen has a category B license, as such it is DISABLED by default. To enable the library, use --enable-hyphen To uses the system library instead of building it, use --with-system-hyphen As side effect, building the UNO hyphenator component is only enabled when hyphen is enabled.
-rw-r--r--configure.in149
-rw-r--r--hunspell/makefile.mk2
-rwxr-xr-xlingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx2
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk12
-rwxr-xr-xlingucomponent/source/lingutil/lingutil.cxx7
-rw-r--r--lingucomponent/source/lingutil/makefile.mk13
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx43
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx1
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/makefile.mk12
-rw-r--r--lingucomponent/source/spellcheck/spell/makefile.mk8
-rw-r--r--lingucomponent/source/thesaurus/libnth/makefile.mk26
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx1
-rw-r--r--mythes/makefile.mk22
-rw-r--r--mythes/mythes-1.2.0-disable-example.patch91
-rw-r--r--mythes/prj/build.lst2
-rw-r--r--postprocess/packcomponents/makefile.mk9
-rwxr-xr-xscp2/source/ooo/file_library_ooo.scp8
-rw-r--r--scp2/source/ooo/makefile.mk4
-rw-r--r--set_soenv.in6
19 files changed, 211 insertions, 207 deletions
diff --git a/configure.in b/configure.in
index 27316332569a..c6b8adc72d11 100644
--- a/configure.in
+++ b/configure.in
@@ -546,14 +546,32 @@ AC_ARG_WITH(system-neon,
AC_ARG_WITH(system-agg,
[ --with-system-agg Use AGG already on system
],,)
+AC_ARG_ENABLE(hunspell,
+[ --enable-hunspell Determines whether to enable the Hunspell library.
+ If enabled, the library will be built unless you
+ specify --with-system-hunspell to use the library
+ already present on your system.
+ If disabled, the Spell Checking component will also
+ be disabled.
+ (Default: hunspell disabled)
+],,enable_hunspell=no)
AC_ARG_WITH(system-hunspell,
-[ --with-system-hunspell Use libhunspell already on system
+[ --with-system-hunspell Use libhunspell already on system
],,)
AC_ARG_WITH(system-mythes,
[ --with-system-mythes Use mythes already on system
],,)
-AC_ARG_WITH(system-altlinuxhyph,
-[ --with-system-altlinuxhyph Use ALTLinuxhyph already on system
+AC_ARG_ENABLE(hyphen,
+[ --enable-hyphen Determines whether to enable the Hyphen library.
+ If enabled, the library will be built unless you
+ specify --with-system-hyphen to use the library
+ already present on your system.
+ If disabled, the Hyphenator component will also
+ be disabled.
+ (Default: hyphen disabled)
+],,enable_hyphen=no)
+AC_ARG_WITH(system-hyphen,
+[ --with-system-hyphen Use libhypeh already on system
],,)
AC_ARG_WITH(system-libtextcat,
[ --with-system-libtextcat Use libtextcat already on system
@@ -1248,8 +1266,6 @@ if test "$enable_copyleft" != "yes"; then
enable_gstreamer="no"
with_myspell_dicts="no"
- DISABLE_HUNSPELL="TRUE"
- DISABLE_HYPHEN="TRUE"
DISABLE_SAXON="TRUE"
BUILD_EPM="NO"
@@ -1258,15 +1274,11 @@ if test "$enable_copyleft" != "yes"; then
else
- DISABLE_HUNSPELL=
- DISABLE_HYPHEN=
DISABLE_SAXON=
AC_MSG_RESULT([no])
fi
-AC_SUBST(DISABLE_HUNSPELL)
-AC_SUBST(DISABLE_HYPHEN)
AC_SUBST(DISABLE_SAXON)
AC_SUBST(BUILD_EPM)
@@ -5155,68 +5167,82 @@ AC_SUBST(REDLAND_CFLAGS)
AC_SUBST(REDLAND_LIBS)
dnl ===================================================================
-dnl Check for system hunspell
+dnl Check for hunspell
dnl ===================================================================
+AC_MSG_CHECKING([whether to build the Spell Checking component])
+ENABLE_HUNSPELL=
-if test -n "$enable_copyleft" -a "$enable_copyleft" != "no"; then
-
-AC_MSG_CHECKING([which libhunspell to use])
-if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
- test "$with_system_hunspell" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_HUNSPELL=YES
- AC_LANG_PUSH([C++])
- PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
- if test "$HUNSPELL_PC" != "TRUE"; then
- AC_CHECK_HEADER(hunspell.hxx, [],
- [
- AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
- [AC_MSG_ERROR(hunspell headers not found.)], [])
- ], [])
- AC_CHECK_LIB(hunspell, main, [],
- [ AC_MSG_ERROR(hunspell library not found.) ], [])
- HUNSPELL_LIBS=-lhunspell
- fi
- AC_LANG_POP([C++])
+if test "x$enable_hunspell" != "xno" ; then
+ AC_MSG_CHECKING([which libhunspell to use])
+ if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \
+ test "$with_system_hunspell" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_HUNSPELL=YES
+ AC_LANG_PUSH([C++])
+ PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
+ if test "$HUNSPELL_PC" != "TRUE"; then
+ AC_CHECK_HEADER(hunspell.hxx, [],
+ [AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
+ [AC_MSG_ERROR(hunspell headers not found.)], [])
+ ], [])
+ AC_CHECK_LIB(hunspell, main, [],
+ [ AC_MSG_ERROR(hunspell library not found.) ], [])
+ HUNSPELL_LIBS=-lhunspell
+ fi
+ AC_LANG_POP([C++])
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_HUNSPELL=NO
+ BUILD_TYPE="$BUILD_TYPE HUNSPELL"
+ fi
+ ENABLE_HUNSPELL=YES
+ AC_SUBST(SYSTEM_HUNSPELL)
+ AC_SUBST(HUNSPELL_CFLAGS)
+ AC_SUBST(HUNSPELL_LIBS)
else
- AC_MSG_RESULT([internal])
- SYSTEM_HUNSPELL=NO
- BUILD_TYPE="$BUILD_TYPE HUNSPELL"
+ AC_MSG_RESULT([no])
fi
-AC_SUBST(SYSTEM_HUNSPELL)
-AC_SUBST(HUNSPELL_CFLAGS)
-AC_SUBST(HUNSPELL_LIBS)
+AC_SUBST(ENABLE_HUNSPELL)
dnl ===================================================================
-dnl Checking for altlinuxhyph
+dnl Checking for libhyphen
dnl ===================================================================
-AC_MSG_CHECKING([which altlinuxhyph to use])
-if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \
- test "$with_system_altlinuxhyph" != "no"; then
- AC_MSG_RESULT([external])
- SYSTEM_HYPH=YES
- AC_CHECK_HEADER(hyphen.h, [],
- [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
- AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
- [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
- [#include <hyphen.h>])
- AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
- [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
- if test -z "$HYPHEN_LIB"; then
- AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
- [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
- fi
- if test -z "$HYPHEN_LIB"; then
- AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
- [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+AC_MSG_CHECKING([whether to build the Hyphenator component])
+ENABLE_HYPHEN=
+
+if test "x$enable_hyphen" != "xno" ; then
+ AC_MSG_CHECKING([which libhyphen to use])
+ if test -n "$with_system_hyphen" -o -n "$with_system_libs" && \
+ test "$with_system_hyphen" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_HYPH=YES
+ AC_CHECK_HEADER(hyphen.h, [],
+ [ AC_MSG_ERROR(libhyphen headers not found.)], [])
+ AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
+ [ AC_MSG_ERROR(no. You are sure you have libhyphen headers?)],
+ [#include <hyphen.h>])
+ AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
+ [ AC_MSG_ERROR(libhyphen not found or too old.)], [])
+ if test -z "$HYPHEN_LIB"; then
+ AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
+ [ AC_MSG_ERROR(libhyphen not found or too old.)], [])
+ fi
+ if test -z "$HYPHEN_LIB"; then
+ AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
+ [ AC_MSG_ERROR(libhyphen not found or too old.)], [])
+ fi
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_HYPH=NO
+ BUILD_TYPE="$BUILD_TYPE HYPHEN"
fi
+ ENABLE_HYPHEN=YES
+ AC_SUBST(SYSTEM_HYPH)
+ AC_SUBST(HYPHEN_LIB)
else
- AC_MSG_RESULT([internal])
- SYSTEM_HYPH=NO
- BUILD_TYPE="$BUILD_TYPE HYPHEN"
+ AC_MSG_RESULT([no])
fi
-AC_SUBST(SYSTEM_HYPH)
-AC_SUBST(HYPHEN_LIB)
+AC_SUBST(ENABLE_HYPHEN)
dnl ===================================================================
dnl Checking for mythes
@@ -5251,7 +5277,6 @@ AC_SUBST(SYSTEM_MYTHES)
AC_SUBST(MYTHES_CFLAGS)
AC_SUBST(MYTHES_LIBS)
-fi
dnl ===================================================================
dnl Checking for libtextcat
diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk
index abc444a6e807..663e2f597e2c 100644
--- a/hunspell/makefile.mk
+++ b/hunspell/makefile.mk
@@ -36,7 +36,7 @@ TARGET=hunspell
# --- Files --------------------------------------------------------
-.IF "$(DISABLE_HUNSPELL)" == ""
+.IF "$(ENABLE_HUNSPELL)" == "YES"
TARFILE_NAME=hunspell-1.2.9
TARFILE_MD5=68dd2e8253d9a7930e9fd50e2d7220d0
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index c10b250fb4b6..0f6f08d77bea 100755
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -51,8 +51,6 @@
#include <unotools/lingucfg.hxx>
#include <osl/file.hxx>
-#include "dictmgr.hxx"
-
#include <stdio.h>
#include <string.h>
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
index 354999fe6639..28fceba4932e 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
@@ -46,13 +46,10 @@ HNJLIB=hyphen.lib
# --- Files --------------------------------------------------------
-.IF "$(DISABLE_HYPHEN)" == ""
+.IF "$(ENABLE_HYPHEN)" == "YES"
-.IF "$(SYSTEM_HUNSPELL)" != "YES"
-HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell
-.ENDIF
-CFLAGS += -I..$/..$/..$/lingutil $(HUNSPELL_CFLAGS)
+CFLAGS += -I..$/..$/..$/lingutil
EXCEPTIONSFILES= \
$(SLO)$/hyphenimp.obj
@@ -61,7 +58,7 @@ SLOFILES= \
$(SLO)$/hreg.obj\
$(SLO)$/hyphenimp.obj
-REALNAME:=hyphen
+REALNAME:=hyphen.uno
SHL1TARGET= $(REALNAME)$(DLLPOSTFIX)
SHL1STDLIBS= \
@@ -74,8 +71,7 @@ SHL1STDLIBS= \
$(UNOTOOLSLIB) \
$(LNGLIB) \
$(HNJLIB) \
- $(ULINGULIB) \
- $(HUNSPELLLIB)
+ $(ULINGULIB)
# build DLL
SHL1LIBS= $(SLB)$/$(TARGET).lib $(SLB)$/libulingu.lib
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 156dac31ff47..12583f7e55de 100755
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -54,7 +54,6 @@
#include <string.h>
#include <lingutil.hxx>
-#include <dictmgr.hxx>
@@ -120,9 +119,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
rtl::OUString aSystemPrefix;
rtl::OUString aSystemSuffix;
#endif
- bool bSpell = false;
- bool bHyph = false;
- bool bThes = false;
if (strcmp( pDicType, "DICT" ) == 0)
{
aFormatName = A2OU("DICT_SPELL");
@@ -131,7 +127,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
aSystemDir = A2OU( DICT_SYSTEM_DIR );
aSystemSuffix = aDicExtension;
#endif
- bSpell = true;
}
else if (strcmp( pDicType, "HYPH" ) == 0)
{
@@ -142,7 +137,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
aSystemPrefix = A2OU( "hyph_" );
aSystemSuffix = aDicExtension;
#endif
- bHyph = true;
}
else if (strcmp( pDicType, "THES" ) == 0)
{
@@ -153,7 +147,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
aSystemPrefix = A2OU( "th_" );
aSystemSuffix = A2OU( "_v2.dat" );
#endif
- bThes = true;
}
diff --git a/lingucomponent/source/lingutil/makefile.mk b/lingucomponent/source/lingutil/makefile.mk
index 813b073d4505..f934b8b8bbf9 100644
--- a/lingucomponent/source/lingutil/makefile.mk
+++ b/lingucomponent/source/lingutil/makefile.mk
@@ -37,11 +37,6 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
-.IF "$(DISABLE_HUNSPELL)" == ""
-
-.IF "$(SYSTEM_HUNSPELL)" != "YES"
-HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell
-.ENDIF
.IF "$(SYSTEM_DICTS)" == "YES"
CXXFLAGS += -DSYSTEM_DICTS -DDICT_SYSTEM_DIR=\"$(DICT_SYSTEM_DIR)\" -DHYPH_SYSTEM_DIR=\"$(HYPH_SYSTEM_DIR)\" -DTHES_SYSTEM_DIR=\"$(THES_SYSTEM_DIR)\"
@@ -49,9 +44,6 @@ CFLAGSCXX += -DSYSTEM_DICTS -DDICT_SYSTEM_DIR=\"$(DICT_SYSTEM_DIR)\" -DHYPH_SYST
CFLAGSCC += -DSYSTEM_DICTS -DDICT_SYSTEM_DIR=\"$(DICT_SYSTEM_DIR)\" -DHYPH_SYSTEM_DIR=\"$(HYPH_SYSTEM_DIR)\" -DTHES_SYSTEM_DIR=\"$(THES_SYSTEM_DIR)\"
.ENDIF
-CXXFLAGS += $(HUNSPELL_CFLAGS)
-CFLAGSCXX += $(HUNSPELL_CFLAGS)
-CFLAGSCC += $(HUNSPELL_CFLAGS)
SLOFILES = $(SLO)$/lingutil.obj
@@ -63,7 +55,4 @@ LIB1OBJFILES= $(SLOFILES)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-.ELSE
-all:
- @echo "hunspell disabled"
-.ENDIF
+
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
index b32daf10d030..b78461a9e565 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
@@ -33,11 +33,8 @@
#include <unotools/processfactory.hxx>
#include <osl/mutex.hxx>
-//#include <hunspell.hxx>
-#include <dictmgr.hxx>
#include <macspellimp.hxx>
-//#include <linguistic/lngprops.hxx>
#include <linguistic/spelldta.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
@@ -54,43 +51,11 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
using namespace com::sun::star::linguistic2;
using namespace linguistic;
-///////////////////////////////////////////////////////////////////////////
-// dbg_dump for development
-#if OSL_DEBUG_LEVEL > 1
-#include <rtl/strbuf.hxx>
-#include <rtl/ustring.hxx>
-
-const sal_Char *dbg_dump(const rtl::OString &rStr)
-{
- static rtl::OStringBuffer aStr;
-
- aStr = rtl::OStringBuffer(rStr);
- aStr.append(static_cast<char>(0));
- return aStr.getStr();
-}
-
-const sal_Char *dbg_dump(const rtl::OUString &rStr)
-{
- return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8));
-}
-const sal_Char *dbg_dump(rtl_String *pStr)
-{
- return dbg_dump(rtl::OString(pStr));
-}
-
-const sal_Char *dbg_dump(rtl_uString *pStr)
-{
- return dbg_dump(rtl::OUString(pStr));
-}
-
-#endif
-///////////////////////////////////////////////////////////////////////////
MacSpellChecker::MacSpellChecker() :
aEvtListeners ( GetLinguMutex() )
{
-// aDicts = NULL;
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
@@ -107,14 +72,6 @@ MacSpellChecker::MacSpellChecker() :
MacSpellChecker::~MacSpellChecker()
{
- // if (aDicts) {
- // for (int i = 0; i < numdict; i++) {
- // if (aDicts[i]) delete aDicts[i];
- // aDicts[i] = NULL;
- // }
- // delete[] aDicts;
- // }
- // aDicts = NULL;
numdict = 0;
if (aDEncs) delete[] aDEncs;
aDEncs = NULL;
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
index eb2094015205..9ad776439f7c 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -72,7 +72,6 @@ class MacSpellChecker :
>
{
Sequence< Locale > aSuppLocales;
-// Hunspell ** aDicts;
rtl_TextEncoding * aDEncs;
Locale * aDLocs;
OUString * aDNames;
diff --git a/lingucomponent/source/spellcheck/macosxspell/makefile.mk b/lingucomponent/source/spellcheck/macosxspell/makefile.mk
index 212cb6d6498d..e17812fcfc23 100644
--- a/lingucomponent/source/spellcheck/macosxspell/makefile.mk
+++ b/lingucomponent/source/spellcheck/macosxspell/makefile.mk
@@ -38,17 +38,9 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(SYSTEM_HUNSPELL)" != "YES"
-HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell
-.ENDIF
-
-CXXFLAGS += $(HUNSPELL_CFLAGS)
-CFLAGSCXX += $(HUNSPELL_CFLAGS)
-CFLAGSCC += $(HUNSPELL_CFLAGS)
# --- Files --------------------------------------------------------
-.IF "$(DISABLE_HUNSPELL)" == ""
CFLAGSCXX+=$(OBJCXXFLAGS)
CFLAGSCXX+=-I..$/..$/lingutil
@@ -89,10 +81,6 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
.INCLUDE : target.mk
-.ELSE
-all:
- @echo "hunspell disabled"
-.ENDIF
.ELSE
dummy:
diff --git a/lingucomponent/source/spellcheck/spell/makefile.mk b/lingucomponent/source/spellcheck/spell/makefile.mk
index 06f8927389f1..925b1d5b0496 100644
--- a/lingucomponent/source/spellcheck/spell/makefile.mk
+++ b/lingucomponent/source/spellcheck/spell/makefile.mk
@@ -42,7 +42,7 @@ HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell
# --- Files --------------------------------------------------------
-.IF "$(DISABLE_HUNSPELL)" == ""
+.IF "$(ENABLE_HUNSPELL)" == "YES"
CXXFLAGS += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
CFLAGSCXX += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
@@ -55,8 +55,8 @@ SLOFILES= \
$(SLO)$/sreg.obj\
$(SLO)$/sspellimp.obj
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
+REALNAME:=$(TARGET).uno
+SHL1TARGET= $(REALNAME)$(DLLPOSTFIX)
SHL1STDLIBS= \
$(CPPULIB) \
@@ -73,7 +73,7 @@ SHL1STDLIBS= \
# build DLL
SHL1LIBS= $(SLB)$/$(TARGET).lib $(SLB)$/libulingu.lib
-SHL1IMPLIB= i$(TARGET)
+SHL1IMPLIB= i$(REALNAME)
SHL1DEPN= $(SHL1LIBS)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/lingucomponent/source/thesaurus/libnth/makefile.mk b/lingucomponent/source/thesaurus/libnth/makefile.mk
index 7ba17a1f9ef4..4d262acac182 100644
--- a/lingucomponent/source/thesaurus/libnth/makefile.mk
+++ b/lingucomponent/source/thesaurus/libnth/makefile.mk
@@ -32,7 +32,6 @@ TARGET = lnth
ENABLE_EXCEPTIONS=TRUE
USE_DEFFILE=TRUE
-
.IF "$(MYTHESLIB)"==""
.IF "$(GUI)"=="UNX"
MYTHESLIB=-lmythes
@@ -51,20 +50,14 @@ MYTHESLIB=libmythes.lib
# --- Files --------------------------------------------------------
-.IF "$(DISABLE_HUNSPELL)" == ""
-
-.IF "$(SYSTEM_HUNSPELL)" != "YES"
-HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell
-.ENDIF
-
.IF "$(SYSTEM_MYTHES)" != "YES"
CXXFLAGS += -I..$/mythes
CFLAGSCXX += -I..$/mythes
CFLAGSCC += -I..$/mythes
.ENDIF
-CXXFLAGS += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
-CFLAGSCXX += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
-CFLAGSCC += -I$(PRJ)$/source$/lingutil $(HUNSPELL_CFLAGS)
+CXXFLAGS += -I$(PRJ)$/source$/lingutil
+CFLAGSCXX += -I$(PRJ)$/source$/lingutil
+CFLAGSCC += -I$(PRJ)$/source$/lingutil
EXCEPTIONSFILES= \
$(SLO)$/nthesimp.obj \
@@ -76,7 +69,8 @@ SLOFILES= \
$(SLO)$/nthesimp.obj
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
+REALNAME:=$(TARGET).uno
+SHL1TARGET= $(REALNAME)$(DLLPOSTFIX)
SHL1STDLIBS= \
$(CPPULIB) \
@@ -88,12 +82,11 @@ SHL1STDLIBS= \
$(UNOTOOLSLIB) \
$(LNGLIB) \
$(ULINGULIB) \
- $(MYTHESLIB) \
- $(HUNSPELLLIB)
+ $(MYTHESLIB)
# build DLL
SHL1LIBS= $(SLB)$/$(TARGET).lib $(SLB)$/libulingu.lib
-SHL1IMPLIB= i$(TARGET)
+SHL1IMPLIB= i$(REALNAME)
SHL1DEPN= $(SHL1LIBS)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -115,8 +108,3 @@ $(MISC)/lnth.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt lnth.component
-
-.ELSE
-all:
- @echo "hunspell disabled"
-.ENDIF
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 3df1277eec49..d73090c2e35a 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -43,7 +43,6 @@
#include <linguistic/misc.hxx>
#include <linguistic/lngprops.hxx>
#include "nthesdta.hxx"
-#include <dictmgr.hxx>
#include <list>
#include <set>
diff --git a/mythes/makefile.mk b/mythes/makefile.mk
index 0d3db2b39da6..646fc120f3d5 100644
--- a/mythes/makefile.mk
+++ b/mythes/makefile.mk
@@ -36,7 +36,6 @@ TARGET=mythes
# --- Files --------------------------------------------------------
-.IF "$(DISABLE_HUNSPELL)" == ""
TARFILE_NAME=mythes-1.2.0
TARFILE_MD5=067201ea8b126597670b5eff72e1f66c
@@ -44,18 +43,14 @@ TARFILE_MD5=067201ea8b126597670b5eff72e1f66c
ADDITIONAL_FILES += makefile.mk
PATCH_FILES=mythes-1.2.0-vanilla-th-gen-idx.patch \
- mythes-1.2.0-makefile-mk.diff
+ mythes-1.2.0-makefile-mk.diff \
+ mythes-1.2.0-disable-example.patch
.IF "$(GUI)"=="UNX"
CONFIGURE_DIR=$(BUILD_DIR)
.IF "$(SYSTEM_MYTHES)" != "YES"
-.IF "$(SYSTEM_HUNSPELL)" != "YES"
-HUNSPELL_CFLAGS +:= -I$(SOLARINCDIR)$/hunspell
-HUNSPELL_LIBS +:= -L$(SOLARLIBDIR) -lhunspell-1.2
-.ENDIF
-
#relative to CONFIGURE_DIR
# still needed also in system-mythes case as it creates the makefile
CONFIGURE_ACTION=configure
@@ -87,9 +82,7 @@ OUT2INC += mythes.hxx
.IF "$(GUI)"=="WNT"
.IF "$(COM)"=="GCC"
CONFIGURE_ACTION=configure
-CONFIGURE_FLAGS= --disable-shared --with-pic \
- HUNSPELL_CFLAGS=-I$(SOLARINCDIR)$/hunspell \
- HUNSPELL_LIBS="-L$(SOLARLIBDIR) -lhunspell-1.2"
+CONFIGURE_FLAGS= --disable-shared --with-pic
BUILD_ACTION=make
@@ -109,12 +102,3 @@ OUT2INC += mythes.hxx
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
-
-.IF "$(SYSTEM_HUNSPELL)" != "YES"
-.EXPORT: HUNSPELL_LIBS HUNSPELL_CFLAGS
-.ENDIF
-
-.ELSE
-all:
- @echo "hunspell disabled"
-.ENDIF
diff --git a/mythes/mythes-1.2.0-disable-example.patch b/mythes/mythes-1.2.0-disable-example.patch
new file mode 100644
index 000000000000..2cec8e0c273d
--- /dev/null
+++ b/mythes/mythes-1.2.0-disable-example.patch
@@ -0,0 +1,91 @@
+diff -uNrp misc/build/mythes-1.2.0/configure misc/mythes-1.2.0/configure
+--- misc/build/mythes-1.2.0/configure 2010-02-27 12:57:37.000000000 -0300
++++ misc/mythes-1.2.0/configure 2011-11-21 10:48:03.724435792 -0300
+@@ -748,6 +748,7 @@ LTLIBOBJS
+ LIBOBJS
+ HUNSPELL_LIBS
+ HUNSPELL_CFLAGS
++ENABLE_EXAMPLE
+ PKG_CONFIG
+ CXXCPP
+ CPP
+@@ -867,6 +868,7 @@ ac_subst_files=''
+ ac_user_opts='
+ enable_option_checking
+ enable_dependency_tracking
++enable_example
+ with_gnu_ld
+ enable_rpath
+ enable_shared
+@@ -1519,6 +1521,8 @@ Optional Features:
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+
++ --enable-example compiles the example (requires hunspell library)
++
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+@@ -3723,6 +3727,19 @@ fi
+
+
+
++# Check whether --enable-example was given.
++if test "${enable_example+set}" != set; then :
++ ENABLE_EXAMPLE=no;
++ $enable_example=no;
++else
++ ENABLE_EXAMPLE=$enable_example;
++fi
++
++
++
++
++
++
+ depcc="$CC" am_compiler_list=
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+@@ -14476,6 +14493,8 @@ $as_echo "no" >&6; }
+
+ fi
+
++
++if test "$ENABLE_EXAMPLE" != "no"; then
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUNSPELL" >&5
+ $as_echo_n "checking for HUNSPELL... " >&6; }
+@@ -14561,6 +14580,9 @@ else
+ $as_echo "yes" >&6; }
+ :
+ fi
++fi
++export ENABLE_EXAMPLE
++
+
+ ac_config_files="$ac_config_files Makefile mythes.pc"
+
+diff -uNrp misc/build/mythes-1.2.0/Makefile.in misc/mythes-1.2.0/Makefile.in
+--- misc/build/mythes-1.2.0/Makefile.in 2010-02-27 12:57:35.000000000 -0300
++++ misc/mythes-1.2.0/Makefile.in 2011-11-21 10:48:03.713435791 -0300
+@@ -18,7 +18,7 @@
+
+
+
+-
++ENABLE_EXAMPLE=@ENABLE_EXAMPLE@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+@@ -85,7 +85,11 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
+ libmythes_1_2_la_LIBADD =
+ am_libmythes_1_2_la_OBJECTS = mythes.lo
+ libmythes_1_2_la_OBJECTS = $(am_libmythes_1_2_la_OBJECTS)
++ifeq "$(ENABLE_EXAMPLE)" "no"
++PROGRAMS=
++else
+ PROGRAMS = $(noinst_PROGRAMS)
++endif
+ am_example_OBJECTS = example.$(OBJEXT)
+ example_OBJECTS = $(am_example_OBJECTS)
+ example_DEPENDENCIES = libmythes-1.2.la
diff --git a/mythes/prj/build.lst b/mythes/prj/build.lst
index 6c3cb8022aac..9c851b6254a3 100644
--- a/mythes/prj/build.lst
+++ b/mythes/prj/build.lst
@@ -1,3 +1,3 @@
-myt mythes : soltools solenv HUNSPELL:hunspell NULL
+myt mythes : soltools solenv NULL
myt mythes usr1 - all myt_mkout NULL
myt mythes nmake - all myt_mythes NULL
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index e7942ece843d..413445b15ea8 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -109,6 +109,7 @@ my_components = \
i18npool \
i18nsearch \
lng \
+ lnth \
localebe1 \
log \
mcnttype \
@@ -196,14 +197,12 @@ my_components += XSLTFilter.jar \
xsltfilter
.END
-.IF "$(DISABLE_HYPHEN)" == ""
+.IF "$(ENABLE_HYPHEN)" == "YES"
my_components += hyphen
.END
-.IF "$(DISABLE_HUNSPELL)" == ""
-my_components += \
- lnth \
- spell
+.IF "$(ENABLE_HUNSPELL)" == "YES"
+my_components += spell
.END
.IF "$(SYSTEM_LIBWPD)" == "YES"
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index aebedc2df1bd..90ad5c694be9 100755
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1301,7 +1301,7 @@ End
File gid_File_Lib_Spell
TXT_FILE_BODY;
Styles = (PACKED);
- Name = LIBNAME(spell);
+ Name = LIBNAME(spell.uno);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
@@ -1414,20 +1414,18 @@ SPECIAL_COMPONENT_LIB_FILE(gid_File_Ucpext, ucpext.uno)
SPECIAL_COMPONENT_LIB_FILE(gid_File_Ucpexpand1, ucpexpand1.uno)
-#ifndef DISABLE_HUNSPELL
File gid_File_Lib_Lnth
TXT_FILE_BODY;
Styles = (PACKED);
- Name = LIBNAME(lnth);
+ Name = LIBNAME(lnth.uno);
Dir = SCP2_OOO_BIN_DIR;
End
-#endif
#ifndef DISABLE_HYPHEN
File gid_File_Lib_Hyph
TXT_FILE_BODY;
Styles = (PACKED);
- Name = LIBNAME(hyphen);
+ Name = LIBNAME(hyphen.uno);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index ce9b9b725709..958959d85f60 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -194,11 +194,11 @@ SCPDEFS+=-DDISABLE_SAXON
SCPDEFS+=-DDISABLE_LIBWPD
.ENDIF
-.IF "$(DISABLE_HUNSPELL)" == "TRUE"
+.IF "$(ENABLE_HUNSPELL)" != "YES"
SCPDEFS+=-DDISABLE_HUNSPELL
.ENDIF
-.IF "$(DISABLE_HYPHEN)" == "TRUE"
+.IF "$(ENABLE_HYPHEN)" != "YES"
SCPDEFS+=-DDISABLE_HYPHEN
.ENDIF
diff --git a/set_soenv.in b/set_soenv.in
index 39e81ff9fcbc..7dae69c348ad 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -90,7 +90,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
$COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
$WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB, $MOZILLABUILD,
$PROEXT, $TARFILE_LOCATION,
- $DISABLE_SAXON, $DISABLE_HUNSPELL, $DISABLE_HYPHEN,
+ $DISABLE_SAXON, $ENABLE_HUNSPELL, $ENABLE_HYPHEN,
$SYSTEM_PYTHON, $SYSTEM_MOZILLA, $EPM_FLAGS);
#
#-------------------------------------------
@@ -1769,8 +1769,8 @@ if ( $platform =~ m/cygwin/ )
ToFile( "TMPDIR", $tmpdir, "e" );
}
ToFile( "DISABLE_SAXON", "@DISABLE_SAXON@", "e" );
-ToFile( "DISABLE_HUNSPELL", "@DISABLE_HUNSPELL@", "e" );
-ToFile( "DISABLE_HYPHEN", "@DISABLE_HYPHEN@", "e" );
+ToFile( "ENABLE_HUNSPELL", "@ENABLE_HUNSPELL@", "e" );
+ToFile( "ENABLE_HYPHEN", "@ENABLE_HYPHEN@", "e" );
ToFile( "PERL", $PERL, "e" );
ToFile( "RPM", "@RPM@", "e" );