2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

wscript: try to find alloca in stdlib.h on platforms without alloca.h or malloc.h

This commit is contained in:
Henry Ford 2023-11-20 20:44:56 -05:00 committed by Alibek Omarov
parent c448c7b0b1
commit dbdd330cf7

View File

@ -378,6 +378,9 @@ def configure(conf):
conf.define('ALLOCA_H', 'alloca.h')
elif conf.check_cc(header_name='malloc.h', mandatory=False):
conf.define('ALLOCA_H', 'malloc.h')
elif conf.check_cc(fragment = '''#include <stdlib.h>
int main(void) { alloca(1); }''', msg = 'Checking for alloca in stdlib.h'):
conf.define('ALLOCA_H', 'stdlib.h')
if conf.env.DEST_OS == 'nswitch':
conf.check_cfg(package='solder', args='--cflags --libs', uselib_store='SOLDER')