bug-gnulib
[Top][All Lists]
Advanced

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

Re: Fwd: Getting AC_PROG_CC_C99


From: Bruno Haible
Subject: Re: Fwd: Getting AC_PROG_CC_C99
Date: Wed, 28 Sep 2011 18:45:06 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Paul Eggert wrote:
> The simplest fix would be something like the patch at the end of
> this message.

> diff --git a/modules/stdarg b/modules/stdarg                                  
>   
> index 84d3e7b..ab3436e 100644                                                 
>   
> --- a/modules/stdarg                                                          
>   
> +++ b/modules/stdarg                                                          
>   
> @@ -13,7 +13,9 @@ dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
>  dnl for the builtin va_copy to work.  With Autoconf 2.60 or later,           
>   
>  dnl AC_PROG_CC_STDC arranges for this.  With older Autoconf AC_PROG_CC_STDC  
>   
>  dnl shouldn't hurt, though installers are on their own to set c99 mode.      
>   
> -AC_REQUIRE([AC_PROG_CC_STDC])                                                
>   
> +dnl                                                                          
>   
> +dnl It is the package's responsibility to invoke AC_PROG_CC_STDC early on,   
>   
> +dnl before gl_EARLY.                                                         
>   
>                                                                               
>   
>  configure.ac:                                                                
>   
>  gl_STDARG_H

Excuse me. but that makes things worse rather than better.

Gary described the problem as
  "AC_PROG_CC_STDC is not safe
   to call multiple times, since it adds another --std=gnu99 to CFLAGS every
   time it is invoked (at least the version in my Apple suppied Autoconf-2.61)"

Gnulib does not introduce multiple calls to AC_PROG_CC_STDC, since it uses
AC_REQUIRE. If the package's configure.ac already invokes AC_PROG_CC_STDC,
early on (i.e. usually right after AC_PROG_CC), then gnulib's
  AC_REQUIRE([AC_PROG_CC_STDC])
will be a no-op.

Whereas if the package's configure.ac does not invoke AC_PROG_CC_STDC, your
patch turns a working package into a package that does not build with the
default settings on AIX 5.3.

> Another possibility would be for gnulib to redefine
> AC_PROG_CC_STDC so that it acts only once.

Why should that be gnulib's business? Please fix that in Autoconf.

> <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>.

There you wrote: "one cannot safely mix AC_PROG_CC_C99 and AC_PROG_CC_STDC".
Please have that fixed in Autoconf too.

Bruno



reply via email to

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