From: Paul Brossier Date: Tue, 10 Dec 2013 13:30:42 +0000 (-0500) Subject: wscript: make sure all libav libraries are installed to build source_avcodec X-Git-Tag: 0.4.0~38 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=549928e2effb60a1afa7ccd174e17ce5cdd5674d;p=aubio.git wscript: make sure all libav libraries are installed to build source_avcodec Signed-off-by: Paul Brossier --- diff --git a/src/io/source.c b/src/io/source.c index e82ff490..b5e6fe8b 100644 --- a/src/io/source.c +++ b/src/io/source.c @@ -23,9 +23,9 @@ #include "fvec.h" #include "fmat.h" #include "io/source.h" -#ifdef HAVE_AVCODEC +#ifdef HAVE_LIBAV #include "io/source_avcodec.h" -#endif /* HAVE_AVCODEC */ +#endif /* HAVE_LIBAV */ #ifdef __APPLE__ #include "io/source_apple_audio.h" #endif /* __APPLE__ */ @@ -52,7 +52,7 @@ struct _aubio_source_t { aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_size) { aubio_source_t * s = AUBIO_NEW(aubio_source_t); -#if HAVE_AVCODEC +#if HAVE_LIBAV s->source = (void *)new_aubio_source_avcodec(uri, samplerate, hop_size); if (s->source) { s->s_do = (aubio_source_do_t)(aubio_source_avcodec_do); @@ -63,7 +63,7 @@ aubio_source_t * new_aubio_source(char_t * uri, uint_t samplerate, uint_t hop_si s->s_del = (del_aubio_source_t)(del_aubio_source_avcodec); return s; } -#endif /* HAVE_AVCODEC */ +#endif /* HAVE_LIBAV */ #ifdef __APPLE__ s->source = (void *)new_aubio_source_apple_audio(uri, samplerate, hop_size); if (s->source) { diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index ad0797b3..7e8589f3 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -21,7 +21,7 @@ #include "config.h" -#ifdef HAVE_AVCODEC +#ifdef HAVE_LIBAV #include #include @@ -402,4 +402,4 @@ void del_aubio_source_avcodec(aubio_source_avcodec_t * s){ AUBIO_FREE(s); } -#endif /* HAVE_SNDFILE */ +#endif /* HAVE_LIBAV */ diff --git a/wscript b/wscript index 3d5aab46..94f0d04f 100644 --- a/wscript +++ b/wscript @@ -213,6 +213,12 @@ def configure(ctx): args = '--cflags --libs', uselib_store = 'AVUTIL', mandatory = False) ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1', args = '--cflags --libs', uselib_store = 'AVRESAMPLE', mandatory = False) + if all ( 'HAVE_' + i in ctx.env.define_key + for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ): + ctx.define('HAVE_LIBAV', 1) + ctx.msg('Checking for all libav libraries', 'yes') + else: + ctx.msg('Checking for all libav libraries', 'not found', color = 'YELLOW') # use memcpy hacks if (ctx.options.enable_memcpy == True):