Fix m4 macro dependencies after upgrade from upstream in 937d6d315.

Include config.{guess,sub} scripts from automake, required by
the AC_CANONICAL_HOST macro now used in m4/ax_boost_base.m4.

Add AX_REQUIRE_DEFINED m4 macro required by AX_APPEND_*_FLAGS.
Check for flexc++ and bisonc++ and save versions in config.h.
Fix compile error in checktestdata.

Bisonc++ >= 4.02.00 doesn't work with old generated headers
since exceptionHandler is missing.

Flexc++ >= 2.00.00 doesn't work with old generated headers
since postCode is missing.