diff --git a/Makefile.am b/Makefile.am
index 0a7b92996195b295f37ae017cda013b954da9d32..86126dee019de4abc2ed2c0d33132e0ff15002fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,2 @@
 ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src
+SUBDIRS = libknot src
diff --git a/configure.ac b/configure.ac
index f0a49d4a5965e8333eb43da4579ca047167972c3..b5298df0ddbcd015fb836102826e0e1a4cc347e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,8 +66,7 @@ AC_FUNC_FORK
 AC_FUNC_MMAP
 AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset munmap regcomp select socket sqrt strcasecmp strchr strdup strerror strncasecmp strtol strtoul])
 
-AC_CONFIG_SUBDIRS([libknot])
-
 AC_CONFIG_FILES([Makefile
+                 libknot/Makefile
                  src/Makefile])
 AC_OUTPUT