diff --git a/src/Makefile.am b/src/Makefile.am
index 6e2826af1..c24e2c544 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -266,6 +266,7 @@ DISTCLEANFILES += \
 
 hb-features.h: hb-features.h.in $(top_builddir)/config.status
 	$(AM_V_GEN) $(SED) \
+		-e 's/mesondefine HB_HAS_CAIRO/$(HB_HAS_CAIRO_DEF)/' \
 		-e 's/mesondefine HB_HAS_FREETYPE/$(HB_HAS_FREETYPE_DEF)/' \
 		-e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \
 		-e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \
diff --git a/util/Makefile.am b/util/Makefile.am
index c93c3951b..82c14fd65 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -39,6 +39,7 @@ if HAVE_GLIB
 if HAVE_CAIRO
 hb_view_SOURCES = $(HB_VIEW_sources)
 hb_view_LDADD = \
+	$(top_builddir)/src/libharfbuzz-cairo.la \
 	$(LDADD) \
 	$(CAIRO_LIBS) \
 	$(CAIRO_FT_LIBS) \
diff --git a/util/Makefile.sources b/util/Makefile.sources
index e17b4fda1..628de050e 100644
--- a/util/Makefile.sources
+++ b/util/Makefile.sources
@@ -2,8 +2,6 @@ HB_VIEW_sources = \
 	ansi-print.hh \
 	face-options.hh \
 	font-options.hh \
-	hb-cairo-utils.h \
-	hb-cairo-utils.c \
 	hb-view.cc \
 	helper-cairo-ansi.hh \
 	helper-cairo-ft.hh \