PCRE_LIBS and PCRE_CFLAGS with just path is not enough.
In my case, compile glib-2.52.3 with pcre-8.38, i used
PCRE_CFLAGS="/usr/local/include"
PCRE_LIBS="/usr/local/lib",
and get a The system-supplied PCRE does not support Unicode properties or UTF-8
result.
I followed the config.log, it post this
configure:27740: checking for Unicode support in PCRE
configure:27766: gcc -o conftest -g -O2 /usr/local/include -pthread conftest.c /usr/local/lib >&5
/usr/local/include: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure:27766: $? = 1
configure: program exited with status 1
so i changed the flag content, become to this
PCRE_CFLAGS="-I/usr/local/include"
PCRE_LIBS="-L/usr/local/lib"
it tell me
configure:27740: checking for Unicode support in PCRE
configure:27766: gcc -o conftest -g -O2 -I/usr/local/include -pthread conftest.c -L/usr/local/lib >&5
/tmp/cc8eu7d8.o: In function 'main':
/data1/rugalzhang/glib-2.52.3/conftest.c:178: undefined reference to 'pcre_config'
/data1/rugalzhang/glib-2.52.3/conftest.c:181: undefined reference to 'pcre_config'
collect2: ld returned 1 exit status
configure:27766: $? = 1
configure: program exited with status 1
with that, make the final change
PCRE_CFLAGS="-I/usr/local/include"
PCRE_LIBS="-L/usr/local/lib -lpcre"
and it worked for me
config.log
for more verbose details. – Tiptop