* first part of aspell libloading fix

git-svn-id: trunk@12233 -
This commit is contained in:
Almindor 2008-11-26 12:58:35 +00:00
parent c1cfc941b4
commit 109dddc439

View File

@ -15,30 +15,18 @@ interface
uses uses
cTypes; cTypes;
{$IFDEF Linux} {$IFDEF UNIX}
const libaspell = '/usr/lib/libaspell.so'; // TODO: check if it works pathless in beosOB
{$ENDIF} {$ifndef DARWIN}
const libaspell = 'libaspell.so';
{$IFDEF FreeBSD} {$ELSE}
const libaspell = '/usr/local/lib/libaspell.so'; {WARNING Is it possible to omit the path?}
{$ENDIF}
{$IFDEF darwin}
const libaspell = '/opt/local/lib/libaspell.dylib'; const libaspell = '/opt/local/lib/libaspell.dylib';
{$ENDIF} {$ENDIF}
{$ELSE} // windows
{$IFDEF windows}
const libaspell = 'aspell-%s.dll'; const libaspell = 'aspell-%s.dll';
{$ENDIF} {$ENDIF}
{$IFDEF BeOS}
const libaspell = '/boot/home/config/lib/libaspell.so';
{$ENDIF}
{$IFDEF Solaris}
const libaspell = '/opt/csw/lib/libpspell.so.15';
{$ENDIF}
{$IFDEF SkyOS} {$IFDEF SkyOS}
{$DEFINE STATIC_ASPELL} {$DEFINE STATIC_ASPELL}
{$LINKLIB aspell} {$LINKLIB aspell}
@ -1074,11 +1062,10 @@ begin
libname := '/sw/lib/libaspell.dylib'; libname := '/sw/lib/libaspell.dylib';
LibHandle := LoadLibrary(libname); LibHandle := LoadLibrary(libname);
end; end;
{$endif} {$else}
{$ifdef unix} // we're not in windblows
{$ifdef linux}
if LibHandle = 0 then begin if LibHandle = 0 then begin
for i := 15 to 30 do begin // TODO: make sure to up this when required for i := 15 to 20 do begin // TODO: make sure to cut this if they break compat
str(i, s); str(i, s);
libname := libn + '.' + s; libname := libn + '.' + s;
LibHandle := LoadLibrary(libname); LibHandle := LoadLibrary(libname);
@ -1086,7 +1073,8 @@ begin
Break; Break;
end; end;
end; end;
{$endif} {$endif} // unix
{$endif} // darwin
if LibHandle = 0 then if LibHandle = 0 then
Exit(False); Exit(False);