aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2014-11-22 23:45:59 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2014-11-22 23:45:59 +0000
commit7ac852cd9709af98b6c12f2c7eca67915932e8a9 (patch)
tree1ffa660b599f2e3227dcde7262751f147e7c4ade /src
parent8b8bc75c3f913dee50e10fb66d157cc278bd8570 (diff)
downloadusdx-7ac852cd9709af98b6c12f2c7eca67915932e8a9.tar.gz
usdx-7ac852cd9709af98b6c12f2c7eca67915932e8a9.tar.xz
usdx-7ac852cd9709af98b6c12f2c7eca67915932e8a9.zip
Fix PCRE on linux and macosx. The soname of libpcre.so is different depending on the system, e.g. .so.1 on Arch and .so.3 on Debian. Instead of always using libpcre.so.0, detect the soname for the current system. Thanks to rudi_s.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3105 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/config.inc.in1
-rw-r--r--src/lib/pcre/pcre.pas5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/config.inc.in b/src/config.inc.in
index 967612a4..232ba615 100644
--- a/src/config.inc.in
+++ b/src/config.inc.in
@@ -71,6 +71,7 @@
{$@DEFINE_HAVE_LIBPCRE@ HaveLibPcre}
{$IF Defined(HaveLibPcre) and Defined(IncludeConstants)}
+ LIBPCRE_LIBNAME = '@libpcre_LIBNAME@';
LIBPCRE_LIBDIR = '@libpcre_LIBDIR@';
{$IFEND}
diff --git a/src/lib/pcre/pcre.pas b/src/lib/pcre/pcre.pas
index ab04a9d0..d328f4cf 100644
--- a/src/lib/pcre/pcre.pas
+++ b/src/lib/pcre/pcre.pas
@@ -503,9 +503,7 @@ implementation
uses
SysUtils,
- {$IFDEF DARWIN}
UConfig,
- {$ENDIF DARWIN}
{$IFDEF MSWINDOWS}
Windows;
{$ENDIF MSWINDOWS}
@@ -536,7 +534,8 @@ const
libpcremodulename = 'pcre3.dll';
{$ENDIF MSWINDOWS}
{$IFDEF LINUX}
- libpcremodulename = 'libpcre.so.0';
+ // "libpcre.so.<soname>", soname is different on platforms
+ libpcremodulename = LIBPCRE_LIBNAME;
{$ENDIF LINUX}
{$IFDEF DARWIN}
libpcremodulename = 'libpcre.dylib'; // this is a symlink for example to libpcre.0.0.1.dylib