diff --git a/configure.ac b/configure.ac
index 80b38cd..1faa153 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ AC_SUBST(CONFIGURED_GST_PLUGIN_PATH)
 AC_CONFIG_FILES([bin/pitivi], [chmod +x bin/pitivi])
 
 PKG_CHECK_MODULES([cairo], [cairo])
+PKG_CHECK_MODULES([pycairo], [pycairo])
 
 YELP_HELP_INIT
 
diff --git a/pitivi/coptimizations/Makefile.am b/pitivi/coptimizations/Makefile.am
index fb2ad0f..2de5912 100644
--- a/pitivi/coptimizations/Makefile.am
+++ b/pitivi/coptimizations/Makefile.am
@@ -2,7 +2,7 @@ pyexec_LTLIBRARIES = renderer.la
 
 renderer_la_SOURCES = renderer.c
 pyexecdir = $(libdir)/pitivi/python/pitivi/timeline/
-AM_CFLAGS = $(cairo_CFLAGS)
-LIBS = $(cairo_LIBS)
+AM_CFLAGS = $(cairo_CFLAGS) $(pycairo_CFLAGS)
+LIBS = $(cairo_LIBS) $(pycairo_LIBS)
 renderer_la_CFLAGS = $(PYTHON_CFLAGS) $(AM_CFLAGS)
 renderer_la_LDFLAGS = -module -avoid-version -export-symbols-regex initrenderer $(LIBS)
diff --git a/pitivi/coptimizations/renderer.c b/pitivi/coptimizations/renderer.c
index 79f9ffe..67977aa 100644
--- a/pitivi/coptimizations/renderer.c
+++ b/pitivi/coptimizations/renderer.c
@@ -1,7 +1,7 @@
 #include <Python.h>
 #include <stdio.h>
 #include <cairo.h>
-#include </usr/include/pycairo/pycairo.h>
+#include <pycairo.h>
 
 static Pycairo_CAPI_t *Pycairo_CAPI;
 
