def check_for_gcc_c(context):
    """
    Check if the C compiler is GCC

    Returns 1 if gcc, 0 otherwise
    """

    test_program = """
#if !defined(__GNUC__)
#  error "Not the GCC C compiler."
#endif

int foo(void)
{
    return 0;
}
"""

    return context.TryCompile(test_program, '.c')