# encoding: utf-8
#
# WAF build scripts for XMMS2
# Copyright (C) 2006-2023 XMMS2 Team
#

def build(bld):
    source = """
    timestamp.c
    udp.c
    """.split()

    bld.objects(
        features = 'visibilityhidden',
        cflags=bld.env.CFLAGS_cshlib,
        target = 'xmmsvisualization',
        source = source,
        includes = '. ../../.. ../../include',
        uselib = 'math',
        install_path = None,
        defines = 'XMMSC_LOG_DOMAIN="xmmsc/xmmsvisualization"'
        )


def configure(conf):
    # Check for the modf function in the math lib
    modf_fragment = """
    #include <math.h>
    int main(void) {
        return modf(0.0, 0);
    }
    """
    conf.check_cc(fragment=modf_fragment, header_name="math.h",
            lib="m", uselib_store="math")
    return True


def options(opt):
    pass
