Commit 58ce321a authored by Torben Hohn's avatar Torben Hohn
Browse files

fix CELT_DEFINES waf madness

parent 09c53ca9
......@@ -11,16 +11,14 @@ def configure(conf):
conf. check_cfg(package='libffado', atleast_version='1.999.17', args='--cflags --libs')
conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')
conf.define('HAVE_PPOLL', 1 )
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.new_task_gen('cxx', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE', 'HAVE_PPOLL']
if bld.env['HAVE_CELT']:
if bld.env['HAVE_CELT_API_0_5']:
driver.defines += ['HAVE_CELT', 'HAVE_CELT_API_0_5']
elif bld.env['HAVE_CELT_API_0_7']:
driver.defines += ['HAVE_CELT', 'HAVE_CELT_API_0_7']
driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack', '../dbus']
driver.target = target
driver.source = sources
......
......@@ -114,6 +114,19 @@ def configure(conf):
conf.sub_config('dbus')
conf.sub_config('example-clients')
if conf.check_cfg(package='celt', atleast_version='0.7.0', args='--cflags --libs'):
conf.define('HAVE_CELT', 1)
conf.define('HAVE_CELT_API_0_7', 1)
conf.define('HAVE_CELT_API_0_5', 0)
elif conf.check_cfg(package='celt', atleast_version='0.5.0', args='--cflags --libs', required=True):
conf.define('HAVE_CELT', 1)
conf.define('HAVE_CELT_API_0_5', 1)
conf.define('HAVE_CELT_API_0_7', 0)
else:
conf.define('HAVE_CELT', 0)
conf.define('HAVE_CELT_API_0_5', 0)
conf.define('HAVE_CELT_API_0_7', 0)
conf.env['LIB_PTHREAD'] = ['pthread']
conf.env['LIB_DL'] = ['dl']
conf.env['LIB_RT'] = ['rt']
......@@ -218,20 +231,11 @@ def configure(conf):
conf.env.append_unique('CXXFLAGS', '-m32')
conf.env.append_unique('CCFLAGS', '-m32')
conf.env.append_unique('LINKFLAGS', '-m32')
conf.write_config_header('config.h')
if Options.options.libdir32:
conf.env['LIBDIR'] = conf.env['PREFIX'] + Options.options.libdir32
else:
conf.env['LIBDIR'] = conf.env['PREFIX'] + '/lib32'
if conf.check_cfg(package='celt', atleast_version='0.7.0', args='--cflags --libs'):
conf.env['HAVE_CELT'] = True
conf.env['HAVE_CELT_API_0_7'] = True
elif conf.check_cfg(package='celt', atleast_version='0.5.0', args='--cflags --libs', required=True):
conf.env['HAVE_CELT'] = True
conf.env['HAVE_CELT_API_0_5'] = True
else:
conf.env['HAVE_CELT'] = False
conf.write_config_header('config.h')
def build(bld):
print ("make[1]: Entering directory `" + os.getcwd() + "/" + blddir + "'" )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment