From 85ed944a30024f3a71b37381054771ad9da92f91 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Aug 2006 08:37:15 +0000 Subject: Use pcre-config to detect pcre git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4869 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_filter_pcre.cpp | 4 ++-- src/modules/extra/pcre_rpath.pl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/modules/extra/pcre_rpath.pl 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"; + -- cgit v1.2.3