Changeset 795fcd9


Ignore:
Timestamp:
Aug 12, 2015, 7:01:34 PM (9 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, pitchshift, sampler, timestretch, yinfft+
Children:
7b2d740
Parents:
e9270a4
Message:

wscript: make foo mandatory only when --enable-foo is passed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    re9270a4 r795fcd9  
    179179        if (ctx.options.enable_fftw3f != False):
    180180            ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    181                     args = '--cflags --libs', mandatory = False)
     181                    args = '--cflags --libs',
     182                    mandatory = ctx.options.enable_fftw3f)
    182183            if (ctx.options.enable_double == True):
    183                 ctx.msg('Warning', 'fftw3f enabled, but compiling in double precision!')
     184                ctx.msg('Warning',
     185                        'fftw3f enabled, but compiling in double precision!')
    184186        else:
    185             # fftw3f not enabled, take most sensible one according to enable_double
     187            # fftw3f disabled, take most sensible one according to
     188            # enable_double
    186189            if (ctx.options.enable_double == True):
    187190                ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
    188                         args = '--cflags --libs', mandatory = False)
     191                        args = '--cflags --libs', mandatory =
     192                        ctx.options.enable_fftw3)
    189193            else:
    190194                ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    191                         args = '--cflags --libs', mandatory = False)
     195                        args = '--cflags --libs',
     196                        mandatory = ctx.options.enable_fftw3)
    192197        ctx.define('HAVE_FFTW3', 1)
    193198
     
    205210    if (ctx.options.enable_sndfile != False):
    206211        ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',
    207                 args = '--cflags --libs', mandatory = False)
     212                args = '--cflags --libs',
     213                mandatory = ctx.options.enable_sndfile)
    208214
    209215    # check for libsamplerate
    210216    if (ctx.options.enable_samplerate != False):
    211217        ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
    212                 args = '--cflags --libs', mandatory = False)
     218                args = '--cflags --libs',
     219                mandatory = ctx.options.enable_samplerate)
    213220
    214221    # check for jack
    215222    if (ctx.options.enable_jack != False):
    216223        ctx.check_cfg(package = 'jack',
    217                 args = '--cflags --libs', mandatory = False)
     224                args = '--cflags --libs',
     225                mandatory = ctx.options.enable_jack)
    218226
    219227    # check for libav
    220228    if (ctx.options.enable_avcodec != False):
    221229        ctx.check_cfg(package = 'libavcodec', atleast_version = '54.35.0',
    222                 args = '--cflags --libs', uselib_store = 'AVCODEC', mandatory = False)
     230                args = '--cflags --libs', uselib_store = 'AVCODEC',
     231                mandatory = ctx.options.enable_avcodec)
    223232        ctx.check_cfg(package = 'libavformat', atleast_version = '52.3.0',
    224                 args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = False)
     233                args = '--cflags --libs', uselib_store = 'AVFORMAT',
     234                mandatory = ctx.options.enable_avcodec)
    225235        ctx.check_cfg(package = 'libavutil', atleast_version = '52.3.0',
    226                 args = '--cflags --libs', uselib_store = 'AVUTIL', mandatory = False)
     236                args = '--cflags --libs', uselib_store = 'AVUTIL',
     237                mandatory = ctx.options.enable_avcodec)
    227238        ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
    228                 args = '--cflags --libs', uselib_store = 'AVRESAMPLE', mandatory = False)
     239                args = '--cflags --libs', uselib_store = 'AVRESAMPLE',
     240                mandatory = ctx.options.enable_avcodec)
    229241        if all ( 'HAVE_' + i in ctx.env.define_key
    230242                for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ):
Note: See TracChangeset for help on using the changeset viewer.