diff --git a/mozilla/layout/html/tests/Makefile.in b/mozilla/layout/html/tests/Makefile.in
index e2cbe748189..c94f62fbc21 100644
--- a/mozilla/layout/html/tests/Makefile.in
+++ b/mozilla/layout/html/tests/Makefile.in
@@ -52,7 +52,6 @@ LIBS = \
-lnetcache \
-lsockstuburl \
-lnetwork \
- $(TK_LIBS) \
-lpref \
-lsecfree \
-l$(MOZ_LIB_JS_PREFIX)js \
@@ -67,6 +66,7 @@ LIBS = \
-lexpat \
-lxmltok \
-ljsurl \
+ $(TK_LIBS) \
$(ZLIB_LIBS) \
$(NSPR_LIBS) \
$(NULL)
diff --git a/mozilla/mailnews/local/tests/pop3/Makefile.in b/mozilla/mailnews/local/tests/pop3/Makefile.in
index c7f4d810eb5..6b0d67a6323 100644
--- a/mozilla/mailnews/local/tests/pop3/Makefile.in
+++ b/mozilla/mailnews/local/tests/pop3/Makefile.in
@@ -57,12 +57,12 @@ LIBS = \
-lsecfree \
$(ZLIB_LIBS) \
$(NSPR_LIBS) \
- $(TK_LIBS) \
-lgfx$(MOZ_TOOLKIT) \
-lraptorgfx \
-lgfxps \
-limg \
-lmozutil \
+ $(TK_LIBS) \
$(NULL)
include $(topsrcdir)/config/config.mk