That's because you're using a badly broken flex:
% flex --version flex 2.5.31
I know very little (enough to get by) about the configuration phase when building postgresql but couldn't this be checked for?
That is, configure could check the version of various tools, like flex, and warn if appropriate.
K.
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster