From 39aaf72754dcca65c6f7ef4ac4e91c344c7d98a1 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 30 May 2010 11:24:59 +0000 Subject: more careful with the path to libpcre.dylib. avoid possible problem with standalone version. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2426 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/pcre/pcre.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3