]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix spidermonkey freebsd build. Thanks vile for the patch
authorAnthony Minessale <anthony.minessale@gmail.com>
Sun, 1 Oct 2006 16:06:16 +0000 (16:06 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sun, 1 Oct 2006 16:06:16 +0000 (16:06 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2913 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/mozilla.build.sh

index fbbd10a63bb9df43e7d189c14335ce2202e9f093..856c8d910631a11f52186f8776a24418ffe4c13a 100755 (executable)
@@ -1,3 +1,29 @@
+hosttype=`uname -s`
+
+if [ $hosttype = "FreeBSD" ] ; then
+
+patch <<__EOF__ 
+--- nsprpub/pr/include/md/_freebsd.h.orig       Sat Sep 30 22:19:12 2006
++++ nsprpub/pr/include/md/_freebsd.h    Sat Sep 30 22:23:16 2006
+@@ -106,6 +106,11 @@
+ #define _PR_IPV6_V6ONLY_PROBE
+ #endif
+
++#if __FreeBSD_version >= 601103
++#define _PR_HAVE_GETPROTO_R
++#define _PR_HAVE_5_ARG_GETPROTO_R
++#endif
++
+ #define USE_SETJMP
+
+ #ifndef _PR_PTHREADS
+__EOF__
+
+cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk
+ldflags=-lpthread
+
+fi
+
 arch=`uname -m`
 
 opts=""
@@ -5,7 +31,7 @@ if [ $arch = "x86_64" ] ; then
 opts="--enable-64bit"
 fi
 
-cd nsprpub && ./configure $opts && $MAKE
+cd nsprpub && LDFLAGS=$ldflags ./configure $opts && $MAKE
 
 cd ../js/src && 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`