[PATCH:macros 2/2] Make XORG_STRICT_OPTION always set STRICT_CFLAGS

Jeremy Huddleston jeremyhu at apple.com
Mon Apr 25 20:55:45 PDT 2011


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Apr 25, 2011, at 20:35, Alan Coopersmith wrote:

> Still only adds it to CWARNFLAGS if --enable-strict-compilation is
> passed, but sets the variable with the right flags for the compiler
> so it's available for other checks in configure scripts.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> xorg-macros.m4.in |   16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
> index bdf734e..367b75a 100644
> --- a/xorg-macros.m4.in
> +++ b/xorg-macros.m4.in
> @@ -1348,16 +1348,16 @@ AC_ARG_ENABLE(strict-compilation,
> 			  AS_HELP_STRING([--enable-strict-compilation],
> 			  [Enable all warnings from compiler and make them errors (default: disabled)]),
> 			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
> +if test "x$GCC" = xyes ; then
> +    STRICT_CFLAGS="-pedantic -Werror"
> +elif test "x$SUNCC" = "xyes"; then
> +    STRICT_CFLAGS="-errwarn"
> +elif test "x$INTELCC" = "xyes"; then
> +    STRICT_CFLAGS="-Werror"
> +fi
> if test "x$STRICT_COMPILE" = "xyes"; then
> -	if test "x$GCC" = xyes ; then
> -		STRICT_CFLAGS="-pedantic -Werror"
> -	elif test "x$SUNCC" = "xyes"; then
> -		STRICT_CFLAGS="-errwarn"
> -	elif test "x$INTELCC" = "xyes"; then
> -		STRICT_CFLAGS="-Werror"
> -	fi
> +    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
> fi
> -CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
> AC_SUBST([CWARNFLAGS])
> ]) # XORG_STRICT_OPTION
> 
> -- 
> 1.7.3.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 



More information about the xorg-devel mailing list