added: configure option to disable vlc

This commit is contained in:
Bob van Loosen 2013-03-26 20:42:59 +01:00
parent ec4be1c54c
commit e8124496d0

10
wscript
View file

@ -11,15 +11,20 @@ out = 'build'
def options(opt):
opt.load('compiler_cxx')
opt.add_option('--disable-vlc', action='store_true', default=False, help='disable libvlc')
def configure(conf):
conf.load('compiler_cxx')
conf.env.DISABLE_VLC=conf.options.disable_vlc
conf.check(header_name='jack/jack.h')
conf.check(header_name='fftw3.h')
conf.check(header_name='samplerate.h')
conf.check(header_name='sys/ipc.h')
conf.check(header_name='sys/shm.h')
if not conf.options.disable_vlc:
conf.check(header_name='vlc/vlc.h')
conf.check(header_name='X11/Xlib.h', auto_add_header_name=True)
@ -33,10 +38,12 @@ def configure(conf):
conf.check(lib='X11', uselib_store='X11')
conf.check(lib='Xext', uselib_store='Xext')
conf.check(lib='Xrender', uselib_store='Xrender')
conf.check(lib='vlc', uselib_store='vlc')
conf.check(lib='m', uselib_store='m', mandatory=False)
conf.check(lib='pthread', uselib_store='pthread', mandatory=False)
if not conf.options.disable_vlc:
conf.check(lib='vlc', uselib_store='vlc')
conf.check(function_name='clock_gettime', header_name='time.h', mandatory=False)
conf.check(function_name='clock_gettime', header_name='time.h', lib='rt', uselib_store='rt', mandatory=False,
msg='Checking for clock_gettime in librt')
@ -77,6 +84,7 @@ def build(bld):
cxxflags='-Wall -g -DUTILNAMESPACE=BitX11Util',
target='bitx11')
if not bld.env.DISABLE_VLC:
bld.program(source='src/bitvlc/main.cpp\
src/bitvlc/bitvlc.cpp\
src/util/condition.cpp\