Couldn't it run m4 -d and capture output, see if it is accepted, and change options to suit?
On Tue, Jan 25, 2022 at 4:14 PM, william@welliver.org<william@welliver.org> wrote:I've traced down some problems running the testsuite on systems thatship with a non-gnu m4. Specifically, mktestsuite calls m4 with the "-d"argument. Using gm4, the lack of flags implies the a,e and q flags. OnBSD m4, the "-d" argument /requires/ flags, though the flags themselvesare the same as GNU m4. POSIX/Solaris/illumos m4 doesn't support thedebug argument at all.Looking at mktestsuite, it tries to determine whether it's using GNU m4,and will prefer (but not require it) it should it find one. Once it'schosen the m4 binary, it seems to assume that GNU options areacceptable.Since that doesn't work, I'm wondering what the preferred ought to be:1. require GNU m42. just use the full -d argument and hope (solaris/etc) users willfigure out they need gm43. try to detect what sub-flavor of non-GNU m4 is being usedI don't recall the last time I ran across a solaris system without thegnu build tools. I'd be inclined to take option 2 since it shouldn'tbreak anyone and will improve the situation for some. A more elaboratesolution could be considered if some POSIX purists complain later.Thoughts?Bill