summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-03-22 14:04:56 -0700
committerRico Tzschichholz <ricotz@ubuntu.com>2015-03-24 10:11:58 +0100
commit0f210321c4afdcf70debba42bebf5077932d7056 (patch)
tree5bb99623dfb736dbe183d7fc6717f8d4c1a59ab6 /giscanner/scannermain.py
parentba9da4f6c0ab3aeb1b648a0c0ef44f2d6471dcfc (diff)
downloadgobject-introspection-0f210321c4afdcf70debba42bebf5077932d7056.tar.gz
build: use the detected pkg-config
Rather than assuming that pkg-config is spelt pkg-config, use the environment variable $PKG_CONFIG which is the actual detected pkg-config spelling. This is particularly important when cross-compiling, where the pkg-config may be prefixed with the target and will actually provide a different result from the build pkg-config which may be available unprefixed. https://bugzilla.gnome.org/show_bug.cgi?id=746669
Diffstat (limited to 'giscanner/scannermain.py')
-rwxr-xr-xgiscanner/scannermain.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index bca4a887..b36284da 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -280,7 +280,7 @@ def process_options(output, allowed_flags):
def process_packages(options, packages):
- args = ['pkg-config', '--cflags']
+ args = [os.environ.get('PKG_CONFIG', 'pkg-config'), '--cflags']
args.extend(packages)
output = subprocess.Popen(args,
stdout=subprocess.PIPE).communicate()[0]