@conf
-def CHECK_LIB(conf, libs, mandatory=False):
+def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True):
'''check if a set of libraries exist'''
liblist = TO_LIST(libs)
if mandatory:
print("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
- SET_TARGET_TYPE(conf, lib, 'EMPTY')
+ if empty_decl:
+ # if it isn't a mandatory library, then remove it from dependency lists
+ SET_TARGET_TYPE(conf, lib, 'EMPTY')
ret = False
else:
conf.define('HAVE_LIB%s' % lib.upper().replace('-','_'), 1)
#
# optionally check for the functions first in libc
@conf
-def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False, headers=None, link=None):
+def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False,
+ headers=None, link=None, empty_decl=True):
remaining = TO_LIST(list)
liblist = TO_LIST(library)
if remaining == []:
for lib in liblist:
- if GET_TARGET_TYPE(conf, lib) != 'SYSLIB':
+ if GET_TARGET_TYPE(conf, lib) != 'SYSLIB' and empty_decl:
SET_TARGET_TYPE(conf, lib, 'EMPTY')
return True
- conf.CHECK_LIB(liblist)
+ conf.CHECK_LIB(liblist, empty_decl=empty_decl)
for lib in liblist[:]:
if not GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
if mandatory: