Index: offscreen/js/src/configure.in
===================================================================
--- offscreen.orig/js/src/configure.in	2009-12-09 13:38:51.000000000 +0000
+++ offscreen/js/src/configure.in	2009-12-09 14:14:08.000000000 +0000
@@ -858,7 +858,7 @@
 HOST_AR_FLAGS='$(AR_FLAGS)'
 
 MOZ_JS_LIBS='-L$(libdir) -lmozjs'
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(PREFIX)/lib'
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
 
 MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
 
@@ -3824,7 +3824,7 @@
 [  --with-nspr-libs=LIBS   Pass LIBS to LD when linking code that uses NSPR.
                           See --with-nspr-cflags for more details.],
     NSPR_LIBS=$withval)
-$NSPR_LIBS="$NSPR_LIBS -L$(LIBXUL_DIST)/sdk/lib"
+NSPR_LIBS="$NSPR_LIBS -L$(LIBXUL_DIST)/sdk/lib"
 AC_SUBST(NSPR_CFLAGS)
 AC_SUBST(NSPR_LIBS)
 
Index: offscreen/configure.in
===================================================================
--- offscreen.orig/configure.in	2009-12-09 13:38:51.000000000 +0000
+++ offscreen/configure.in	2009-12-09 14:31:33.000000000 +0000
@@ -1041,7 +1041,7 @@
 
 MOZ_JS_LIBS='-L$(LIBXUL_DIST)/bin -lmozjs'
 DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core'
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
 XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom'
 LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
 XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
@@ -8378,7 +8378,7 @@
 if test "$BUILD_CTYPES"; then
   # Run the libffi 'configure' script on platforms that it supports.
   if test -z "$_MSC_VER"; then
-    ac_configure_args="--disable-shared --enable-static --disable-raw-api"
+    ac_configure_args="$ac_configure_args --disable-shared --enable-static --disable-raw-api"
     if test "$MOZ_DEBUG"; then
       ac_configure_args="$ac_configure_args --enable-debug"
     fi
