configure: Move path (and debug) checks to an m4 include file check_path.m4.