view src/daap/xmms2-daap/wscript @ 2611:e99d3e8653df

Remove the strange timeout function from ALSA plugin's mixer handling, this fixes problems with volume and balance setting in some cases where timeout caused pcm_element to become NULL prematurely. Not sure if there could be any adverse side-effects to this, though...
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 21 May 2008 16:43:48 +0300
parents 776dd8fc2b38
children
line wrap: on
line source

from waftools.plugin import plugin
from Params import g_platform

def plugin_configure(conf):
    # Set the default fallthrough, if no "intelligent" backend is found.
    conf.env['XMMS_DAAP_BACKEND'] = 'dummy'

    # First look for Avahi mdns support
    if (conf.check_pkg("avahi-glib", destvar='avahiglib') and
        conf.check_pkg("avahi-client", destvar='avahiclient')):
        # Avahi found
        conf.env['XMMS_DAAP_BACKEND'] = 'avahi'
    elif conf.check_header('dns_sd.h'):
        # We might have dnssd support. If we're not on OSX, check for the
        # presence of the lib.
        if g_platform == 'darwin':
            conf.env['XMMS_DAAP_BACKEND'] = 'dnssd'
        elif conf.check_library2('dns_sd', uselib='dnssd', mandatory=0):
            conf.env['XMMS_DAAP_BACKEND'] = 'dnssd'
    return True

def plugin_build(bld, obj):
    daap_backend = bld.env_of_name('default')['XMMS_DAAP_BACKEND']
    obj.source.append("daap_mdns_%s.c" % daap_backend)
    if daap_backend == 'avahi':
        obj.uselib += ' avahiglib avahiclient'
    elif daap_backend == 'dnssd':
        obj.uselib += ' dnssd'
    if g_platform == 'win32':
        obj.uselib += ' socket'

configure, build = plugin('daap', configure=plugin_configure,
                          extra_libs=['curl'], build=plugin_build,
                          source="""daap_xform.c daap_cmd.c daap_conn.c
                                    daap_util.c daap_md5.c cc_handlers.c
                                 """.split())