]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make spidermonkey build on OpenBSD
authorMichael Jerris <mike@jerris.com>
Mon, 2 Oct 2006 06:27:29 +0000 (06:27 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 2 Oct 2006 06:27:29 +0000 (06:27 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2943 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/mozilla.build.sh

index a1a3459a478c6373107f12f15b950d4841a2e9a0..4a3accd183f3fc1fe2102c77afbff3cf8e75fcda 100755 (executable)
@@ -1,5 +1,6 @@
 hosttype=`uname -s`
 ldflags=""
+cflags=""
 if [ $hosttype = "FreeBSD" ] ; then
 
 patch <<__EOF__ 
@@ -26,6 +27,8 @@ fi
 
 if [ $hosttype = "OpenBSD" ] ; then
 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
 
 if [ $hosttype = "NetBSD" ] ; then
@@ -37,9 +40,14 @@ arch=`uname -m`
 opts=""
 if [ $arch = "x86_64" ] ; then
 opts="--enable-64bit"
+cflags="$cflags  -fPIC"
+fi
+if [ $arch = "amd64" ] ; then
+opts="--enable-64bit"
+cflags="$cflags -fPIC"
 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`