Here is the pkgsrc patch to add the patch needed to build M4.
fetch http://apollo.backplane.com/DFlyMisc/pkgsrc-devel-m4.patch
I am committing the stdio bits needed to HEAD and 1.12. I didn't want
to try to implement __sreadahead() in the patch so I'm doing it natively
and having the patch call it.
-Matt