diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 4 | ||||
-rw-r--r-- | src/modules/extra/pcre_rpath.pl | 7 |
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"; + |