diff --git a/gthread/tests/Makefile.am b/gthread/tests/Makefile.am
index c5fb653..c4e8850 100644
--- a/gthread/tests/Makefile.am
+++ b/gthread/tests/Makefile.am
@@ -1,6 +1,7 @@
 include $(top_srcdir)/Makefile.decl
 
-INCLUDES = -g -I$(top_srcdir) -I$(top_srcdir)/glib $(GLIB_DEBUG_FLAGS)
+INCLUDES = -g -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_builddir)/glib \
+	$(GLIB_DEBUG_FLAGS)
 
 noinst_PROGRAMS = $(TEST_PROGS)
 progs_ldadd     = $(top_builddir)/glib/libglib-2.0.la \
