* clear up aspell of useless define/code (LOGGING, 64compat)

* use "static" dynlinking on Linux and FreeBSD (to enable easier redistribution)

git-svn-id: trunk@9169 -
This commit is contained in:
Almindor 2007-11-09 18:27:50 +00:00
parent 33b5d4d73c
commit 39d365f7a7

View File

@ -15,18 +15,13 @@ uses
cTypes, DynLibs; cTypes, DynLibs;
{$IFDEF Linux} {$IFDEF Linux}
{$IFDEF Compat64}
{$DEFINE Static} {$DEFINE Static}
const aspelllib='aspell'; const aspelllib='aspell';
{$ELSE}
{$DEFINE Dynamic}
const aspelllib='/usr/lib/libaspell.so';
{$ENDIF}
{$ENDIF} {$ENDIF}
{$IFDEF FreeBSD} {$IFDEF FreeBSD}
{$DEFINE Dynamic} {$DEFINE Static}
const aspelllib='/usr/local/lib/libaspell.so'; const aspelllib='aspell';
{$ENDIF} {$ENDIF}
{$IFDEF darwin} {$IFDEF darwin}
@ -130,9 +125,12 @@ procedure delete_aspell_speller (ths:aspellspeller); cdecl; external aspelllib;
implementation implementation
{$ifdef windows} {$ifdef Dynamic}
uses uses
SysUtils; {$ifdef windows}
SysUtils,
{$endif}
dynlibs;
{$endif} {$endif}
{$IFDEF Dynamic} {$IFDEF Dynamic}
@ -175,12 +173,7 @@ var
alib := LoadLibrary(mylib); alib := LoadLibrary(mylib);
if alib = NilHandle then if alib = NilHandle then
begin
{$IFDEF LOG}
debuglog (' Error loading spellchecking engine...');
{$ENDIF}
exit; exit;
end;
if loadsymbol ('new_aspell_config',@new_aspell_config)=false then exit; if loadsymbol ('new_aspell_config',@new_aspell_config)=false then exit;
if loadsymbol ('get_aspell_dict_info_list',@get_aspell_dict_info_list)=false then exit; if loadsymbol ('get_aspell_dict_info_list',@get_aspell_dict_info_list)=false then exit;