[pulseaudio-discuss] [PATCH v3 14/24] build-sys: Move to compiling with C11 support

Tanu Kaskinen tanuk at iki.fi
Thu Feb 4 02:45:55 PST 2016


On Thu, 2016-02-04 at 10:57 +0530, Arun Raghavan wrote:
> On Thu, 2016-02-04 at 07:13 +0200, Tanu Kaskinen wrote:
> > I don't buy this argument. There's no consistency in the first place.
> > We set some flags via CFLAGS and some via AM_CFLAGS.
> 
> Looking at this again, I don't see any place in the configure checks
> where AM_CFLAGS is set (and it looks to me like that this would not be
> appropriate anyway -- AM_CFLAGS seems meant to be used withing
> Makefile.am, not configure.ac).

Yes, configure doesn't set AM_CFLAGS. I didn't suggest setting
AM_CFLAGS from the configure script.

For example, gcov flags are set in AM_CFLAGS in Makefile.am based on
configure results. So configure can be used to check things, and the
flags can be set according to the checks to AM_CFLAGS, all without
touching CFLAGS.

> > > > One more thing that's missing in this change is an addition
> > > > of ax_check_compile_flag.m4. I'll squash that in too.
> > > 
> > > The AX_* macros also seem to work with CFLAGS, btw.
> > 
> > What do you mean by that?
> 
> If you look at what AX_APPEND_COMPILE_FLAGS does, for example, it sets
> CFLAGS directly.

AX_APPEND_COMPILE_FLAGS takes as a parameter the variable to which the
flags are appended. Only when the parameter is omitted the macro will
modify CFLAGS. We could save the flags to a separate variable that is
added to AM_CFLAGS in Makefile.am.

We only use AX_APPEND_COMPILE_FLAGS to set non-mandatory flags, though.
Nothing breaks if the user overrides those flags.

-- 
Tanu


More information about the pulseaudio-discuss mailing list