Mercurial > audlegacy-plugins
view src/daap/xmms2-daap/wscript @ 3110:a522493de76e
Set up a hook_call for showing the main menu, since it's implemented in a plugin now (fixes #38).
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Sat, 02 May 2009 11:16:23 -0400 |
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())