+if CPLUSPLUS
+extra_checks = test_cpp
+else
+extra_checks =
+endif
+
+#check_PROGRAMS = gctest $(extra_checks)
+
+#test.o: $(srcdir)/tests/test.c
+# $(COMPILE) -c $(srcdir)/tests/test.c
+# Using $< in the above seems to fail with the HP/UX on Itanium make.
+#test_cpp.o: $(srcdir)/tests/test_cpp.cc
+# $(CXXCOMPILE) -c $(srcdir)/tests/test_cpp.cc
+
+## FIXME: this is probably the reason why some files from BUILT_SOURCES
+## are included in the distribution
+# gctest_OBJECTS = test.o
+#gctest_SOURCES = tests/test.c
+#gctest_LDADD = ./libgc.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
+#test_cpp_SOURCES = tests/test_cpp.cc
+#test_cpp_LDADD = ./libgc.la ./libgccpp.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
+
+#TESTS = gctest $(extra_checks)
+