提交 791c0512 authored 作者: Michael Jerris's avatar Michael Jerris

make spidermonkey build on OpenBSD

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2943 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 bddb6170
hosttype=`uname -s` hosttype=`uname -s`
ldflags="" ldflags=""
cflags=""
if [ $hosttype = "FreeBSD" ] ; then if [ $hosttype = "FreeBSD" ] ; then
patch <<__EOF__ patch <<__EOF__
...@@ -26,6 +27,8 @@ fi ...@@ -26,6 +27,8 @@ fi
if [ $hosttype = "OpenBSD" ] ; then if [ $hosttype = "OpenBSD" ] ; then
cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk
cflags="-DHAVE_VA_COPY -DVA_COPY=va_copy -D_PR_HAVE_GETPROTO_R -D_PR_HAVE_GETPROTO_R_INT"
ldflags="-lpthread"
fi fi
if [ $hosttype = "NetBSD" ] ; then if [ $hosttype = "NetBSD" ] ; then
...@@ -37,9 +40,14 @@ arch=`uname -m` ...@@ -37,9 +40,14 @@ arch=`uname -m`
opts="" opts=""
if [ $arch = "x86_64" ] ; then if [ $arch = "x86_64" ] ; then
opts="--enable-64bit" opts="--enable-64bit"
cflags="$cflags -fPIC"
fi
if [ $arch = "amd64" ] ; then
opts="--enable-64bit"
cflags="$cflags -fPIC"
fi fi
cd nsprpub && LDFLAGS=$ldflags ./configure $opts && $MAKE cd nsprpub && CFLAGS=$cflags LDFLAGS=$ldflags ./configure $opts && $MAKE
cd ../js/src && LDFLAGS=$ldflags JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr" $MAKE -f Makefile.ref `find . -name libjs.a` cd ../js/src && CFLAGS=$cflags LDFLAGS=$ldflags JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr" $MAKE -f Makefile.ref `find . -name libjs.a`
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论