from bento.commands import hooks

@hooks.pre_build
def pre_build(context):
    context.tweak_extension("_ccallback_c", includes='src')

    conf = context.waf_context
    conf.check_cc(function_name='open_memstream', header_name="stdio.h")
    conf.write_config_header('messagestream_config.h')

    context.tweak_extension("messagestream", includes='src')
