1 | next up previous contents |
---|
2 | Next: 3. Basic Usage Up: GNU Aspell 0.50.5 Previous: 1. Introduction |
---|
3 | Contents |
---|
4 | |
---|
5 | Subsections |
---|
6 | |
---|
7 | * 2.1 Requirements |
---|
8 | * 2.2 Obtaining |
---|
9 | * 2.3 Support |
---|
10 | * 2.4 Helping Out |
---|
11 | * 2.5 Compiling & Installing |
---|
12 | + 2.5.1 Generic Install Instructions |
---|
13 | + 2.5.2 Curses Notes |
---|
14 | + 2.5.3 Upgrading from Aspell .33/Pspell .12 |
---|
15 | + 2.5.4 Upgrading from a pre-release snapshot |
---|
16 | + 2.5.5 Sun WorkShop 6 Compiler Notes |
---|
17 | + 2.5.6 Win32 Notes |
---|
18 | o 2.5.6.1 Getting |
---|
19 | o 2.5.6.2 Building |
---|
20 | o 2.5.6.3 (PD)Curses |
---|
21 | o 2.5.6.4 Directories |
---|
22 | o 2.5.6.5 Installer |
---|
23 | o 2.5.6.6 Win32 consoles |
---|
24 | |
---|
25 | * 2.6 Using aspell-import |
---|
26 | |
---|
27 | -------------------------------------------------------------------------- |
---|
28 | |
---|
29 | 2. Getting Started |
---|
30 | |
---|
31 | |
---|
32 | 2.1 Requirements |
---|
33 | |
---|
34 | Aspell requires gcc 2.95 (or better) as the C++ compiler. Other C++ |
---|
35 | compilers should work with some effort. Other C++ compilers for mostly |
---|
36 | POSIX compliant (Unix, Linux, BeOS, CygWin) systems should work with out |
---|
37 | any major problems provided that the compile can handle all of the |
---|
38 | advanced C++ features Aspell uses. C++ compilers for non-Unix systems |
---|
39 | might work but it will take some work. Aspell at very least requires a |
---|
40 | Unix-like environment (sh, grep, sed, tr, etc...) in order to build. |
---|
41 | Aspell also uses a few POSIX functions when necessary. |
---|
42 | |
---|
43 | 2.2 Obtaining |
---|
44 | |
---|
45 | The latest version can always be found at GNU Aspell's home page at http:/ |
---|
46 | /aspell.net. |
---|
47 | |
---|
48 | 2.3 Support |
---|
49 | |
---|
50 | Support for Aspell can be found on the Aspell mailing lists. Instructions |
---|
51 | for joining the various mailing lists (and an archive of them) can be |
---|
52 | found off the Aspell home page at http://aspell.net. |
---|
53 | |
---|
54 | 2.4 Helping Out |
---|
55 | |
---|
56 | I have very little time to work on Aspell so I desperately need other |
---|
57 | people to help with the development of Aspell. There are a lot of things |
---|
58 | that need to be done before I consider Aspell complete. See section B.2 |
---|
59 | for a list of them. I would really appreciate some help with doing them. |
---|
60 | If you are interested in helping with one of them please let me know. |
---|
61 | |
---|
62 | I am also looking for someone to eventually take over the maintenance and |
---|
63 | development of Aspell. If you are interested please contact me directly. |
---|
64 | |
---|
65 | 2.5 Compiling & Installing |
---|
66 | |
---|
67 | 2.5.1 Generic Install Instructions |
---|
68 | |
---|
69 | ./configure && make |
---|
70 | |
---|
71 | For additional configure options type ./configure --help. You can control |
---|
72 | what C++ compiler is used by setting the environmental variable CXX before |
---|
73 | running configure and you can control what flags are passed to the C++ |
---|
74 | compile via the environmental variable CXXFLAGS. Static libraries are |
---|
75 | disabled by default since static libraries will not work right due to the |
---|
76 | mixing of C and C++. When a C program links with the static libraries in |
---|
77 | Aspell it is likely to crash because Aspell's C++ objects are not getting |
---|
78 | initialized correctly. However, if for some reason you want them, you can |
---|
79 | enable them via --enable-static. |
---|
80 | |
---|
81 | Aspell should then compile with out any additional user intervention. If |
---|
82 | you run into problems please first check the sections below as that might |
---|
83 | solve your problem. |
---|
84 | |
---|
85 | To install the program simply type |
---|
86 | |
---|
87 | make install |
---|
88 | |
---|
89 | After Aspell is installed at least one dictionary needs to be installed. |
---|
90 | You can find them at http://aspell.net/. The "aspell" program must be in |
---|
91 | your path in order for the dictionaries to install correctly. |
---|
92 | |
---|
93 | If you do not have Ispell or the traditional Unix "spell" utility |
---|
94 | installed on your system than you should also copy the compatibly scripts |
---|
95 | "ispell" and "spell" located in the scripts/ directory into your |
---|
96 | binary directory which is usually /usr/local/bin so that programs that |
---|
97 | expect ispell or spell command will work correctly. |
---|
98 | |
---|
99 | 2.5.2 Curses Notes |
---|
100 | |
---|
101 | If you are having problems compiling termios.cc than the most likely |
---|
102 | reason is due to incompatibilities with the curses implementation on your |
---|
103 | system. If this is the case than you can explicitly disable the curses |
---|
104 | library with --disable-curses. By doing this you will lose the nice full |
---|
105 | screen interface but hopefully you will be able to at least get Aspell to |
---|
106 | compile correctly. |
---|
107 | |
---|
108 | If the curses library is installed in a non-standard location than you can |
---|
109 | specify the library and include directory with --enable-curses=«lib» and |
---|
110 | --enable-curses-include=«dir». Lib can either be the complete path of the |
---|
111 | library (for example "/usr/local/curses/libcurses.a"), the name of the |
---|
112 | library (for example "ncurses") or a combined location and library in |
---|
113 | the form "-L«lib dir» -l«lib»" (for example "-L/usr/local/ncurses/lib |
---|
114 | -lncurses"). Dir is the location of the curses header files (for example |
---|
115 | "/usr/local/ncurses/include"). |
---|
116 | |
---|
117 | 2.5.3 Upgrading from Aspell .33/Pspell .12 |
---|
118 | |
---|
119 | Aspell has undergone an extremely large number of changes since the |
---|
120 | previous Aspell/Pspell release. For one thing Pspell has been merged with |
---|
121 | Aspell so there in no longer two separate libraries you have to worry |
---|
122 | about. |
---|
123 | |
---|
124 | Because of the massive changes between Aspell/Pspell and Aspell 0.50 you |
---|
125 | may want to clean out the old files before installing the the new Aspell. |
---|
126 | To do so do a "make uninstall" in the original Aspell and Pspell source |
---|
127 | directories. |
---|
128 | |
---|
129 | The way dictionaries are handled has also changed. This includes a change |
---|
130 | in the naming conventions of both language names and dictionaries. Due to |
---|
131 | the language name change, your old personal dictionaries will not be |
---|
132 | recognized. However, you can import the old dictionaries by running the |
---|
133 | "aspell-import" script. This also means that dictionaries designed to |
---|
134 | work with older versions of Aspell are not likely to function correctly. |
---|
135 | Fortunately new dictionary packages are available for most languages. You |
---|
136 | can find them off of the Aspell home page at http://aspell.net. |
---|
137 | |
---|
138 | The Pspell ABI is now part of Aspell except that the name of everything |
---|
139 | has changed due to the renaming of Pspell to Aspell. In particular please |
---|
140 | note the following name changes: |
---|
141 | |
---|
142 | pspell -> aspell |
---|
143 | manager -> speller |
---|
144 | emulation -> enumeration |
---|
145 | master_word_list -> main_word_list |
---|
146 | |
---|
147 | Please also note that the name of the language-tag option has changed to |
---|
148 | lang. However, for backward compatible the language-tag option will still |
---|
149 | work. |
---|
150 | |
---|
151 | However, you should also be able to build applications that require Pspell |
---|
152 | with the new Aspell as a backward compatibility header file is provided. |
---|
153 | |
---|
154 | Due to a change in the way dictionaries are handled, scanning for .pwli |
---|
155 | files in order to get find out which dictionaries are available will no |
---|
156 | longer work. This means that programs that relied on this technique may |
---|
157 | have problems finding dictionaries. Fortunately, GNU Aspell now provided a |
---|
158 | uniform way to list all installed dictionaries via the C API. See the file |
---|
159 | "list-dicts.c" in the examples/ directory for an example of how to due |
---|
160 | this. Unfortunately there is isn't any simply way to find out which |
---|
161 | dictionaries are installed which will work with both the old Aspell/Pspell |
---|
162 | and the new GNU Aspell. |
---|
163 | |
---|
164 | 2.5.4 Upgrading from a pre-release snapshot |
---|
165 | |
---|
166 | At the last minute I decided to merge the "speller-util" program into |
---|
167 | the main "aspell" program. You may right to remove that speller-util |
---|
168 | program to avoid confusion. This also means that dictionaries designed to |
---|
169 | work with the snapshot will no longer work with the official release. |
---|
170 | |
---|
171 | 2.5.5 Sun WorkShop 6 Compiler Notes |
---|
172 | |
---|
173 | Thanks to Flemming Frandsen Aspell should be able to compile with the Sun |
---|
174 | WorkShop 6 Compiler. However, you may still have some problems. See the |
---|
175 | README file in the suncc/ directory for more detail. |
---|
176 | |
---|
177 | 2.5.6 Win32 Notes |
---|
178 | |
---|
179 | 2.5.6.1 Getting |
---|
180 | |
---|
181 | The latest version of the native Aspell/Win32 port can be found at http:// |
---|
182 | aspell.net/win32. |
---|
183 | |
---|
184 | 2.5.6.2 Building |
---|
185 | |
---|
186 | There are two basically different ways of building Aspell using GCC for |
---|
187 | Win32: You can either use the Cygwin compiler, which will produce binaries |
---|
188 | that depend on the posix layer in cygwin1.dll. The other way is using |
---|
189 | MinGW GCC, those binaries use the native C runtime from Microsoft |
---|
190 | (MSVCRT.DLL). If you intend to use or link against the Aspell libraries |
---|
191 | using a native Win32 compiler (e.g. MS Visual C++), you will need the |
---|
192 | MinGW built ones to avoid problems caused by the different runtime |
---|
193 | libraries. |
---|
194 | |
---|
195 | Building Aspell using Cygwin: This works exactly like on other posix |
---|
196 | compatible systems using the "configure && make && make install" cycle. |
---|
197 | Some versions of Cygwin GCC will fail to link, this is caused by an |
---|
198 | incorrect libstdc++.la in the /lib directory. After removing or renaming |
---|
199 | this file, the build progress should work (GCC-2.95 and GCC-3.x should |
---|
200 | work). |
---|
201 | |
---|
202 | Building Aspell using MinGW: To compile Aspell with the MinGW compiler, |
---|
203 | you will need at least GCC-3.2 (as shipped with MinGW-2.0.3) and some GNU |
---|
204 | tools like rm and cp. The origin of those tools doesn't matter, it has |
---|
205 | shown to work with any tools from MinGW/MSys, Cygwin or Linux. To build |
---|
206 | Aspell, move into the win32 subdirectory and type "make". You can enable |
---|
207 | some additional build options by either commenting out the definitions at |
---|
208 | the head of the Makefile or passing those values as environment variables |
---|
209 | or at the make command line. Following options are supported: |
---|
210 | |
---|
211 | DEBUGVERSION |
---|
212 | If set to "1", the binaries will include debugging information |
---|
213 | (resulting in a much bigger size). |
---|
214 | CURSESDIR |
---|
215 | Enter the path to the pdcurses library here, in order to get a nicer |
---|
216 | console interface (see below). |
---|
217 | MSVCLIB |
---|
218 | Enter the filename of MS lib.exe here, if you want to build libraries |
---|
219 | that can be imported from MS Visual C++. |
---|
220 | WIN32_RELOCATABLE |
---|
221 | If set to "1", Aspell will detect the prefix from the path where the |
---|
222 | DLL resides (see below for further datails). |
---|
223 | TARGET |
---|
224 | Sets a prefix to be used for cross compilation (e.g. "/usr/local/bin/ |
---|
225 | i586-mingw32msvc-" to cross compile from linux). |
---|
226 | |
---|
227 | There are also a MinGW compilers available for Cygwin and Linux, both |
---|
228 | versions are able to compile Aspell using the prebuilt Makefile. While the |
---|
229 | Cygwin port automatically detects the correct compiler, the Linux version |
---|
230 | depends on setting the "TARGET" variable in the Makefile (or environment) |
---|
231 | to the correct compiler prefix. |
---|
232 | |
---|
233 | Other compilers may work. There is a patch for MS Visual C++ 6.0 available |
---|
234 | in the win32/ directory, but it needs a lot of changes to the Aspell |
---|
235 | sources. It has also been reported that the Intel C++ compiler can be used |
---|
236 | for compilation. |
---|
237 | |
---|
238 | 2.5.6.3 (PD)Curses |
---|
239 | |
---|
240 | In order to get the nice full screen interface when spell checking files a |
---|
241 | curses implementation that does not require Cygwin is required. The |
---|
242 | PDCurses (http://pdcurses.sourceforge.net) implementation is known to |
---|
243 | work, other implementations may work however they have not been tested. |
---|
244 | See the previous section for information on specifying the location of the |
---|
245 | curses library and include file. |
---|
246 | |
---|
247 | Curses notes: |
---|
248 | |
---|
249 | * PDcurses built with MinGW needs to be compiled with -DPDC_STATIC_BUILD |
---|
250 | to avoid duplicate declaration of DllMain when compiling aspell.exe. |
---|
251 | * The curses enabled version can cause trouble in some shells (MSys |
---|
252 | rxvt, emacs) and will produce errors like "initscr() LINES=1 COLS=1: |
---|
253 | too small". Use a non-curses version for those purposes. |
---|
254 | |
---|
255 | 2.5.6.4 Directories |
---|
256 | |
---|
257 | If Aspell is compiled with WIN32_RELOCATABLE=1, it can be run from any |
---|
258 | directory: It will set «prefix» according to its install location |
---|
259 | (assuming it resides in «prefix»\bin). Your personal wordlists will be |
---|
260 | saved in the «prefix» directory with their names changed from ".aspell. |
---|
261 | <lang>.*" to "<lang>.*" (you can override the path by setting the HOME |
---|
262 | environment variable). |
---|
263 | |
---|
264 | 2.5.6.5 Installer |
---|
265 | |
---|
266 | The installer registers the DLLs as shared libraries, you should increase |
---|
267 | the reference counter to avoid the libraries being uninstalled if your |
---|
268 | application still depends on them (and decrease it again when uninstalling |
---|
269 | your program). The reference counters are located under: |
---|
270 | |
---|
271 | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs |
---|
272 | |
---|
273 | The install location and version numbers are stored under |
---|
274 | |
---|
275 | HKLM\SOFTWARE\Aspell |
---|
276 | |
---|
277 | 2.5.6.6 Win32 consoles |
---|
278 | |
---|
279 | The console uses a different encoding than GUI applications, changing this |
---|
280 | to to a Windows encoding (e.g. 1252) is not supported on Win9x/Me. On |
---|
281 | WinNT (and later) those codepages can be set by first changing the console |
---|
282 | font to "lucida console", then changing the codepage using "chcp |
---|
283 | 1252". |
---|
284 | |
---|
285 | Some alternative shells (e.g. MSys' rxvt or Cygwin's bash) do a codepage |
---|
286 | conversion (if correctly set up), so running Aspell inside those shells |
---|
287 | might be a workaround for Win9x. |
---|
288 | |
---|
289 | 2.6 Using aspell-import |
---|
290 | |
---|
291 | The aspell-import Perl script will look for old personal dictionaries and |
---|
292 | will import them into GNU Aspell. It will look for both Ispell and Aspell |
---|
293 | ones. To use it just run it from the command prompt. If you get an error |
---|
294 | about /usr/bin/perl not being found than instead try "perl «bindir»/ |
---|
295 | aspell-import". When running the script if you get a message like: |
---|
296 | |
---|
297 | Error: No word lists can be found for the language "de". |
---|
298 | |
---|
299 | This means that you have not installed support for the given language, in |
---|
300 | this case "de" for German. To rectify the situation download and install |
---|
301 | a dictionary designed to work with GNU Aspell 0.50 or better. |
---|
302 | |
---|
303 | -------------------------------------------------------------------------- |
---|
304 | next up previous contents |
---|
305 | Next: 3. Basic Usage Up: GNU Aspell 0.50.5 Previous: 1. Introduction |
---|
306 | Contents |
---|
307 | Kevin Atkinson 2004-02-10 |
---|