Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r41dd34e rc3b3b84  
    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            resample_missing = 'not found (avresample or swresample required)'
     344            ctx.msg(msg_check, resample_missing, color = 'YELLOW')
     345        else:
     346            ctx.msg(msg_check, 'yes')
     347            if 'HAVE_SWRESAMPLE' in ctx.env:
     348                ctx.define('HAVE_SWRESAMPLE', 1)
     349            elif 'HAVE_AVRESAMPLE' in ctx.env:
     350                ctx.define('HAVE_AVRESAMPLE', 1)
    332351            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')
    336352
    337353    if (ctx.options.enable_wavread != False):
Note: See TracChangeset for help on using the changeset viewer.