type='nolink',
execute=0,
ccflags=ccflags,
+ mandatory=False,
includes=cpppath,
uselib=lib.upper(),
msg="Checking for header %s" % h)
return conf.check(fragment='int main(void) { return 0; }\n',
execute=0,
ldflags=ldflags,
+ mandatory=False,
msg="Checking linker accepts %s" % ldflags)
(ccflags, ldflags, cpppath) = library_flags(conf, lib)
if shlib:
- res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper())
+ res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
else:
- res = conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper())
+ res = conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
if not res:
if mandatory:
execute=0,
ccflags='-fstack-protector',
ldflags='-fstack-protector',
+ mandatory=False,
msg='Checking if toolchain accepts -fstack-protector'):
conf.ADD_CFLAGS('-fstack-protector')
conf.ADD_LDFLAGS('-fstack-protector')
return v * 2;
}
'''
- return conf.check(features='c cshlib',vnum="1",fragment=snip,msg=msg)
+ return conf.check(features='c cshlib',vnum="1",fragment=snip,msg=msg, mandatory=False)
@conf
def CHECK_NEED_LC(conf, msg):
ldb_module = PyImport_ImportModule("ldb");
return v * 2;
}'''
- return conf.check(features='c cshlib',uselib='PYEMBED',fragment=snip,msg=msg)
+ return conf.check(features='c cshlib',uselib='PYEMBED',fragment=snip,msg=msg, mandatory=False)
# this one is quite complex, and should probably be broken up
# into several parts. I'd quite like to create a set of CHECK_COMPOUND()
# waf build tool for building IDL files with pidl
import os
-import Build, Logs, Utils
+import Build, Logs, Utils, Configure
from Configure import conf
@conf
del(conf.env.defines['PYTHONARCHDIR'])
def _check_python_headers(conf, mandatory):
- conf.check_python_headers(mandatory=mandatory)
+ try:
+ Configure.ConfigurationError
+ conf.check_python_headers(mandatory=mandatory)
+ except Configure.ConfigurationError:
+ if mandatory:
+ raise
if conf.env['PYTHON_VERSION'] > '3':
abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0]