Changeset d82e7a4


Ignore:
Timestamp:
Mar 17, 2017, 12:56:39 AM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler
Children:
ba67cb6
Parents:
300e781
Message:

wscript: check for libswresample first, then libavresample

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r300e781 rd82e7a4  
    325325                args = '--cflags --libs', uselib_store = 'AVUTIL',
    326326                mandatory = ctx.options.enable_avcodec)
    327         ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
    328                 args = '--cflags --libs', uselib_store = 'AVRESAMPLE',
    329                 mandatory = ctx.options.enable_avcodec)
    330         if all ( 'HAVE_' + i in ctx.env
    331                 for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ):
     327        ctx.check_cfg(package = 'libswresample', atleast_version = '2.3.0',
     328                args = '--cflags --libs', uselib_store = 'SWRESAMPLE',
     329                mandatory = False)
     330        if 'HAVE_SWRESAMPLE' not in ctx.env:
     331            ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
     332                    args = '--cflags --libs', uselib_store = 'AVRESAMPLE',
     333                    mandatory = False)
     334
     335        msg_check = 'Checking for all libav libraries'
     336        if 'HAVE_AVCODEC' not in ctx.env:
     337            ctx.msg(msg_check, 'not found (missing avcodec)', color = 'YELLOW')
     338        elif 'HAVE_AVFORMAT' not in ctx.env:
     339            ctx.msg(msg_check, 'not found (missing avformat)', color = 'YELLOW')
     340        elif 'HAVE_AVUTIL' not in ctx.env:
     341            ctx.msg(msg_check, 'not found (missing avutil)', color = 'YELLOW')
     342        elif 'HAVE_SWRESAMPLE' not in ctx.env and 'HAVE_AVRESAMPLE' not in ctx.env:
     343            ctx.msg(msg_check, 'not found (avresample or swresample required)', color = 'YELLOW')
     344        else:
     345            ctx.msg(msg_check, 'yes')
     346            if 'HAVE_SWRESAMPLE' in ctx.env:
     347                ctx.define('HAVE_SWRESAMPLE', 1)
     348            elif 'HAVE_AVRESAMPLE' in ctx.env:
     349                ctx.define('HAVE_AVRESAMPLE', 1)
    332350            ctx.define('HAVE_LIBAV', 1)
    333             ctx.msg('Checking for all libav libraries', 'yes')
    334         else:
    335             ctx.msg('Checking for all libav libraries', 'not found', color = 'YELLOW')
    336351
    337352    if (ctx.options.enable_wavread != False):
Note: See TracChangeset for help on using the changeset viewer.