diff options
author | Robert Newson <robert.newson@cloudant.com> | 2011-04-25 17:17:22 +0100 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2011-04-25 17:17:22 +0100 |
commit | b59bc2dcf1731223e744e37feb01c286ca5a5f08 (patch) | |
tree | b6df4f40f64dedeff5e7ec9623bbe56d8370778a /couchjs/c_src | |
parent | a9410e622d84c4b6c017d16ea600e9b19e306c59 (diff) |
use pkg-config, if present, to find spidermonkey.
Diffstat (limited to 'couchjs/c_src')
-rw-r--r-- | couchjs/c_src/SConscript | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript index 7837be58..e9efce60 100644 --- a/couchjs/c_src/SConscript +++ b/couchjs/c_src/SConscript @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations under # the License. import os +import commands def require_lib(name): if not conf.CheckLib(name): @@ -31,6 +32,9 @@ if os.uname()[0] == 'FreeBSD': env['LIB_DL'] = env['LIB_RT'] = '' 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")) if not env.GetOption('clean'): conf = Configure(env, config_h='config.h') |