aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pcre
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/pcre/pcre.pas7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/pcre/pcre.pas b/src/lib/pcre/pcre.pas
index fc15bdbc..075fd417 100644
--- a/src/lib/pcre/pcre.pas
+++ b/src/lib/pcre/pcre.pas
@@ -539,7 +539,8 @@ const
libpcremodulename = 'libpcre.so.0';
{$ENDIF LINUX}
{$IFDEF DARWIN}
- libpcremodulename = LIBPCRE_LIBDIR + '/libpcre.dylib';
+ libpcremodulename = 'libpcre.dylib';
+ libpcremodulenamefromfink = LIBPCRE_LIBDIR + '/libpcre.dylib';
{$ENDIF DARWIN}
PCRECompileExportName = 'pcre_compile';
PCRECompile2ExportName = 'pcre_compile2';
@@ -783,6 +784,10 @@ begin
{$IFDEF UNIX}
PCRELib := dlopen(PAnsiChar(libpcremodulename), RTLD_NOW);
{$ENDIF UNIX}
+ {$IFDEF DARWIN} // if not found, do another try from the fink path
+ if PCRELib = INVALID_MODULEHANDLE_VALUE then
+ PCRELib := dlopen(PAnsiChar(libpcremodulenamefromfink), RTLD_NOW);
+ {$ENDIF DARWIN}
Result := PCRELib <> INVALID_MODULEHANDLE_VALUE;
if Result then
begin