Re: How to get autoconf to respect CC="gcc -std=c89"?

Paul Eggert <[email protected]>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.