diff --git a/3rdparty/libogg/wscript b/3rdparty/libogg/wscript index e69de29b..2b825a13 100644 --- a/3rdparty/libogg/wscript +++ b/3rdparty/libogg/wscript @@ -0,0 +1,48 @@ +#! /usr/bin/env python +# encoding: utf-8 + +FRAGMENT_INTTYPES_H='''#include +int main (int argc, char **argv) { + return 0; +}''' + +FRAGMENT_SYS_TYPES_H='''#include +int main (void) { + return 0; +}''' + +FRAGMENT_STDINT_H='''#include +int main (void) { + return 0; +}''' + +def options(opt): + pass + +def configure(conf): + if not conf.path.find_dir('libogg') or not conf.path.find_dir('libogg/src'): + conf.fatal('Can\'t find libogg submodule. Run `git submodule update --init --recursive`.') + return + + # Check for required headers + if conf.check_cc(fragment=FRAGMENT_INTTYPES_H, msg = 'Checking for inttypes.h header', mandatory = False): + conf.define('INCLUDE_INTTYPES_H', 1) + elif conf.check_cc(fragment=FRAGMENT_SYS_TYPES_H, msg = 'Checking for sys/types.h header', mandatory = False): + conf.define('INCLUDE_SYS_TYPES_H', 1) + elif conf.check_cc(fragmenmt=FRAGMENT_STDINT_H, msg = 'Checking for stdint.h header', mandatory = False): + conf.define('INCLUDE_STDINT_H', 1) + + +def build(bld): + sources = bld.path.ant_glob([ + 'libogg/src/*.c' + ]) + includes = ['libogg/include/'] + + bld.stlib( + source = sources, + target = 'libogg', + features = 'c', + includes = includes, + export_includes = ['libogg/include/'] + ) diff --git a/3rdparty/libvorbis/libvorbis b/3rdparty/libvorbis/libvorbis new file mode 160000 index 00000000..bb4047de --- /dev/null +++ b/3rdparty/libvorbis/libvorbis @@ -0,0 +1 @@ +Subproject commit bb4047de4c05712bf1fd49b9584c360b8e4e0adf diff --git a/wscript b/wscript index 7bb5a716..627c1f3d 100644 --- a/wscript +++ b/wscript @@ -96,6 +96,7 @@ SUBDIRS = [ Subproject('3rdparty/bzip2', lambda x: not x.env.DEDICATED and not x.env.HAVE_SYSTEM_BZ2), Subproject('3rdparty/mainui', lambda x: not x.env.DEDICATED), Subproject('3rdparty/vgui_support', lambda x: not x.env.DEDICATED), + Subproject('3rdparty/libogg', lambda x: not x.env.DEDICATED), Subproject('3rdparty/MultiEmulator',lambda x: not x.env.DEDICATED), # Subproject('3rdparty/freevgui', lambda x: not x.env.DEDICATED), Subproject('stub/client', lambda x: not x.env.DEDICATED),