#! /usr/bin/env python # encoding: utf-8 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(header_name='inttypes.h', mandatory = False): conf.define('INCLUDE_INTTYPES_H', 1) elif conf.check_cc(header_name='sys/types.h', mandatory = False): conf.define('INCLUDE_SYS_TYPES_H', 1) elif conf.check_cc(header_name='stdint.h', 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', includes = includes, export_includes = ['libogg/include/'] )