conf.env[name] = conf.env['PREFIX'] + default
@conf
-def ADD_NAMED_CFLAGS(conf, name, flags, testflags=False, prereq_flags=[]):
+def ADD_NAMED_CFLAGS(conf, name, flags, testflags=False, prereq_flags=None):
'''add some CFLAGS to the command line
optionally set testflags to ensure all the flags work
'''
+ if prereq_flags is None:
+ prereq_flags = []
prereq_flags = TO_LIST(prereq_flags)
if testflags:
ok_flags=[]
conf.env[name].extend(TO_LIST(flags))
@conf
-def ADD_CFLAGS(conf, flags, testflags=False, prereq_flags=[]):
+def ADD_CFLAGS(conf, flags, testflags=False, prereq_flags=None):
'''add some CFLAGS to the command line
optionally set testflags to ensure all the flags work
'''
+ if prereq_flags is None:
+ prereq_flags = []
ADD_NAMED_CFLAGS(conf, 'EXTRA_CFLAGS', flags, testflags=testflags,
prereq_flags=prereq_flags)
@conf
def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, minversion='0.0.0',
- maxversion=None, version_blacklist=[],
+ maxversion=None, version_blacklist=None,
onlyif=None, implied_deps=None, pkg=None):
'''check if a library is available as a system library.
This only tries using pkg-config
'''
+ if version_blacklist is None:
+ version_blacklist = []
return conf.CHECK_BUNDLED_SYSTEM(libname,
minversion=minversion,
maxversion=maxversion,
@conf
def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
- maxversion=None, version_blacklist=[],
+ maxversion=None, version_blacklist=None,
checkfunctions=None, headers=None, checkcode=None,
onlyif=None, implied_deps=None,
require_headers=True, pkg=None, set_target=True):
tries by testing for a specified function in the specified lib
'''
# We always do a logic validation of 'onlyif' first
+ if version_blacklist is None:
+ version_blacklist = []
missing = []
if onlyif:
for l in samba_utils.TO_LIST(onlyif):