summaryrefslogtreecommitdiff
path: root/couchjs
diff options
context:
space:
mode:
authorRobert Newson <robert.newson@cloudant.com>2011-04-25 17:17:22 +0100
committerRobert Newson <robert.newson@cloudant.com>2011-04-25 17:17:22 +0100
commitb59bc2dcf1731223e744e37feb01c286ca5a5f08 (patch)
treeb6df4f40f64dedeff5e7ec9623bbe56d8370778a /couchjs
parenta9410e622d84c4b6c017d16ea600e9b19e306c59 (diff)
use pkg-config, if present, to find spidermonkey.
Diffstat (limited to 'couchjs')
-rw-r--r--couchjs/c_src/SConscript4
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')