[pulseaudio-discuss] [PATCH v3 14/24] build-sys: Move to compiling with C11 support
Tanu Kaskinen
tanuk at iki.fi
Wed Feb 3 21:13:12 PST 2016
On Thu, 2016-02-04 at 10:30 +0530, Arun Raghavan wrote:
> On 4 February 2016 at 10:22, Arun Raghavan <arun at accosted.net> wrote:
> > On Thu, 2016-02-04 at 06:04 +0200, Tanu Kaskinen wrote:
> > > On Mon, 2016-01-18 at 13:06 +0530, arun at accosted.net wrote:
> > > > @@ -176,6 +175,8 @@ esac
> > > >
> > > > #### Compiler flags ####
> > > >
> > > > +AX_CHECK_COMPILE_FLAG([-std=c11], [CFLAGS="$CFLAGS -std=c11"], [],
> > > > [-pedantic -Werror])
> > >
> > > This does nothing if the compile flag isn't supported. Shouldn't we
> > > fail in configure if -std=c11 doesn't work?
> >
> > Right, I'm rewriting this line as:
> >
> > AX_CHECK_COMPILE_FLAG([-std=c11],
> > [CFLAGS="$CFLAGS -std=c11"],
> > [AC_MSG_ERROR([*** Compiler does not support -std=c11])],
> > [-pedantic -Werror])
> >
> > > Also, I don't think we should set CFLAGS. Adding -std=c11 to
> > > AM_CFLAGS
> > > in src/Makefile.am seems like the right thing to do. See
> > > https://www.gnu.org/software/automake/manual/html_node/User-Variables
> > > .html#User-Variables
> >
> > This would make it inconsistent with the rest of configure.ac, though.
> > It'd be nice to change everything to use AM_CFLAGS but that should be a
> > separate change.
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.
> > 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?
--
Tanu
More information about the pulseaudio-discuss
mailing list