[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting AC_PROG_CC_C99
From: |
Gary V. Vaughan |
Subject: |
Re: Getting AC_PROG_CC_C99 |
Date: |
Fri, 30 Sep 2011 22:04:20 +0700 |
[Re-adding bug-autoconf]
Hi Bruno,
On 30 Sep 2011, at 16:56, Bruno Haible wrote:
> Gary V. Vaughan wrote:
>> But why emit a warning when
>> we can just fix-up the definition on the fly? ...
>> This changeset fixes AC_PROG_CC_C99
>> (and effectively AC_PROG_CC_STDC) whether it is called before or
>> after gl_EARLY, directly or by AC_PROG_CC_STDC, or even not at all!
>> ...
>> +[AC_PROVIDE_IFELSE([AC_PROG_CC_C99],
>> + [AC_DEFUN([AC_PROG_CC_C99])],
>> + [AC_DEFUN([AC_PROG_CC_C99],
>> + m4_defn([AC_PROG_CC_C99])[AC_DEFUN([AC_PROG_CC_C99])])])])
>
> We can't use this. AC_PROVIDE_IFELSE is undocumented.
Oh yuck. Good point. Libtool is a bad citizen... oopsie.
>> By putting the fix in gl_EARLY rather than autoconf itself, there's
>> still the possibility of getting multiple expansions with something
>> like:
>>
>> AC_PROG_CC
>> AC_PROG_CC_C99
>> AC_PROG_CC_STDC
>> gl_EARLY
>>
>> But that seems pathological to me in any case, so I haven't tried to
>> address that.
>
> That's why I think it should be addressed in Autoconf.
And I think it is as easy as adding AC_DEFUN([AC_PROG_CC_C99]) to the
end of the existing AC_PROG_CC_C99 macro to make sure subsequent invocations
expand to nothing. And maybe the same thing in AC_PROG_CC_C89 if it has the
same bug.
Autoconf folks, please ask me if you'd like a patch to that effect.
>> * m4/gnulib-common (gl_PROG_CC_C99_ONCE): New macro to automatically
>> neuter AC_PROG_CC_C99 after first invocation.
>
> We didn't say that we want to enable C99 for all programs. See
> <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>
Ah yes, I got a bit too excited there.
> I'm applying this for now. Maybe you have a more acceptable workaround against
> the "$CC gets augmented twice" problem?
Your patch is perfectly acceptable to me already. Thank you!
> 2011-09-30 Bruno Haible <address@hidden>
>
> Centralize C99 requirement.
> * m4/gnulib-common.m4 (gl_PROG_CC_C99): New macro.
> * modules/stdarg (configure.ac-early): Invoke it instead of
> AC_PROG_CC_STDC.
> Reported by Gary V. Vaughan and Paul Eggert.
Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)
- Re: Fwd: Getting AC_PROG_CC_C99, (continued)
- Re: Fwd: Getting AC_PROG_CC_C99, Paul Eggert, 2011/09/28
- Re: Getting AC_PROG_CC_C99, Gary V. Vaughan, 2011/09/29
- Re: Getting AC_PROG_CC_C99, Bruno Haible, 2011/09/29
- Re: Getting AC_PROG_CC_C99, Paul Eggert, 2011/09/29
- Re: Getting AC_PROG_CC_C99, Bruno Haible, 2011/09/30
- Re: Getting AC_PROG_CC_C99, Paul Eggert, 2011/09/30
- Re: Getting AC_PROG_CC_C99, Andrew W. Nosenko, 2011/09/30
- Re: Getting AC_PROG_CC_C99, Paul Eggert, 2011/09/30
- Re: Getting AC_PROG_CC_C99, Gary V. Vaughan, 2011/09/29
- Re: Getting AC_PROG_CC_C99, Bruno Haible, 2011/09/30
- Re: Getting AC_PROG_CC_C99,
Gary V. Vaughan <=
- Re: Getting AC_PROG_CC_C99, Gary V. Vaughan, 2011/09/29
- Re: Getting AC_PROG_CC_C99, Bruno Haible, 2011/09/30
- Re: Getting AC_PROG_CC_C99, Gary V. Vaughan, 2011/09/29
- Re: Getting AC_PROG_CC_C99, Bruno Haible, 2011/09/30