2006-10-01 16:06:16 +00:00
|
|
|
hosttype=`uname -s`
|
2006-10-02 04:06:27 +00:00
|
|
|
ldflags=""
|
2006-10-02 06:27:29 +00:00
|
|
|
cflags=""
|
2006-10-01 16:06:16 +00:00
|
|
|
if [ $hosttype = "FreeBSD" ] ; then
|
|
|
|
|
2006-10-04 00:27:59 +00:00
|
|
|
patch -p0 -u -f<<__EOF__
|
2006-10-01 16:06:16 +00:00
|
|
|
--- 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
|
|
|
|
|
2006-10-02 04:06:27 +00:00
|
|
|
ldflags="-lpthread"
|
2006-10-01 16:06:16 +00:00
|
|
|
fi
|
|
|
|
|
2006-10-01 23:12:50 +00:00
|
|
|
if [ $hosttype = "OpenBSD" ] ; then
|
|
|
|
cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk
|
2006-10-02 06:27:29 +00:00
|
|
|
cflags="-DHAVE_VA_COPY -DVA_COPY=va_copy -D_PR_HAVE_GETPROTO_R -D_PR_HAVE_GETPROTO_R_INT"
|
|
|
|
ldflags="-lpthread"
|
2006-10-01 23:12:50 +00:00
|
|
|
fi
|
|
|
|
|
2006-10-02 02:47:39 +00:00
|
|
|
if [ $hosttype = "NetBSD" ] ; then
|
|
|
|
cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk
|
|
|
|
fi
|
|
|
|
|
2006-03-21 17:08:54 +00:00
|
|
|
arch=`uname -m`
|
|
|
|
|
|
|
|
opts=""
|
|
|
|
if [ $arch = "x86_64" ] ; then
|
|
|
|
opts="--enable-64bit"
|
2006-10-02 06:27:29 +00:00
|
|
|
cflags="$cflags -fPIC"
|
|
|
|
fi
|
|
|
|
if [ $arch = "amd64" ] ; then
|
|
|
|
opts="--enable-64bit"
|
|
|
|
cflags="$cflags -fPIC"
|
2006-03-21 17:08:54 +00:00
|
|
|
fi
|
|
|
|
|
2006-10-02 06:27:29 +00:00
|
|
|
cd nsprpub && CFLAGS=$cflags LDFLAGS=$ldflags ./configure $opts && $MAKE
|
2006-03-21 17:08:54 +00:00
|
|
|
|
2006-10-02 06:27:29 +00:00
|
|
|
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`
|
2006-02-26 23:10:22 +00:00
|
|
|
|