[PATCH xorg-gtest] aclocal: fill AS_IF with noop statements

Chase Douglas chase.douglas at canonical.com
Mon Aug 6 09:59:29 PDT 2012


On 07/29/2012 06:05 PM, Peter Hutterer wrote:
> Expanding this macro fails on some machines (RHEL6). It expands to
> if test <condition>; then
>
> fi
>
> Empty statements are invalid.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>   aclocal/xorg-gtest.m4 |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/aclocal/xorg-gtest.m4 b/aclocal/xorg-gtest.m4
> index 6efff08..0f6aa85 100644
> --- a/aclocal/xorg-gtest.m4
> +++ b/aclocal/xorg-gtest.m4
> @@ -47,7 +47,7 @@ AC_DEFUN([_CHECK_GTEST],
>
>     AS_IF([test "x$have_gtest" = xyes],
>           [AC_SUBST(GTEST_CPPFLAGS)]
> -        [AC_SUBST(GTEST_SOURCE)])
> +        [AC_SUBST(GTEST_SOURCE)] [:])
>   ]) # _CHECK_GTEST
>
>   # CHECK_XORG_GTEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])

This seems like a bug in the RHEL6 autotools. When I run autoreconf 
here, almost all the conditional statements end up looking like:

if test <condition>; then :
     <statements>
fi

If there are no statements, the ':' takes care of things.

A quick google search doesn't turn up any helpful information. Are you 
in a position to try to figure out why this is broken on RHEL6? If it's 
too much trouble, we can apply this patch. However, I think it really is 
an issue with autotools.

-- Chase


More information about the xorg-devel mailing list