instead writing the libpcreposix.pc file as below works:
###########################################################
# Package Information for pkg-config
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
Name: libpcreposix
Description: PCRE - Perl compatible regular expressions C library
Version: 7.8
Libs: -L${libdir} -lpcreposix
Cflags: -I${includedir}
#########################################################
This can probably be solved properly in another way. I assume by changing the configure script.
Unfortunately I don't know that stuff at all.