autoconf-patches
[Top][All Lists]
Advanced

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

Re: AC_PROG_CC_C99


From: Noah Misch
Subject: Re: AC_PROG_CC_C99
Date: Sun, 9 Jan 2005 18:18:15 -0800
User-agent: Mutt/1.5.6i

On Wed, Jan 05, 2005 at 10:11:45PM +0000, Roger Leigh wrote:
> I think the intent of the patch is fine.  However, the use of sed is a
> little dangerous IMHO, since it could break on odd CC environment
> variables.  It might be a bit cleaner (and safer) to have two

It should only break on odd values of $ac_cv_prog_cc_c89, no?  Since we control
those values, we will know if an option arises that might break that `sed' (I do
not suppose that list of options is likely to grow much, though).

> variables that make up $CC (for example $CC_COMPILER and $CC_STANDARD,
> where $CC_COMPILER will contain the compiler name e.g. gcc and
> $CC_STANDARD will contain options to put it into a particular mode
> e.g. -std=gnu99).  This will allow them to be changed separately.

One would presumably set CC_COMPILER=$CC at the top of AC_PROG_CC_C89?  I
thought about that, but I wanted this to work:

AC_PROG_CC       # CC := cc -foo89
CC="$CC -bar"    # CC := cc -foo89 -bar
AC_PROG_CC_STDC  # CC := cc -bar -foo99

Not a big deal, to be sure, but it worked with former definitions of AC_PROG_CC
and AC_PROG_CC_STDC, so we may as well not break it.




reply via email to

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