2
0
Fork 0

[waf] Fix building with lua

This commit is contained in:
Thomas Porzelt 2009-08-31 12:13:32 +02:00
parent 25008966af
commit ebedf9c981
2 changed files with 8 additions and 10 deletions

View File

@ -48,11 +48,16 @@ source = '''
'''
def configure(conf):
pass
def build(bld):
global source
opts = Options.options
libs = ['glib', 'gthread', 'gmodule', 'ev']
if opts.lua:
if bld.env['USE_LUA'] == 1:
libs += ['lua']
source += '''
actions_lua.c
condition_lua.c
@ -60,14 +65,6 @@ def configure(conf):
value_lua.c
'''
def build(bld):
opts = Options.options
libs = ['glib', 'gthread', 'gmodule', 'ev']
if opts.lua:
libs += ['lua']
libcommon = bld.new_task_gen(
features = 'cc cprogram',
source = source,

View File

@ -101,6 +101,7 @@ def configure(conf):
conf.check(function_name='lua_setfield', header_name='lua.h', uselib='lua', mandatory=True)
conf.define('HAVE_LUA_H', 1)
conf.define('HAVE_LIBLUA', 1)
conf.define('USE_LUA', 1)
if not opts.static:
conf.check(lib='dl', uselib_store='dl')