Browse Source

* 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 -

Almindor 18 years ago
parent
commit
39d365f7a7
1 changed files with 7 additions and 14 deletions
  1. 7 14
      packages/extra/aspell/aspell.pp

+ 7 - 14
packages/extra/aspell/aspell.pp

@@ -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}
- const aspelllib='/usr/local/lib/libaspell.so';
+  {$DEFINE Static}
+  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;