Index: trunk/psLib/test/tap/configure.in
===================================================================
--- trunk/psLib/test/tap/configure.in	(revision 8795)
+++ trunk/psLib/test/tap/configure.in	(revision 8841)
@@ -17,4 +17,12 @@
 		;;
 esac
+
+dnl build tests at the same time as the source code
+AC_ARG_ENABLE(tests,
+  [AS_HELP_STRING(--enable-tests,build tests at same time as source)],
+  [AC_MSG_RESULT(test building enabled)
+   tests=true],
+   [tests=false])
+AM_CONDITIONAL(BUILD_TESTS, test x$tests = xtrue)
 
 # Checks for header files
Index: trunk/psLib/test/tap/src/Makefile.am
===================================================================
--- trunk/psLib/test/tap/src/Makefile.am	(revision 8795)
+++ trunk/psLib/test/tap/src/Makefile.am	(revision 8841)
@@ -1,7 +1,13 @@
-check_LTLIBRARIES = libtap.la
+TEST_LTLIBS = libtap.la
 libtap_la_SOURCES = tap.c tap.h
+include_HEADERS = tap.h
+
+if BUILD_TESTS
+lib_LTLIBRARIES = $(TEST_LTLIBS)
+else
+check_LTLIBRARIES = $(TEST_LTLIBS)
+endif
 
 man_MANS = tap.3
 EXTRA_DIST = $(man_MANS)
 
-include_HEADERS = tap.h
