Added lua platform defines for osx and linux for scons, to get lua's loadlib function working again on those platforms

This commit is contained in:
kmachulis 2009-12-14 03:48:15 +00:00
parent 5dd8186f5f
commit efaa3ebb4d
1 changed files with 11 additions and 0 deletions

View File

@ -57,6 +57,17 @@ else:
if not conf.CheckLib('z', autoadd=1):
print 'Did not find libz or z.lib, exiting!'
Exit(1)
### Lua platform defines
### Applies to all files even though only lua needs it, but should be ok
if env['LUA']:
if env['PLATFORM'] == 'darwin':
# Define LUA_USE_MACOSX otherwise we can't bind external libs from lua
env.Append(CCFLAGS = ["-DLUA_USE_MACOSX"])
if env['PLATFORM'] == 'posix':
# If we're POSIX, we use LUA_USE_LINUX since that combines usual lua posix defines with dlfcn calls for dynamic library loading.
# Should work on any *nix
env.Append(CCFLAGS = ["-DLUA_USE_LINUX"])
### Search for zenity if we're not in windows
if env['PLATFORM'] != 'win32' and env['PLATFORM'] != 'cygwin':