autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PROG_CC_C99


From: Paul Eggert
Subject: Re: AC_PROG_CC_C99
Date: Wed, 01 Dec 2004 17:26:51 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Roger Leigh <address@hidden> writes:

> One change I've made is added arguments to AC_PROG_CC_C89,
> AC_PROG_CC_C89 and AC_PROG_CC_STDC to allow custom code to run on
> success or failure, to e.g. abort configure if there isn't a C99
> compiler available.

I'd rather avoid this complexity.  Isn't it easy enough to abort based
on the value of ac_cv_prog_cc_c89 (or whatever)?

> I can re-do the diff against autoconf CVS if required--I just don't
> have a copy right now.

That would be helpful, once you have the papers signed etc.

We also need a patch to doc/autoconf.texi and to NEWS.

> +# It
> +# considers the compiler to be in ISO C99 C mode if it handles mixed
> +# code and declarations, _Bool, inline and restrict.

Can you please also check for the following features?

  variable declarations in for loops
  last member of a struct may be an incomplete array type
  varargs macros
  named initialization of structs
  variable length arrays
  long long

These are all features that C99-ish programs are likely to want.

> +# AC_PROG_CC_STDC ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE])
> +# ----------------------------------------------------------------
> +AC_DEFUN([AC_PROG_CC_STDC],
> +[AC_PROG_CC_C99([$1], [$2])])

This isn't quite right.  It should try for C99 mode, and failing that
it should try for C89 mode.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]