[PATCH app, driver, libs 0/43] Replace deprecated Automake INCLUDES variable

Gaetan Nadon gaetan.nadon at videotron.ca
Fri Mar 19 13:34:59 PDT 2010

On Fri, 2010-03-19 at 12:06 -0700, Dan Nicholson wrote:

> On Fri, Mar 19, 2010 at 11:42 AM, Gaetan Nadon
> <gaetan.nadon at videotron.ca> wrote:
> >
> > Rather than posting 43 patches, I'll summarize the changes and include the
> > diffs here.
> >
> > Automake produces a warning about the INCLUDES variable being deprecated.
> > There were only 43 out of 240 modules still using it. It has been replaced
> > with AM_CPPFLAGS. In some modules, both INCLUDES and AM_CPPFLAGS were used.
> >
> > Further more, there isn't a good separation between pre-processor and
> > compiler flags. The lint tool only accepts pre-processor flags, so the lint
> > target had to be reworked. Separation is also required to allow user to
> > override with CFLAGS and CPPFLAGS on the configure invocation.
> >
> > In addition of replacing/merging INCLUDES and AM_CPPFLAGS, compiler and
> > pre-processor flags have been regrouped in AM_CFLAGS and AM_CPPFLAGS
> > respectively. The order of -I has been preserved the INCLUDES variable
> > taking precedence over AM_CPPFLAGS. Attention has been given so as not alter
> > the final gcc command emitted. One exception is that Automake does not pass
> > pre-processor flags when linking a library which were previously lumped
> > together with C flags.
> I'm not sure that putting the package CFLAGS into AM_CPPFLAGS won't
> cause problems. While it's very likely that $(PKG_CFLAGS) only
> contains preprocessor directives, we don't know that and have no way
> of enforcing it. I think it would be better to take the safe route and
> put them in AM_CFLAGS even if it means -I include paths will be passed
> when linking.

It's been a real pain to decide. Either way there are potential
problems. Tools like lint don't like compiler flags, but you can
workaround that. I have seen some projects making patches essentially
for two reasons. One is that some compilers will break, which does not
seem to be our case, and that users can't override correctly with CFLAGS
and CPPFLAGS, which may be for the same first reason.

The server sticks -fvisibility compiler flag in the pkg Cflags which
does not help while 99% of pkg-config files on my distro are compiler
flags free. I don't see an elegant solution to this. There are a few
modules where some improvement can be made, I'lll submit those


> --
> Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100319/8fd57dc3/attachment.htm>

More information about the xorg-devel mailing list