summaryrefslogtreecommitdiffstats
path: root/source-builder/pkg-config
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-04-08 15:11:00 +1000
committerChris Johns <chrisj@rtems.org>2014-04-08 15:11:00 +1000
commitf3b549010d814fa5b2404042a687053c575884ac (patch)
tree2dc7497db20e3700fcdd9939844c23c474b51a3b /source-builder/pkg-config
parentdoc: Updated after GSoC student feedback. (diff)
downloadrtems-source-builder-f3b549010d814fa5b2404042a687053c575884ac.tar.bz2
config,sb: Qemu build updates for FreeBSD and the start of MinG32.
Hack round the FreeBSD iconv support in Freebsd 10. In 10 libc now supports iconv however iconv.h is present under /usr/local. Start to add support to build qemu for MinGW via a Cxc. This is a work in progress and contains lots of hidden traps. In config.py separate out of the canadian build status.
Diffstat (limited to 'source-builder/pkg-config')
-rwxr-xr-xsource-builder/pkg-config36
1 files changed, 19 insertions, 17 deletions
diff --git a/source-builder/pkg-config b/source-builder/pkg-config
index 5606f4d..330853e 100755
--- a/source-builder/pkg-config
+++ b/source-builder/pkg-config
@@ -83,12 +83,12 @@ def log(s, lf = True):
print s,
print >> out, s,
-def _check_package(lib_check, args):
+def _check_package(libraries, args):
ec = 1
pkg = None
flags = { 'cflags': '',
'libs': '' }
- libs = pkgconfig.package.splitter(lib_check)
+ libs = pkgconfig.package.splitter(libraries)
for lib in libs:
log('pkg: %s' % (lib))
pkg = pkgconfig.package(lib[0], prefix = args.prefix, output = log, src = src)
@@ -213,6 +213,9 @@ def run(argv):
(args.max_version and (args.exists or args.exact_version)):
raise error('only one of --exists, --exact-version, or --max-version')
+ if args.dont_define_prefix:
+ args.prefix = pkgconfig.default_prefix(False)
+
exists = False
ec = 1
@@ -220,21 +223,20 @@ def run(argv):
if args.atleast_pkgconfig_version:
ec = 0
else:
- for lib in args.libraries:
- ec, pkg, flags = _check_package(lib, args)
- if ec == 0:
- if args.cflags:
- if len(flags['cflags']):
- print flags['cflags']
- log('cflags: %s' % (flags['cflags']))
- else:
- log('cflags: empty')
- if args.libs:
- if len(flags['libs']):
- print flags['libs']
- log('libs: %s' % (flags['libs']))
- else:
- log('libs: empty')
+ ec, pkg, flags = _check_package(args.libraries, args)
+ if ec == 0:
+ if args.cflags:
+ if len(flags['cflags']):
+ print flags['cflags']
+ log('cflags: %s' % (flags['cflags']))
+ else:
+ log('cflags: empty')
+ if args.libs:
+ if len(flags['libs']):
+ print flags['libs']
+ log('libs: %s' % (flags['libs']))
+ else:
+ log('libs: empty')
#pkgconfig.package.dump_loaded()