Remove unused variables and fix warnings with ifdefed variables. Thanks to rudi_s.
Use AC_CONFIG_MACRO_DIR. This way autoconf doesnt require the path to dists/autogen/m4 as option and autoreconf works out of the box. However, it seems that older autoconf versions ( like the one in Debian Wheezy ) are buggy in that regard and still require the path. Therefore, dont change autogen.sh. Thanks to rudi_s.
Fix PCRE on linux and macosx. The soname of libpcre.so is different depending on the system, e.g. .so.1 on Arch and .so.3 on Debian. Instead of always using libpcre.so.0, detect the soname for the current system. Thanks to rudi_s.
use correct variable in time line. Thanks to rudi_s.