Add m4 macros for swig to the repo so we do not needlessly pull other deps. Move the py detection in front of output.