summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2004-02-07 21:53:16 +0000
committerDom Lachowicz <domlachowicz@gmail.com>2004-02-07 21:53:16 +0000
commitb4a6076069ac0ea3390b74bc234ae0fefcf72e53 (patch)
treee7bd7c8bd718f7e342dac99a0dd56fdc9ef47141
parent0d9176ef44f5ce88cdb2cfcdfbe5383fdb61f7a9 (diff)
downloadenchant-b4a6076069ac0ea3390b74bc234ae0fefcf72e53.tar.gz
more system myspell stuff
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@20914 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r--configure.in3
-rw-r--r--src/myspell/Makefile.am28
-rw-r--r--src/myspell/enchant_myspell.hxx (renamed from src/myspell/myspell.hxx)0
-rw-r--r--src/myspell/myspell.cxx2
-rw-r--r--src/myspell/myspell_checker.cpp30
-rw-r--r--src/myspell/myspell_checker.h43
6 files changed, 53 insertions, 53 deletions
diff --git a/configure.in b/configure.in
index 339694c..74814cf 100644
--- a/configure.in
+++ b/configure.in
@@ -107,6 +107,9 @@ fi
AM_CONDITIONAL(WITH_SYSTEM_MYSPELL, test "x$with_system_myspell" = "xyes")
MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dir\"'"
+if test "x$with_system_myspell" != "xno"; then
+ MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DWITH_SYSTEM_MYSPELL=1"
+fi
AC_SUBST(MYSPELL_CFLAGS)
AC_SUBST(MYSPELL_LIBS)
diff --git a/src/myspell/Makefile.am b/src/myspell/Makefile.am
index bd30142..1f84195 100644
--- a/src/myspell/Makefile.am
+++ b/src/myspell/Makefile.am
@@ -4,8 +4,6 @@ else
target_lib =
endif
-EXTRA_DIST=license.readme
-
INCLUDES=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) $(MYSPELL_CFLAGS) -D_ENCHANT_BUILD=1
myspell_LTLIBRARIES = $(target_lib)
@@ -17,8 +15,7 @@ libenchant_myspell_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined
if WITH_SYSTEM_MYSPELL
libenchant_myspell_la_SOURCES = \
- myspell_checker.cpp \
- myspell_checker.h
+ myspell_checker.cpp
else
libenchant_myspell_la_SOURCES = \
affentry.cxx \
@@ -33,9 +30,26 @@ libenchant_myspell_la_SOURCES = \
hashmgr.hxx \
htypes.hxx \
myspell.cxx \
- myspell.hxx \
+ enchant_myspell.hxx \
suggestmgr.cxx \
suggestmgr.hxx \
- myspell_checker.cpp \
- myspell_checker.h
+ myspell_checker.cpp
endif
+
+EXTRA_DIST= \
+ license.readme \
+ affentry.hxx \
+ affixmgr.hxx \
+ atypes.hxx \
+ baseaffix.hxx \
+ csutil.hxx \
+ hashmgr.hxx \
+ htypes.hxx \
+ enchant_myspell.hxx \
+ suggestmgr.hxx \
+ affentry.cxx \
+ affixmgr.cxx \
+ csutil.cxx \
+ hashmgr.cxx \
+ myspell.cxx \
+ suggestmgr.cxx
diff --git a/src/myspell/myspell.hxx b/src/myspell/enchant_myspell.hxx
index 0c18549..0c18549 100644
--- a/src/myspell/myspell.hxx
+++ b/src/myspell/enchant_myspell.hxx
diff --git a/src/myspell/myspell.cxx b/src/myspell/myspell.cxx
index 6209898..fcdbaa1 100644
--- a/src/myspell/myspell.cxx
+++ b/src/myspell/myspell.cxx
@@ -4,7 +4,7 @@
#include <cstdlib>
#include <cstdio>
-#include "myspell.hxx"
+#include "enchant_myspell.hxx"
#ifndef WINDOWS
using namespace std;
diff --git a/src/myspell/myspell_checker.cpp b/src/myspell/myspell_checker.cpp
index 3b0a8a6..9c3fa04 100644
--- a/src/myspell/myspell_checker.cpp
+++ b/src/myspell/myspell_checker.cpp
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* enchant
- * Copyright (C) 2003 Joan Moratinos <jmo@softcatala.org>, Dom Lachowicz
+ * Copyright (C) 2003-2004 Joan Moratinos <jmo@softcatala.org>, Dom Lachowicz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -35,14 +35,40 @@
#include <string>
#include <vector>
-#include "myspell_checker.h"
#include "enchant.h"
#include "enchant-provider.h"
+#ifdef WITH_SYSTEM_MYSPELL
+#include <myspell.hxx>
+#else
+#include "enchant_myspell.hxx"
+#endif
+
ENCHANT_PLUGIN_DECLARE("Myspell")
#define G_ICONV_INVALID (GIConv)-1
+#include <glib.h>
+
+/***************************************************************************/
+
+class MySpellChecker
+{
+public:
+ MySpellChecker();
+ ~MySpellChecker();
+
+ bool checkWord (const char *word, size_t len);
+ char **suggestWord (const char* const word, size_t len, size_t *out_n_suggs);
+
+ bool requestDictionary (const char * szLang);
+
+private:
+ GIConv m_translate_in; /* Selected translation from/to Unicode */
+ GIConv m_translate_out;
+ MySpell *myspell;
+};
+
/***************************************************************************/
static char *
diff --git a/src/myspell/myspell_checker.h b/src/myspell/myspell_checker.h
deleted file mode 100644
index c985b42..0000000
--- a/src/myspell/myspell_checker.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* enchant
- * Copyright (C) 2003
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef MYSPELL_CHECKER_H
-#define MYSPELL_CHECKER_H
-
-#include "myspell.hxx"
-#include <glib.h>
-
-class MySpellChecker
-{
-public:
- MySpellChecker();
- ~MySpellChecker();
-
- bool checkWord (const char *word, size_t len);
- char **suggestWord (const char* const word, size_t len, size_t *out_n_suggs);
-
- bool requestDictionary (const char * szLang);
-
-private:
- GIConv m_translate_in; /* Selected translation from/to Unicode */
- GIConv m_translate_out;
- MySpell *myspell;
-};
-
-#endif /* MYSPELL_CHECKER_H */