Index: trunk/psLib/test/sys/Makefile.am
===================================================================
--- trunk/psLib/test/sys/Makefile.am	(revision 8718)
+++ trunk/psLib/test/sys/Makefile.am	(revision 8731)
@@ -1,7 +1,13 @@
-AM_CPPFLAGS = $(SRCINC) -I$(top_srcdir)/test/tap/src $(PSLIB_CFLAGS)
+AM_CPPFLAGS = \
+	$(SRCINC) \
+	-I$(top_srcdir)/test/tap/src \
+	-I$(top_srcdir)/test/pstap/src \
+	$(PSLIB_CFLAGS)
 AM_LDFLAGS = \
 	$(top_builddir)/src/libpslib.la  \
 	$(top_builddir)/test/tap/src/libtap.la \
+	$(top_builddir)/test/pstap/src/libpstap.la \
 	$(PSLIB_LIBS)
+
 
 check_PROGRAMS = \
Index: trunk/psLib/test/sys/tap_psStringSubstitute.c
===================================================================
--- trunk/psLib/test/sys/tap_psStringSubstitute.c	(revision 8718)
+++ trunk/psLib/test/sys/tap_psStringSubstitute.c	(revision 8731)
@@ -1,9 +1,10 @@
 #include <stdio.h>
 #include <pslib.h>
+
 #include "tap.h"
+#include "pstap.h"
 
 #define ORIGINAL "This is, a, test case, to check."
 #define CORRECTED "This is a test case to check."
-#define mem() ok(psMemCheckLeaks(psMemGetLastId(), NULL, stdout, false) == 0, "Memory Leaks")
 
 int main (void)
