From: Paul Brossier Date: Sat, 5 Sep 2015 09:41:36 +0000 (+0200) Subject: wscript: add option to not build with CoreAudio/AudioToolbox X-Git-Tag: 0.4.4~301^2~7 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=cc81763bbaa1fc36144a5bdd8f0e3107aed22e25;p=aubio.git wscript: add option to not build with CoreAudio/AudioToolbox --- diff --git a/src/io/audio_unit.c b/src/io/audio_unit.c index eab299f3..a21906ae 100644 --- a/src/io/audio_unit.c +++ b/src/io/audio_unit.c @@ -19,7 +19,7 @@ */ #include "config.h" -#ifdef TARGET_OS_IPHONE +#ifdef HAVE_AUDIO_UNIT #include "aubio_priv.h" #include "fvec.h" @@ -774,4 +774,4 @@ uint_t del_aubio_audio_unit(aubio_audio_unit_t *o) return (int)err; } -#endif /* TARGET_OS_IPHONE */ +#endif /* HAVE_AUDIO_UNIT */ diff --git a/wscript b/wscript index 74dbf7d1..949fe7cc 100644 --- a/wscript +++ b/wscript @@ -78,6 +78,9 @@ def options(ctx): add_option_enable_disable(ctx, 'accelerate', default = None, help_str = 'use Accelerate framework (darwin only) (auto)', help_disable_str = 'do not use Accelerate framework') + add_option_enable_disable(ctx, 'apple-audio', default = None, + help_str = 'use CoreFoundation (darwin only) (auto)', + help_disable_str = 'do not use CoreFoundation framework') ctx.add_option('--with-target-platform', type='string', help='set target platform for cross-compilation', dest='target_platform') @@ -113,17 +116,20 @@ def configure(ctx): ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64'] if target_platform in [ 'darwin', 'ios', 'iosimulator']: - ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox'] - ctx.define('HAVE_SOURCE_APPLE_AUDIO', 1) - ctx.define('HAVE_SINK_APPLE_AUDIO', 1) + if (ctx.options.enable_apple_audio != False): + ctx.env.FRAMEWORK += ['CoreFoundation', 'AudioToolbox'] + ctx.define('HAVE_SOURCE_APPLE_AUDIO', 1) + ctx.define('HAVE_SINK_APPLE_AUDIO', 1) if (ctx.options.enable_accelerate != False): ctx.define('HAVE_ACCELERATE', 1) ctx.env.FRAMEWORK += ['Accelerate'] if target_platform in [ 'ios', 'iosimulator' ]: - ctx.define('TARGET_OS_IPHONE', 1) MINSDKVER="6.1" ctx.env.CFLAGS += ['-std=c99'] + if (ctx.options.enable_audio_unit != False): + ctx.define('HAVE_AUDIO_UNIT', 1) + #ctx.env.FRAMEWORK += ['CoreFoundation', 'AudioToolbox'] if target_platform == 'ios': DEVROOT = "/Applications/Xcode.app/Contents" DEVROOT += "/Developer/Platforms/iPhoneOS.platform/Developer"