westes / flex

The Fast Lexical Analyzer - scanner generator for lexing in C and C++
Other
3.54k stars 529 forks source link

build: Update AX_PROG_CC_FOR_BUILD to fix BUILD_EXEEXT problems #649

Closed Explorer09 closed 3 months ago

Explorer09 commented 3 months ago

The BUILD_EXEEXT and BUILD_OBJEXT variables in configure was broken. The ax_prog_cc_for_build.m4 from autoconf-archive upstream contains some fixes to BUILD_EXEEXT and BUILD_OBJEXT, but they were broken again with Autoconf 2.70.

In this PR, I updated the ax_prog_cc_for_build.m4 module while added my own fixes to make BUILD_EXEEXT and BUILD_OBJEXT work in Autoconf 2.70.

(I also submitted the patches upstream, but they are not merged yet: https://savannah.gnu.org/patch/index.php?10452 https://github.com/autoconf-archive/autoconf-archive/pull/296)

westes commented 3 months ago

What is the problem that you're fixing though?

Explorer09 commented 3 months ago

@westes I was trying to rewrite the bootstrap mechanism in the makefiles so that the bootstrap can be more portable -- even when the object file extensions are different (BUILD_EXEEXT != EXEEXT). It's not in a hurry to merge this one, as Flex's makefiles didn't use BUILD_EXEEXT at the moment, but I plan to use it in the rewrite.