Just unpacked m4-1.4.17 here (Fedora 31; your latest might be another version... but it seems to date from 2013). The offending file is there (in build-aux/snippet). There is a script called bootstrapincluded, but that presumably is only needed for sources straight from version control.
The traditional ./configure; make dance goes fine, but fails after compiling a bunch of stuff with:
freadahead.c: In function 'freadahead':
freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
A simple search for "GNU m4 FreeBSD" leads to FreshPorts, FreeBSD's m4 manual talks about a -g option to activate GNU m4 compatitility. Why aren't those enough? Presumably whatever patched version FreshPorts carries is a better starting point (if they are civilized and carry original sources and separate patches, porting the patches to another version is less work than debugging this mess yourself).