Apparently gnuflex on MacOS & Linux requires the -R option or %option reentrant to generate a reentrant scanner, but on FreeBSD it generates a reentrant scanner by default and throws an error if the -R or %option reentrant are provided. I’d like to have autoconf automatically check to see if gnuflex allows the -R option and, if so, provide it. It’s not clear to me how I can make autoconf test for this. My guess is that I should run gnuflex on a null file with the -R and check the result code and set some kind of variable, and then add it to the FLEX options, but I’m not really sure. Any ideas?
Apparently gnuflex on MacOS & Linux requires the -R option or %option reentrant to
Share
I’ll assume you’ve set
$FLEX, probably with a combination ofAC_ARG_VARandAC_PATH_PROG.