Re: [Jack-Devel] [PATCH] Test using WITH_OPUS instead of HAVE_OPUS

PrevNext  Index
DateSun, 06 Jan 2013 13:09:53 +0000
From Peter Nelson <[hidden] at fuzzle dot org>
ToAdrian Knoth <[hidden] at drcomp dot erfurt dot thur dot de>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToAdrian Knoth Re: [Jack-Devel] [PATCH] Test using WITH_OPUS instead of HAVE_OPUS
Follow-UpAdrian Knoth Re: [Jack-Devel] [PATCH] Test using WITH_OPUS instead of HAVE_OPUS
Hi,

waf's check_cfg() sets HAVE_OPUS itself, along with whatever magic it
does for CFLAGS and LIBS, if the check is successful, regardless of the
wscript setting it later.

Without the patch it does fail to compile for me.

-- 
Peter Nelson <[hidden]>

On Sun, 2013-01-06 at 13:40 +0100, Adrian Knoth wrote:
> On Tue, Jan 01, 2013 at 10:42:45PM +0000, Peter Nelson wrote:
> 
> Hi!
> 
> > HAVE_OPUS will be set by waf if Opus is available but opus/opus_custom.h
> > is not. WITH_OPUS appears to have been created to resolve this but is
> > never tested against.
> 
> As far as I understand the code (untested, only read the wscript), the
> current code is correct:
> 
>     conf.env['WITH_OPUS'] = False
>     if conf.check_cfg(package='opus', atleast_version='0.9.0' ,
> args='--cflags --libs', mandatory=False):
>         if conf.check_cc(header_name='opus/opus_custom.h',
> mandatory=False):
>             conf.define('HAVE_OPUS', 1)
>             conf.env['WITH_OPUS'] = True
> 
> 
> So HAVE_OPUS is the C define (as in g++ -DHAVE_OPUS=1) while WITH_OPUS
> is the waf-internal variable.
> 
> Which means the C source is correct to check against HAVE_OPUS.
> 
> Does it fail to build for you without your patch?
> 
> 
> Cheers
> 
PrevNext  Index

1357478234.29760_0.ltw:2,a <1357477793.4044.3.camel at atropos dot lan dot fuzzle dot org>