fix configure.ac with no pcre lib, add static linking flag