From b59bc2dcf1731223e744e37feb01c286ca5a5f08 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Mon, 25 Apr 2011 17:17:22 +0100 Subject: use pkg-config, if present, to find spidermonkey. --- couchjs/c_src/SConscript | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'couchjs') 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') -- cgit v1.2.3