aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-24 18:59:38 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-05-24 18:59:38 +0000
commitbe3978a078196c423d1974d87bd3cf07a3dd2d45 (patch)
treee44246df2d7e606e71f93f5c4ea2e24c33947aaf
parent5922a70e798ed9ab8c8abf542794602fb82780c5 (diff)
downloadusdx-be3978a078196c423d1974d87bd3cf07a3dd2d45.tar.gz
usdx-be3978a078196c423d1974d87bd3cf07a3dd2d45.tar.xz
usdx-be3978a078196c423d1974d87bd3cf07a3dd2d45.zip
add configure for libpcre and add path for dlopen on darwin
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2416 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--configure.ac10
-rw-r--r--src/config-darwin.inc5
-rw-r--r--src/config.inc.in5
-rw-r--r--src/lib/pcre/pcre.pas5
4 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0e9214e3..78bd2d4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,16 @@ AC_SUBST(USE_PROJECTM_CWRAPPER, $libprojectM_USE_CWRAPPER)
PKG_HAVE([portaudio], [portaudio-2.0], yes)
PKG_VERSION([portaudio], [portaudio-2.0])
AC_SUBST_DEFINE(HAVE_PORTAUDIO, $portaudio_HAVE)
+
+# find pcre
+libpcre_PKG="libpcre"
+PKG_HAVE([libpcre], [$libpcre_PKG], yes)
+PKG_VERSION([libpcre], [$libpcre_PKG])
+AC_SUBST_DEFINE(HAVE_LIBPCRE, $libpcre_HAVE)
+# get libpcre library dir
+PKG_VALUE([libpcre], [LIBDIR], [variable=libdir], [$libpcre_PKG],
+ [library dir (e.g. /usr/lib, /sw/lib, ...)])
+
# find portmixer
PKG_HAVE([portmixer], [portmixer], no)
AC_SUBST_DEFINE(HAVE_PORTMIXER, $portmixer_HAVE)
diff --git a/src/config-darwin.inc b/src/config-darwin.inc
index 83cadbae..4c128a05 100644
--- a/src/config-darwin.inc
+++ b/src/config-darwin.inc
@@ -50,4 +50,9 @@
PORTAUDIO_VERSION_RELEASE = 0;
{$IFEND}
+{$DEFINE HaveLibPcre}
+{$IF Defined(HaveLibPcre) and Defined(IncludeConstants)}
+ LIBPCRE_LIBDIR = '/sw/lib';
+{$IFEND}
+
{$UNDEF HavePortmixer}
diff --git a/src/config.inc.in b/src/config.inc.in
index b5e086f4..d57c7ab4 100644
--- a/src/config.inc.in
+++ b/src/config.inc.in
@@ -50,4 +50,9 @@
PORTAUDIO_VERSION_RELEASE = @portaudio_VERSION_RELEASE@;
{$IFEND}
+{$@DEFINE_HAVE_LIBPCRE@ HaveLibPcre}
+{$IF Defined(HaveLibPcre) and Defined(IncludeConstants)}
+ LIBPCRE_LIBDIR = '@libpcre_LIBDIR@';
+{$IFEND}
+
{$@DEFINE_HAVE_PORTMIXER@ HavePortmixer}
diff --git a/src/lib/pcre/pcre.pas b/src/lib/pcre/pcre.pas
index 50e3371a..fc15bdbc 100644
--- a/src/lib/pcre/pcre.pas
+++ b/src/lib/pcre/pcre.pas
@@ -503,6 +503,9 @@ implementation
uses
SysUtils,
+ {$IFDEF DARWIN}
+ UConfig,
+ {$ENDIF DARWIN}
{$IFDEF MSWINDOWS}
Windows;
{$ENDIF MSWINDOWS}
@@ -536,7 +539,7 @@ const
libpcremodulename = 'libpcre.so.0';
{$ENDIF LINUX}
{$IFDEF DARWIN}
- libpcremodulename = 'libpcre.dylib';
+ libpcremodulename = LIBPCRE_LIBDIR + '/libpcre.dylib';
{$ENDIF DARWIN}
PCRECompileExportName = 'pcre_compile';
PCRECompile2ExportName = 'pcre_compile2';