Commit b74c331f authored by Jelmer Vernooij's avatar Jelmer Vernooij

Import upstream version 2.0.3~git20101129

parent 3d233cd6
# simple makefile wrapper to run waf
WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
all:
$(WAF) build
install:
$(WAF) install
uninstall:
$(WAF) uninstall
test:
$(WAF) test $(TEST_OPTIONS)
testenv:
$(WAF) test --testenv $(TEST_OPTIONS)
quicktest:
$(WAF) test --quick $(TEST_OPTIONS)
dist:
$(WAF) dist
distcheck:
$(WAF) distcheck
clean:
$(WAF) clean
distclean:
$(WAF) distclean
reconfigure: configure
$(WAF) reconfigure
show_waf_options:
$(WAF) --help
# some compatibility make targets
everything: all
testsuite: all
check: test
torture: all
# this should do an install as well, once install is finished
installcheck: test
etags:
$(WAF) etags
ctags:
$(WAF) ctags
bin/%:: FORCE
$(WAF) --targets=`basename $@`
FORCE:
#!/bin/sh
rm -rf autom4te.cache
rm -f configure config.h.in
IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace"
autoconf $IPATHS || exit 1
autoheader $IPATHS || exit 1
rm -rf autom4te.cache
echo "Now run ./configure and then make."
exit 0
buildtools/scripts/autogen-waf.sh
\ No newline at end of file
#!/bin/sh
p=`dirname $0`
echo "Setting up for waf build"
echo "done. Now run $p/configure or $p/configure.developer then make."
if [ $p != "." ]; then
echo "Notice: The build invoke path is not the main directory! Use make with the parameter"
echo "-C $p. Example: make -C $p all"
fi
#!/bin/sh
rm -rf autom4te.cache
rm -f configure config.h.in
IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace"
autoconf $IPATHS || exit 1
autoheader $IPATHS || exit 1
rm -rf autom4te.cache
echo "Now run ./configure and then make."
exit 0
autogen-waf.sh
\ No newline at end of file
No preview for this file type
......@@ -12,13 +12,13 @@ uninstall:
$(WAF) uninstall
test:
$(WAF) test
$(WAF) test $(TEST_OPTIONS)
testenv:
$(WAF) test --testenv
$(WAF) test --testenv $(TEST_OPTIONS)
quicktest:
$(WAF) test --quick
$(WAF) test --quick $(TEST_OPTIONS)
dist:
$(WAF) dist
......@@ -35,6 +35,9 @@ distclean:
reconfigure: configure
$(WAF) reconfigure
show_waf_options:
$(WAF) --help
# some compatibility make targets
everything: all
......@@ -53,6 +56,10 @@ etags:
ctags:
$(WAF) ctags
bin/%:: FORCE
$(WAF) --targets=`basename $@`
FORCE:
configure: autogen-waf.sh BUILDTOOLS/scripts/configure.waf
./autogen-waf.sh
......
......@@ -10,11 +10,11 @@ cat <<EOF
set height 0
set width 0
EOF
nm $SHAREDLIB | cut -d' ' -f2- | egrep '^[BDGTRVW]' | grep -v @ | cut -c3- | sort | while read s; do
nm "$SHAREDLIB" | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | cut -c3- | sort | while read s; do
echo "echo $s: "
echo p $s
done
) > $GDBSCRIPT
gdb -batch -x $GDBSCRIPT $SHAREDLIB < /dev/null
gdb -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
rm -f $GDBSCRIPT
# handle substitution of variables in pc files
import Build
from samba_utils import *
def subst_at_vars(task):
'''substiture @VAR@ style variables in a file'''
src = task.inputs[0].srcpath(task.env)
tgt = task.outputs[0].bldpath(task.env)
f = open(src, 'r')
s = f.read()
f.close()
# split on the vars
a = re.split('(@\w+@)', s)
out = []
done_var = {}
back_sub = [ ('PREFIX', '${prefix}'), ('EXEC_PREFIX', '${exec_prefix}')]
for v in a:
if re.match('@\w+@', v):
vname = v[1:-1]
if not vname in task.env and vname.upper() in task.env:
vname = vname.upper()
if not vname in task.env:
Logs.error("Unknown substitution %s in %s" % (v, task.name))
sys.exit(1)
v = SUBST_VARS_RECURSIVE(task.env[vname], task.env)
# now we back substitute the allowed pc vars
for (b, m) in back_sub:
s = task.env[b]
if s == v[0:len(s)]:
if not b in done_var:
# we don't want to substitute the first usage
done_var[b] = True
else:
v = m + v[len(s):]
break
out.append(v)
contents = ''.join(out)
f = open(tgt, 'w')
s = f.write(contents)
f.close()
return 0
def PKG_CONFIG_FILES(bld, pc_files, vnum=None):
'''install some pkg_config pc files'''
dest = '${PKGCONFIGDIR}'
dest = bld.EXPAND_VARIABLES(dest)
for f in TO_LIST(pc_files):
base=os.path.basename(f)
t = bld.SAMBA_GENERATOR('PKGCONFIG_%s' % base,
rule=subst_at_vars,
source=f+'.in',
target=f)
t.vars = []
for v in [ 'PREFIX', 'EXEC_PREFIX' ]:
t.vars.append(t.env[v])
if vnum:
t.env.PACKAGE_VERSION = vnum
bld.INSTALL_FILES(dest, f, flat=True, destname=base)
Build.BuildContext.PKG_CONFIG_FILES = PKG_CONFIG_FILES
......@@ -2,6 +2,7 @@
# and for SAMBA_ macros for building libraries, binaries etc
import Options
import Build
from optparse import SUPPRESS_HELP
def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
......@@ -21,3 +22,22 @@ def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
opt.add_option(without_val, help=SUPPRESS_HELP, action="store_false",
dest=dest)
Options.Handler.SAMBA3_ADD_OPTION = SAMBA3_ADD_OPTION
def SAMBA3_IS_STATIC_MODULE(bld, module):
'''Check whether module is in static list'''
if module.lower() in bld.env['static_modules']:
return True
return False
Build.BuildContext.SAMBA3_IS_STATIC_MODULE = SAMBA3_IS_STATIC_MODULE
def SAMBA3_IS_SHARED_MODULE(bld, module):
'''Check whether module is in shared list'''
if module.lower() in bld.env['shared_modules']:
return True
return False
Build.BuildContext.SAMBA3_IS_SHARED_MODULE = SAMBA3_IS_SHARED_MODULE
def SAMBA3_IS_ENABLED_MODULE(bld, module):
'''Check whether module is in either shared or static list '''
return SAMBA3_IS_STATIC_MODULE(bld, module) or SAMBA3_IS_SHARED_MODULE(bld, module)
Build.BuildContext.SAMBA3_IS_ENABLED_MODULE = SAMBA3_IS_ENABLED_MODULE
# samba ASN1 rules
import Build, os
from samba_utils import *
from samba_autoconf import *
def SAMBA_ASN1(bld, name, source,
options='',
directory='',
option_file=None,
includes=''):
'''Build a ASN1 file using the asn1 compiler.
This will produce 2 output files'''
bname = os.path.basename(source)[0:-5];
dname = os.path.dirname(source)
asn1name = "%s_asn1" % bname
if not SET_TARGET_TYPE(bld, name, 'ASN1'):
return
# for ASN1 compilation, I always put it in build_source, as it doesn't make
# sense elsewhere
bld.SET_BUILD_GROUP('build_source')
out_files = []
out_files.append("../heimdal/%s/asn1_%s_asn1.x" % (directory, bname))
out_files.append("../heimdal/%s/%s_asn1.hx" % (directory, bname))
out_files.append("../heimdal/%s/%s_asn1-priv.hx" % (directory, bname))
# the ${TGT[0].parent.abspath(env)} expression gives us the parent directory of
# the first target in the build directory
# SRC[0].abspath(env) gives the absolute path to the source directory for the first
# source file. Note that in the case of a option_file, we have more than
# one source file
cd_rule = 'cd ${TGT[0].parent.abspath(env)}'
asn1_rule = cd_rule + ' && ${BLDBIN}/asn1_compile ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file ${SRC[0].abspath(env)} ${ASN1NAME}'
source = TO_LIST(source)
source.append('asn1_compile')
if option_file is not None:
source.append(option_file)
t = bld(rule=asn1_rule,
ext_out = '.x',
before = 'cc',
on_results = True,
shell = True,
source = source,
target = out_files,
name=name + '_ASN1')
t.env.ASN1NAME = asn1name
t.env.ASN1OPTIONS = options
t.env.BLDBIN = os.path.normpath(os.path.join(bld.srcnode.abspath(bld.env), '..'))
if option_file is not None:
t.env.OPTION_FILE = "--option-file=%s" % os.path.normpath(os.path.join(bld.curdir, option_file))
cfile = out_files[0][0:-2] + '.c'
hfile = out_files[1][0:-3] + '.h',
hpriv = out_files[2][0:-3] + '.h',
# now generate a .c file from the .x file
t = bld(rule='''( echo '#include "config.h"' && cat ${SRC} ) > ${TGT}''',
source = out_files[0],
target = cfile,
shell = True,
on_results=True,
ext_out = '.c',
ext_in = '.x',
depends_on = name + '_ASN1',
name = name + '_C')
# and generate a .h file from the .hx file
t = bld(rule='cp ${SRC} ${TGT}',
source = out_files[1],
ext_out = '.c',
ext_in = '.x',
on_results=True,
target = hfile,
depends_on = name + '_ASN1',
name = name + '_H')
# and generate a .h file from the .hx file
t = bld(rule='cp ${SRC} ${TGT}',
source = out_files[2],
ext_out = '.c',
ext_in = '.x',
on_results=True,
target = hpriv,
depends_on = name + '_ASN1',
name = name + '_PRIV_H')
bld.SET_BUILD_GROUP('main')
includes = TO_LIST(includes)
includes.append(os.path.dirname(out_files[0]))
t = bld(features = 'cc',
source = cfile,
target = name,
samba_cflags = CURRENT_CFLAGS(bld, name, ''),
depends_on = '',
samba_deps = TO_LIST('HEIMDAL_ROKEN'),
samba_includes = includes,
local_include = True)
Build.BuildContext.SAMBA_ASN1 = SAMBA_ASN1
......@@ -84,6 +84,7 @@ def CHECK_HEADER(conf, h, add_headers=False, lib=None):
return False
d = h.upper().replace('/', '_')
d = d.replace('.', '_')
d = d.replace('-', '_')
d = 'HAVE_%s' % d
if CONFIG_SET(conf, d):
if add_headers:
......@@ -355,8 +356,10 @@ def CHECK_CODE(conf, code, define,
if msg is None:
msg="Checking for %s" % define
cflags = TO_LIST(cflags)
if local_include:
cflags += ' -I%s' % conf.curdir
cflags.append('-I%s' % conf.curdir)
if not link:
type='nolink'
......@@ -367,7 +370,6 @@ def CHECK_CODE(conf, code, define,
(ccflags, ldflags) = library_flags(conf, uselib)
cflags = TO_LIST(cflags)
cflags.extend(ccflags)
if on_target:
......@@ -435,6 +437,15 @@ def CHECK_CFLAGS(conf, cflags):
ccflags=cflags,
msg="Checking compiler accepts %s" % cflags)
@conf
def CHECK_LDFLAGS(conf, ldflags):
'''check if the given ldflags are accepted by the linker
'''
return conf.check(fragment='int main(void) { return 0; }\n',
execute=0,
ldflags=ldflags,
msg="Checking linker accepts %s" % ldflags)
@conf
def CONFIG_SET(conf, option):
......@@ -448,40 +459,62 @@ def library_flags(conf, libs):
ccflags = []
ldflags = []
for lib in TO_LIST(libs):
inc_path = None
inc_path = getattr(conf.env, 'CPPPATH_%s' % lib.upper(), [])
lib_path = getattr(conf.env, 'LIBPATH_%s' % lib.upper(), [])
for i in inc_path:
ccflags.append('-I%s' % i)
for l in lib_path:
ldflags.append('-L%s' % l)
ccflags.extend(['-I%s' % i for i in inc_path])
ldflags.extend(['-L%s' % l for l in lib_path])
extra_ccflags = TO_LIST(getattr(conf.env, 'CCFLAGS_%s' % lib.upper(), []))
extra_ldflags = TO_LIST(getattr(conf.env, 'LDFLAGS_%s' % lib.upper(), []))
ccflags.extend(extra_ccflags)
ldflags.extend(extra_ldflags)
if 'EXTRA_LDFLAGS' in conf.env:
ldflags.extend(conf.env['EXTRA_LDFLAGS'])
ccflags = unique_list(ccflags)
ldflags = unique_list(ldflags)
return (ccflags, ldflags)
@conf
def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True):
'''check if a set of libraries exist'''
def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False):
'''check if a set of libraries exist as system libraries
returns the sublist of libs that do exist as a syslib or []
'''
fragment= '''
int foo()
{
int v = 2;
return v*2;
}
'''
ret = []
liblist = TO_LIST(libs)
ret = True
for lib in liblist[:]:
if GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
ret.append(lib)
continue
(ccflags, ldflags) = library_flags(conf, lib)
if shlib:
res = conf.check(features='cc cshlib', fragment=fragment, lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags)
else:
res = conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags)
if not conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags):
if not res:
if mandatory:
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
SET_TARGET_TYPE(conf, lib, 'EMPTY')
ret = False
if set_target:
SET_TARGET_TYPE(conf, lib, 'EMPTY')
else:
conf.define('HAVE_LIB%s' % lib.upper().replace('-','_'), 1)
conf.env['LIB_' + lib.upper()] = lib
LOCAL_CACHE_SET(conf, 'TARGET_TYPE', lib, 'SYSLIB')
if set_target:
conf.SET_TARGET_TYPE(lib, 'SYSLIB')
ret.append(lib)
return ret
......@@ -489,7 +522,7 @@ def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True):
@conf
def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False,
headers=None, link=True, empty_decl=True):
headers=None, link=True, empty_decl=True, set_target=True):
"""
check that the functions in 'list' are available in 'library'
if they are, then make that library available as a dependency
......@@ -523,19 +556,15 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False,
SET_TARGET_TYPE(conf, lib, 'EMPTY')
return True
conf.CHECK_LIB(liblist, empty_decl=empty_decl)
checklist = conf.CHECK_LIB(liblist, empty_decl=empty_decl, set_target=set_target)
for lib in liblist[:]:
if not GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
if mandatory:
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)
continue
if not lib in checklist and mandatory:
Logs.error("Mandatory library '%s' not found for functions '%s'" % (lib, list))
sys.exit(1)
ret = True
for f in remaining:
if not CHECK_FUNC(conf, f, lib=' '.join(liblist), headers=headers, link=link):
if not CHECK_FUNC(conf, f, lib=' '.join(checklist), headers=headers, link=link):
ret = False
return ret
......@@ -560,6 +589,7 @@ def SAMBA_CONFIG_H(conf, path=None):
# we add these here to ensure that -Wstrict-prototypes is not set during configure
conf.ADD_CFLAGS('-Wall -g -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k',
testflags=True)
conf.env.DEVELOPER_MODE = True
if Options.options.picky_developer:
conf.ADD_CFLAGS('-Werror', testflags=True)
......@@ -601,6 +631,21 @@ def ADD_CFLAGS(conf, flags, testflags=False):
conf.env['EXTRA_CFLAGS'] = []
conf.env['EXTRA_CFLAGS'].extend(TO_LIST(flags))
@conf
def ADD_LDFLAGS(conf, flags, testflags=False):
'''add some LDFLAGS to the command line
optionally set testflags to ensure all the flags work
'''
if testflags:
ok_flags=[]
for f in flags.split():
if CHECK_LDFLAGS(conf, f):
ok_flags.append(f)
flags = ok_flags
if not 'EXTRA_LDFLAGS' in conf.env:
conf.env['EXTRA_LDFLAGS'] = []
conf.env['EXTRA_LDFLAGS'].extend(TO_LIST(flags))
@conf
......
......@@ -3,29 +3,6 @@
import Build
from samba_utils import *
def HEIMDAL_AUTOPROTO(bld, header, source, options=None, group='prototypes'):
'''rule for heimdal prototype generation'''
bld.SET_BUILD_GROUP(group)
if options is None:
options='-q -P comment -o'
SET_TARGET_TYPE(bld, header, 'PROTOTYPE')
t = bld(rule='${PERL} ${HEIMDAL}/cf/make-proto.pl ${OPTIONS} ${TGT[0].abspath(env)} ${SRC}',
source=source,
target=header,
on_results=True,
ext_out='.c',
before='cc')
t.env.HEIMDAL = os.path.join(bld.srcnode.abspath(), 'source4/heimdal')
t.env.OPTIONS = options
Build.BuildContext.HEIMDAL_AUTOPROTO = HEIMDAL_AUTOPROTO
def HEIMDAL_AUTOPROTO_PRIVATE(bld, header, source):
'''rule for private heimdal prototype generation'''
bld.HEIMDAL_AUTOPROTO(header, source, options='-q -P comment -p')
Build.BuildContext.HEIMDAL_AUTOPROTO_PRIVATE = HEIMDAL_AUTOPROTO_PRIVATE
def SAMBA_AUTOPROTO(bld, header, source):
'''rule for samba prototype generation'''
bld.SET_BUILD_GROUP('prototypes')
......@@ -39,7 +16,7 @@ def SAMBA_AUTOPROTO(bld, header, source):
on_results=True,
ext_out='.c',
before ='cc',
rule = '${PERL} ${SCRIPT}/mkproto.pl --srcdir=.. --builddir=. --public=/dev/null --private=${TGT} ${SRC}'
rule = '${PERL} "${SCRIPT}/mkproto.pl" --srcdir=.. --builddir=. --public=/dev/null --private="${TGT}" ${SRC}'
)
t.env.SCRIPT = os.path.join(bld.srcnode.abspath(), 'source4/script')
Build.BuildContext.SAMBA_AUTOPROTO = SAMBA_AUTOPROTO
......
......@@ -4,13 +4,16 @@ from Configure import conf
import Logs
from samba_utils import *
def BUNDLED_NAME(bld, name, bundled_extension):
def PRIVATE_NAME(bld, name, private_extension, private_library):
'''possibly rename a library to include a bundled extension'''
if bld.env.DISABLE_SHARED or not bundled_extension:
if bld.env.DISABLE_SHARED or not private_extension:
return name
if name in bld.env.BUNDLED_EXTENSION_EXCEPTION:
if name in bld.env.PRIVATE_EXTENSION_EXCEPTION and not private_library:
return name
extension = getattr(bld.env, 'BUNDLED_EXTENSION', '')
if private_library and bld.EXPAND_VARIABLES(bld.env.LIBDIR) != bld.EXPAND_VARIABLES(bld.env.PRIVATELIBDIR):
# Private libraries already have their own namespace in another way
return name
extension = getattr(bld.env, 'PRIVATE_EXTENSION', '')
if extension:
return name + '-' + extension
return name
......@@ -46,13 +49,13 @@ def BUILTIN_DEFAULT(opt, builtins):
Options.Handler.BUILTIN_DEFAULT = BUILTIN_DEFAULT
def BUNDLED_EXTENSION_DEFAULT(opt, extension, noextenion=''):
'''set a default bundled library extension'''
if 'BUNDLED_EXTENSION_DEFAULT' in Options.options:
def PRIVATE_EXTENSION_DEFAULT(opt, extension, noextension=''):
'''set a default private library extension'''
if 'PRIVATE_EXTENSION_DEFAULT' in Options.options:
return
Options.options['BUNDLED_EXTENSION_DEFAULT'] = extension
Options.options['BUNDLED_EXTENSION_EXCEPTION'] = noextenion
Options.Handler.BUNDLED_EXTENSION_DEFAULT = BUNDLED_EXTENSION_DEFAULT
Options.options['PRIVATE_EXTENSION_DEFAULT'] = extension
Options.options['PRIVATE_EXTENSION_EXCEPTION'] = noextension
Options.Handler.PRIVATE_EXTENSION_DEFAULT = PRIVATE_EXTENSION_DEFAULT
def minimum_library_version(conf, libname, default):
......@@ -72,6 +75,18 @@ def minimum_library_version(conf, libname, default):
return default
@conf
def LIB_MAY_BE_BUNDLED(conf, libname):
return ('NONE' not in conf.env.BUNDLED_LIBS and
'!%s' % libname not in conf.env.BUNDLED_LIBS)
@conf
def LIB_MUST_BE_BUNDLED(conf, libname):
return ('ALL' in conf.env.BUNDLED_LIBS or
libname in conf.env.BUNDLED_LIBS)
@runonce
@conf
def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
......@@ -82,12 +97,21 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
this first tries via pkg-config, then if that fails
tries by testing for a specified function in the specified lib
'''
if 'ALL' in conf.env.BUNDLED_LIBS or libname in conf.env.BUNDLED_LIBS:
if conf.LIB_MUST_BE_BUNDLED(libname):
return False
found = 'FOUND_SYSTEMLIB_%s' % libname
if found in conf.env:
return conf.env[found]
def check_functions_headers():
'''helper function for CHECK_BUNDLED_SYSTEM'''
if checkfunctions is None:
return True
if require_headers and headers and not conf.CHECK_HEADERS(headers, lib=libname):
return False
return conf.CHECK_FUNCS_IN(checkfunctions, libname, headers=headers,
empty_decl=False, set_target=False)
# see if the library should only use a system version if another dependent
# system version is found. That prevents possible use of mixed library
# versions
......@@ -95,7 +119,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
for syslib in TO_LIST(onlyif):
f = 'FOUND_SYSTEMLIB_%s' % syslib
if not f in conf.env:
if 'NONE' in conf.env.BUNDLED_LIBS or '!'+libname in conf.env.BUNDLED_LIBS:
if not conf.LIB_MAY_BE_BUNDLED(libname):
Logs.error('ERROR: Use of system library %s depends on missing system library %s' % (libname, syslib))
sys.exit(1)
conf.env[found] = False
......@@ -104,29 +128,60 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
minversion = minimum_library_version(conf, libname, minversion)
# try pkgconfig first
if conf.check_cfg(package=libname,
if (conf.check_cfg(package=libname,
args='"%s >= %s" --cflags --libs' % (libname, minversion),
msg='Checking for system %s >= %s' % (libname, minversion)):
msg='Checking for system %s >= %s' % (libname, minversion)) and
check_functions_headers()):
conf.SET_TARGET_TYPE(libname, 'SYSLIB')
conf.env[found] = True
if implied_deps:
conf.SET_SYSLIB_DEPS(libname, implied_deps)
return True
if checkfunctions is not None:
headers_ok = True
if require_headers and headers and not conf.CHECK_HEADERS(headers):
headers_ok = False
if headers_ok and conf.CHECK_FUNCS_IN(checkfunctions, libname, headers=headers, empty_decl=False