engine: wscript: improve execinfo and GNU backtrace() check
This commit is contained in:
parent
d0464ef602
commit
0cb034afc2
1 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,15 @@ from copy import copy
|
||||||
|
|
||||||
top = '.'
|
top = '.'
|
||||||
|
|
||||||
|
EXECINFO_TEST = '''#include <execinfo.h>
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
backtrace(0, 0);
|
||||||
|
backtrace_symbols(0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
def options(opt):
|
def options(opt):
|
||||||
grp = opt.add_option_group('Engine options')
|
grp = opt.add_option_group('Engine options')
|
||||||
|
|
||||||
|
@ -111,7 +120,7 @@ def configure(conf):
|
||||||
if hasattr(conf.options, 'DLLEMU'):
|
if hasattr(conf.options, 'DLLEMU'):
|
||||||
conf.define_cond('XASH_DLL_LOADER', conf.options.DLLEMU)
|
conf.define_cond('XASH_DLL_LOADER', conf.options.DLLEMU)
|
||||||
|
|
||||||
conf.check_cc(header_name='execinfo.h', mandatory=False, define_name='HAVE_EXECINFO')
|
conf.check_cc(fragment=EXECINFO_TEST, msg='Checking for glibc backtrace()', mandatory=False, define_name='HAVE_EXECINFO')
|
||||||
|
|
||||||
conf.define('ENGINE_DLL', 1)
|
conf.define('ENGINE_DLL', 1)
|
||||||
conf.define_cond('XASH_ENGINE_TESTS', conf.options.ENGINE_TESTS)
|
conf.define_cond('XASH_ENGINE_TESTS', conf.options.ENGINE_TESTS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue