Browse Source

engine: check for non-standard alloca header

pull/2/head
Alibek Omarov 3 years ago
parent
commit
aa7bfb4819
  1. 3
      engine/common/common.c
  2. 6
      wscript

3
engine/common/common.c

@ -13,6 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -13,6 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#if defined( ALLOCA_H )
#include ALLOCA_H
#endif
#include "common.h"
#include "studio.h"
#include "xash3d_mathlib.h"

6
wscript

@ -290,6 +290,12 @@ def configure(conf): @@ -290,6 +290,12 @@ def configure(conf):
else:
conf.undefine('HAVE_TGMATH_H')
# check if we can use alloca.h or malloc.h
if conf.check_cc(header_name='alloca.h', mandatory=False):
conf.define('ALLOCA_H', 'alloca.h')
elif conf.check_cc(header_name='malloc.h', mandatory=False):
conf.define('ALLOCA_H', 'malloc.h')
# indicate if we are packaging for Linux/BSD
if conf.options.PACKAGING:
conf.env.LIBDIR = conf.env.BINDIR = '${PREFIX}/lib/xash3d'

Loading…
Cancel
Save