SpiderMonkey js-1.7.0编译安装

本次安装基于系统CentOS Linux release 6.0 (Final)

1.下载源码

ftp下载地址: http://ftp.mozilla.org/pub/js/

2.解压源码

$ tar zxvf js-1.7.0.tar.gz

3.编译源码

cd js/src
make -f Makefile.ref

4.复制到指定目录

cd Linux_All_DBG.OBJ
cp js jscpucfg jskwgen ~/local/normal/bin/
cp libjs.a libjs.so ~/local/normal/lib/
cp *.h ../*.h ../jskeyword.tbl ~/local/normal/include/smjs/

5.编写测试代码

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <smjs/jsapi.h>
int main(int argc, char **argv)
    return 0;