Re: How to get autoconf to respect CC="gcc -std=c89"?
Paul Eggert <[email protected]> Fri, 6 Oct 2023 17:08:38 -0700
| Newsgroups | gmane.comp.sysutils.autoconf.patches,gmane.comp.sysutils.autoconf.general |
|---|---|
| Organization | UCLA Computer Science Department |
| Message-ID | <[email protected]> |
Thanks for looking into this.
Some comments.
This doesn't let you say "I want either c89 or c99, but not c11".
> + m4_ifdef([_AC_C_STANDARD_VERSION_LIST],
> + [m4_fatal([AC_PROG_C_STANDARD_VERSION should only be used once], 1)])
Why have this check?
How about something simpler, like replacing this:
m4_map([_AC_PROG_CC_STDC_EDITION_TRY], [[11], [99], [89]])])
with this:
m4_map([_AC_PROG_CC_STDC_EDITION_TRY],
[m4_default([_AC_C_STANDARD_VERSION_LIST],
[[11], [99], [89]])])
and not bothering to check for allowed or duplicated version lists?