Fix PCRE checks on FreeBSD

Use FR_SMART_CHECK_LIB so we pick up the PCRE libraries on FreeBSD (they're in /usr/local/lib)

Pass pcre_lib_dir to FR_SMART_CHECK_LIB, so the user defined libpcre ./configure argument isn't ignored

Correct use of macros in the code, so we actually *use* the result of the -lpcre check

Remove unused variables and substitutions

Add output for extended regular expressions check