Okay this is how I got oolite to build on debian last night (I might be forgetting something though). It's messy so brace yourself....
apt-get source libmozjs-dev
This will download the xulrunner source package to the current directory.
cd into the xulrunner-... directory
wait until js/src/jsautocfg.h is created
Don't use the packages that dpkg-buildpackage creates --- I got a segfault when I used them. In fact don't wait for dpkg-buildpackage to finish as it takes forever.
Copy the newly created jsautocfg.h to deps/Cross-platform-deps/SpiderMonkey/js/src in the oolite-linux/trunk directory
Build deps/Cross-platform-deps/SpiderMonkey/js/src/fdlibm. Use deps/Cross-platform-deps/SpiderMonkey/js/src/fdlibm/Makefile.ref as the makefile
Modify deps/Cross-platform-deps/SpiderMonkey/js/src/Makefile.ref by adding the following line near the start of the file...
DEFINES += -DJS_C_STRINGS_ARE_UTF8 -UMOZILLA_1_8_BRANCH
Build deps/Cross-platform-deps/SpiderMonkey/js/src the using modified Makefile.ref for your makefile.
If libjs.so is present when you compile oolite it seems to link to that instead of libjs.a which is not what you want, so do...
mv deps/Cross-platform-deps/SpiderMonkey/js/src/Linux_All_DBG.OBJ/libjs.so deps/Cross-platform-deps/SpiderMonkey/js/src/Linux_All_DBG.OBJ/oldlibjs.so
Now modify GNUmakefile in the oolite trunk directory...
Change the line defining ADDITIONAL_INCLUDE_DIRS to:
ADDITIONAL_INCLUDE_DIRS = -Ideps/Cross-platform-deps/SpiderMonkey/js/src -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -Isrc/Core/Scripting -Isrc/Core/Materials -Isrc/Core/Entities -Isrc/Core/OXPVerifier -Isrc/Core/Debug
and change the line defining oolite_LIB_DIRS to:
oolite_LIB_DIRS += -Ldeps/Cross-platform-deps/SpiderMonkey/js/src/Linux_All_DBG.OBJ -L/usr/X11R6/lib/
Make oolite with...
. /usr/lib/GNUstep/System/Tools/GNUstep.sh; make