Fix LUA_R_INCL not being used on linux
This commit is contained in:
parent
84f6ede2b8
commit
1eb8940c9a
11
SConscript
11
SConscript
@ -180,13 +180,13 @@ def CheckBit(context):
|
|||||||
program = """#include <stdlib.h>
|
program = """#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main() {
|
int main() {
|
||||||
printf("%d", (int)sizeof(size_t));
|
printf("%d", (int)sizeof(size_t));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
ret = context.TryCompile(program, '.c')
|
ret = context.TryCompile(program, '.c')
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
return False
|
return False
|
||||||
ret = context.TryRun(program, '.c')
|
ret = context.TryRun(program, '.c')
|
||||||
if ret[1] == '':
|
if ret[1] == '':
|
||||||
return False
|
return False
|
||||||
@ -268,15 +268,16 @@ def findLibs(env, conf):
|
|||||||
if not conf.CheckLib(['lua5.1', 'lua-5.1', 'lua51', 'lua']):
|
if not conf.CheckLib(['lua5.1', 'lua-5.1', 'lua51', 'lua']):
|
||||||
if platform != "Darwin" or not conf.CheckFramework("Lua"):
|
if platform != "Darwin" or not conf.CheckFramework("Lua"):
|
||||||
FatalError("lua5.1 development library not found or not installed")
|
FatalError("lua5.1 development library not found or not installed")
|
||||||
|
foundpkg = False
|
||||||
if platform == "Linux":
|
if platform == "Linux":
|
||||||
try:
|
try:
|
||||||
env.ParseConfig("pkg-config --cflags {0}".format(luaver))
|
env.ParseConfig("pkg-config --cflags {0}".format(luaver))
|
||||||
env.ParseConfig("pkg-config --libs {0}".format(luaver))
|
env.ParseConfig("pkg-config --libs {0}".format(luaver))
|
||||||
env.Append(CPPDEFINES=["LUA_R_INCL"])
|
env.Append(CPPDEFINES=["LUA_R_INCL"])
|
||||||
|
foundpkg = True
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
else:
|
if not foundpkg:
|
||||||
#Look for lua.h
|
#Look for lua.h
|
||||||
foundheader = False
|
foundheader = False
|
||||||
if GetOption('luajit'):
|
if GetOption('luajit'):
|
||||||
|
Reference in New Issue
Block a user