summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-11 08:37:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-11 08:37:15 +0000
commit85ed944a30024f3a71b37381054771ad9da92f91 (patch)
tree46cdc45a9ec8aaa2c39bcbfd3240e87742a7651c /src
parent0b29e01eb5169f5e547b87c32de8e452ba3eff17 (diff)
Use pcre-config to detect pcre
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4869 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp4
-rw-r--r--src/modules/extra/pcre_rpath.pl7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index cb3b6b6d3..6ba8afce3 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -37,8 +37,8 @@ class FilterPCREException : public ModuleException
};
/* $ModDesc: m_filter with regexps */
-/* $CompileFlags: -I/usr/local/include */
-/* $LinkerFlags: -L/usr/local/lib -lpcre */
+/* $CompileFlags: -I`pcre-config --prefix`/include */
+/* $LinkerFlags: `pcre-config --libs` `perl extra/pcre_rpath.pl` -lpcre */
class ModuleFilterPCRE : public Module
{
diff --git a/src/modules/extra/pcre_rpath.pl b/src/modules/extra/pcre_rpath.pl
new file mode 100644
index 000000000..4699b7f87
--- /dev/null
+++ b/src/modules/extra/pcre_rpath.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+# Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]
+$data = `pcre-config --libs`;
+$data =~ /-L(\S+)\s/;
+$libpath = $1;
+print "-Wl,--rpath -Wl,$libpath";
+