diff --git a/configure.ac b/configure.ac
index 4489ce5..ef4262d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ AM_MAINTAINER_MODE([enable])
 # to configure or passing V=1 to make
 AM_SILENT_RULES([yes])
 
-AM_PATH_GLIB_2_0(2.27.5,,,gobject)
+AM_PATH_GLIB_2_0(2.27.5,,,[gobject gio])
 if test "$GLIB_LIBS" = ""; then
    AC_MSG_ERROR(GLIB 2.27.5 or later is required to build libcaribou)
 fi
diff --git a/libcaribou/Makefile.am b/libcaribou/Makefile.am
index 0904adf..e50e700 100644
--- a/libcaribou/Makefile.am
+++ b/libcaribou/Makefile.am
@@ -3,6 +3,7 @@ lib_LTLIBRARIES = libcaribou.la
 INCLUDES = \
 	-DG_LOG_DOMAIN=\"caribou\" \
 	-I$(top_srcdir) \
+	$(GLIB_CFLAGS) \
 	$(LIBCARIBOU_CFLAGS)
 
 libcaribou_la_VALAFLAGS = \
@@ -27,6 +28,7 @@ libcaribouinclude_HEADERS = \
 	$(caribou_headers)
 
 libcaribou_la_LIBADD = \
+	$(GLIB_LIBS) \
 	$(LIBCARIBOU_LIBS)
 
 libcaribou_la_SOURCES = \
