diff --git a/Makefile.am b/Makefile.am
index 2ea43682a01c3146250745ae032abe878b41071a..bd415b2c08b1f6bf67ae9a5074569204037c53a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,8 @@
 #
 #------------------------------------------------------------------------------
 
+ACLOCAL_AMFLAGS = -I m4
+
 SUBDIRS = \
     devices \
     include \
diff --git a/configure.ac b/configure.ac
index f3492fd033031bcbdba60f624c16175f6974c657..5a0b1eb9a1f56cd94c37353f755376c564b7d4f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2])
 AC_PREFIX_DEFAULT([/opt/etherlab])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_SRCDIR([config.h.in])
+AC_CONFIG_MACRO_DIR([m4])
 
 #------------------------------------------------------------------------------
 # Global