Skip to content

Commit

Permalink
Fix Waf script.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkuhn committed Jan 9, 2016
1 parent 4c94c0b commit 1f8340a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def configure (ctx):

# FIXME https://bugzilla.gnome.org/show_bug.cgi?id=667494

have_gupnp = False
#ctx.check_cfg(
# package = 'gupnp-1.0',
# args = ['--cflags', '--libs'],
Expand All @@ -81,6 +82,7 @@ def configure (ctx):
# mandatory = False
#)

have_gupnp_igd = False
#ctx.check_cfg(
# package = 'gupnp-igd-1.0',
# args = ['--cflags', '--libs'],
Expand All @@ -89,6 +91,7 @@ def configure (ctx):
# mandatory = False
#)

have_miniupnpc = \
ctx.check_cc(
header_name = 'miniupnpc.h',
lib = 'miniupnpc',
Expand All @@ -99,7 +102,7 @@ def configure (ctx):
mandatory = False
)

if ctx.env.HAVE_MINIUPNPC:
if have_miniupnpc:
ctx.check_cc(
fragment = '''
#include <stdlib.h>
Expand Down Expand Up @@ -132,6 +135,8 @@ def configure (ctx):
else:
ctx.env.CFLAGS += ['-O2']

ctx.env.SUSHI_BUILD_UPNP = (have_gupnp or have_gupnp_igd or have_miniupnpc)

ctx.define('LOCALEDIR', Utils.subst_vars('${LOCALEDIR}', ctx.env))

ctx.define('SUSHI_VERSION', VERSION)
Expand Down Expand Up @@ -161,7 +166,7 @@ def build (ctx):
uselibs = ['GIO', 'GLIB', 'GMODULE', 'GOBJECT', 'GTHREAD']

if plugin == 'upnp':
if not ctx.env.HAVE_GUPNP and not ctx.env.HAVE_GUPNP_IGD and not ctx.env.HAVE_MINIUPNPC:
if not ctx.env.SUSHI_BUILD_UPNP:
continue

uselibs += ['GUPNP', 'GUPNP_IGD', 'MINIUPNPC']
Expand Down

0 comments on commit 1f8340a

Please sign in to comment.