how to set CFLAGS variable for compiling Xorg
Alan Coopersmith
Alan.Coopersmith at Sun.COM
Wed Nov 5 08:26:51 PST 2008
Peter Breitenlohner wrote:
> However, what I had in made was rather simple minded, e.g.,
[...]
> and in the top-level Makefile.am:
>
> ChangeLog:
> @CHANGELOG_CMD@
>
> ===================
>
> That way the details of the command would be at one central place, much
> easier
> to maintain.
Okay, makes sense to me. I'd like to proceed on the plan of getting
these rules (changelog & warning flags) into the xorg-macros.m4 before
anyone does a massive cleanup pass across all modules. It's not hard
to get a xorg-macros 1.2.0 release out quickly.
For the warnings one, I have a preference (not surprisingly) for the example
in the libxcb configure.ac that handles gcc & Sun Studio, though the gcc
warnings list there seems a bit short:
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -pedantic -Wpointer-arith \
-Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
fi
AC_SUBST(CWARNFLAGS)
Certainly putting it in xorg-macros.m4 will make it easier to adjust for
new gcc warnings added in future releases and for additional compilers,
like the Intel compiler.
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering
More information about the xorg
mailing list