# a waf tool to add autoconf-like macros to the configure section
-import Build, os, Options, preproc
+import Build, os, Options, preproc, Logs
import string
from Configure import conf
from samba_utils import *
+import samba_cross
missing_headers = set()
@conf
-def CHECK_DECLS(conf, vars, reverse=False, headers=None):
+def CHECK_DECLS(conf, vars, reverse=False, headers=None, always=False):
'''check a list of variable declarations, using the HAVE_DECL_xxx form
of define
if not CHECK_VARIABLE(conf, v,
define=define,
headers=headers,
- msg='Checking for declaration of %s' % v):
+ msg='Checking for declaration of %s' % v,
+ always=always):
ret = False
return ret
cflags = TO_LIST(cflags)
cflags.extend(ccflags)
+ exec_args = conf.SAMBA_CROSS_ARGS()
+
ret = conf.check(fragment=fragment,
execute=execute,
define_name = define,
type=type,
msg=msg,
quote=quote,
+ exec_args=exec_args,
define_ret=define_ret)
if not ret and CONFIG_SET(conf, define):
# sometimes conf.check() returns false, but it
liblist = TO_LIST(libs)
ret = True
for lib in liblist[:]:
- if GET_TARGET_TYPE(conf, lib):
+ if GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
continue
(ccflags, ldflags) = library_flags(conf, lib)
if not conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags):
if mandatory:
- print("Mandatory library '%s' not found for functions '%s'" % (lib, list))
+ Logs.error("Mandatory library '%s' not found for functions '%s'" % (lib, list))
sys.exit(1)
if empty_decl:
# if it isn't a mandatory library, then remove it from dependency lists
for lib in liblist[:]:
if not GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
if mandatory:
- print("Mandatory library '%s' not found for functions '%s'" % (lib, list))
+ Logs.error("Mandatory library '%s' not found for functions '%s'" % (lib, list))
sys.exit(1)
# if it isn't a mandatory library, then remove it from dependency lists
liblist.remove(lib)