summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <robert.newson@cloudant.com>2011-04-29 21:16:20 +0100
committerRobert Newson <robert.newson@cloudant.com>2011-04-29 21:16:20 +0100
commitfeaf729734032a59cb1f83f8dddfaabcdb44e914 (patch)
tree2b7556ef09d1cefdc06d7986125540ae8b4e60af
parentb59bc2dcf1731223e744e37feb01c286ca5a5f08 (diff)
make pkg-config modifications conditional on successful status code.
-rw-r--r--couchjs/c_src/SConscript8
1 files changed, 6 insertions, 2 deletions
diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript
index e9efce60..cfce5605 100644
--- a/couchjs/c_src/SConscript
+++ b/couchjs/c_src/SConscript
@@ -33,8 +33,12 @@ if os.uname()[0] == 'FreeBSD':
env['LIB_COMPAT'] = 'compat'
if os.path.exists('/usr/bin/pkg-config'):
- env['CCFLAGS'] += commands.getoutput("/usr/bin/pkg-config mozilla-js --cflags")
- env.Append(LINKFLAGS=commands.getoutput("/usr/bin/pkg-config mozilla-js --libs-only-L"))
+ (status, output) = commands.getstatusoutput("/usr/bin/pkg-config mozilla-js --cflags")
+ if status == 0:
+ env['CCFLAGS'] += output
+ (status, output) = commands.getstatusoutput("/usr/bin/pkg-config mozilla-js --libs-only-L")
+ if status == 0:
+ env.Append(LINKFLAGS=output)
if not env.GetOption('clean'):
conf = Configure(env, config_h='config.h')