--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ PLUGIN := live
 VERSION := $(shell grep '\#define LIVEVERSION ' setup.h | awk '{ print $$3 }' | sed -e 's/[";]//g')
 
 ### Check for libpcre c++ wrapper
-HAVE_LIBPCRECPP := $(shell pcre-config --libs-cpp)
+HAVE_LIBPCRECPP := $(shell pkg-config --libs libpcrecpp libpcre)
 
 ### The directory environment:
 # Use package data if installed...otherwise assume we're under the VDR source directory:
@@ -37,18 +37,18 @@ APIVERSION := $(call PKGCFG,apiversion)
 include global.mk
 
 ### Determine tntnet and cxxtools versions:
-TNTVERSION = $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
-CXXTOOLVER = $(shell cxxtools-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+TNTVERSION = $(shell pkg-config --modversion tntnet | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+CXXTOOLVER = $(shell pkg-config --modversion cxxtools | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
 
-CXXFLAGS  += $(shell tntnet-config --cxxflags)
-LIBS      += $(shell tntnet-config --libs)
+CXXFLAGS  += $(shell pkg-config --cflags tntnet)
+LIBS      += $(shell pkg-config --libs tntnet)
 
 ### Optional configuration features
 PLUGINFEATURES :=
 ifneq ($(HAVE_LIBPCRECPP),)
 	PLUGINFEATURES += -DHAVE_LIBPCRECPP
-	CXXFLAGS       += $(shell pcre-config --cflags)
-	LIBS           += $(HAVE_LIBPCRECPP)
+	CXXFLAGS       += $(shell pkg-config --cflags libpcreposix libpcre)
+	LIBS           += -Wl,-Bstatic $(HAVE_LIBPCRECPP) -Wl,-Bdynamic
 endif
 
 # -Wno-deprecated-declarations .. get rid of warning: ‘template<class> class std::auto_ptr’ is deprecated
