'../bin/default/third_party/heimdal/lib/asn1' ]
if bld.CONFIG_SET('USING_SYSTEM_TDB'):
- (tdb_includes, tdb_ldflags, tdb_cpppath) = library_flags(bld, 'tdb')
+ (tdb_includes, tdb_ldflags, tdb_cpppath, tdb_libs) = library_flags(bld, 'tdb')
extra_includes += tdb_cpppath
else:
extra_includes += [ '../lib/tdb/include' ]
if bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
- (tevent_includes, tevent_ldflags, tevent_cpppath) = library_flags(bld, 'tevent')
+ (tevent_includes, tevent_ldflags, tevent_cpppath, tevent_libs) = library_flags(bld, 'tevent')
extra_includes += tevent_cpppath
else:
extra_includes += [ '../lib/tevent' ]
if bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
- (talloc_includes, talloc_ldflags, talloc_cpppath) = library_flags(bld, 'talloc')
+ (talloc_includes, talloc_ldflags, talloc_cpppath, talloc_libs) = library_flags(bld, 'talloc')
extra_includes += talloc_cpppath
else:
extra_includes += [ '../lib/talloc' ]
if bld.CONFIG_SET('USING_SYSTEM_POPT'):
- (popt_includes, popt_ldflags, popt_cpppath) = library_flags(bld, 'popt')
+ (popt_includes, popt_ldflags, popt_cpppath, popt_libs) = library_flags(bld, 'popt')
extra_includes += popt_cpppath
else:
extra_includes += [ '../lib/popt' ]
conf.env.hlist.append(h)
return True
- (ccflags, ldflags, cpppath) = library_flags(conf, lib)
+ (ccflags, ldflags, cpppath, libs) = library_flags(conf, lib)
hdrs = hlist_to_string(conf, headers=h)
if lib is None:
uselib = TO_LIST(lib)
- (ccflags, ldflags, cpppath) = library_flags(conf, uselib)
+ (ccflags, ldflags, cpppath, libs) = library_flags(conf, uselib)
includes = TO_LIST(includes)
includes.extend(cpppath)
Build.BuildContext.CONFIG_GET = CONFIG_GET
-def library_flags(self, libs):
+def library_flags(self, library):
'''work out flags from pkg_config'''
ccflags = []
ldflags = []
cpppath = []
- for lib in TO_LIST(libs):
+ libs = []
+ for lib in TO_LIST(library):
# note that we do not add the -I and -L in here, as that is added by the waf
# core. Adding it here would just change the order that it is put on the link line
# which can cause system paths to be added before internal libraries
extra_ccflags = TO_LIST(getattr(self.env, 'CFLAGS_%s' % lib.upper(), []))
extra_ldflags = TO_LIST(getattr(self.env, 'LDFLAGS_%s' % lib.upper(), []))
extra_cpppath = TO_LIST(getattr(self.env, 'CPPPATH_%s' % lib.upper(), []))
+ extra_libs = TO_LIST(getattr(self.env, 'LIB_%s' % lib.upper(), []))
ccflags.extend(extra_ccflags)
ldflags.extend(extra_ldflags)
cpppath.extend(extra_cpppath)
+ libs.extend(extra_libs)
extra_cpppath = TO_LIST(getattr(self.env, 'INCLUDES_%s' % lib.upper(), []))
cpppath.extend(extra_cpppath)
ccflags = unique_list(ccflags)
ldflags = unique_list(ldflags)
cpppath = unique_list(cpppath)
- return (ccflags, ldflags, cpppath)
+ libs = unique_list(libs)
+ return (ccflags, ldflags, cpppath, libs)
@conf
-def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False):
+def CHECK_LIB(conf, library, 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 []
}
'''
ret = []
- liblist = TO_LIST(libs)
- for lib in liblist[:]:
+ liblist = TO_LIST(library)
+ for lib in liblist:
if GET_TARGET_TYPE(conf, lib) == 'SYSLIB':
ret.append(lib)
continue
- (ccflags, ldflags, cpppath) = library_flags(conf, lib)
+ (ccflags, ldflags, cpppath, libs) = library_flags(conf, lib)
if shlib:
res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
else: