2024-11-26 16:10:33 +04:00
|
|
|
#! /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
|
2024-12-02 00:15:52 +04:00
|
|
|
if conf.check_cc(header_name='inttypes.h', mandatory = False):
|
2024-11-26 16:10:33 +04:00
|
|
|
conf.define('INCLUDE_INTTYPES_H', 1)
|
2024-12-02 00:15:52 +04:00
|
|
|
elif conf.check_cc(header_name='sys/types.h', mandatory = False):
|
2024-11-26 16:10:33 +04:00
|
|
|
conf.define('INCLUDE_SYS_TYPES_H', 1)
|
2024-12-02 00:15:52 +04:00
|
|
|
elif conf.check_cc(header_name='stdint.h', mandatory = False):
|
2024-11-26 16:10:33 +04:00
|
|
|
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/']
|
|
|
|
)
|