diff --git a/Makefile.am b/Makefile.am
index 56e70fb2489cc04792a65cb22ca7f679a1e8ac7e..d9422ffb15944b25d0ca5d40f5e9e6b73c3499cd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -330,7 +330,8 @@ lib/_autoconf.py: Makefile stamp-directories
 	  echo "KVM_PATH = '$(KVM_PATH)'"; \
 	  echo "KVM_MIGRATION_PORT = '$(KVM_MIGRATION_PORT)'"; \
 	  echo "SOCAT_PATH = '$(SOCAT_PATH)'"; \
-	  echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)" ; \
+	  echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \
+	  echo "TOOLSDIR = '$(toolsdir)'"; \
 	} > $@
 
 $(REPLACE_VARS_SED): Makefile stamp-directories
diff --git a/lib/constants.py b/lib/constants.py
index 03ed03dd1abca790e1675f91ff511e1e92ab877e..7d3796cfa6d4b45afcd955ae8ab060922d33309f 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -106,6 +106,7 @@ QUEUE_DIR = DATA_DIR + "/queue"
 ETC_HOSTS = "/etc/hosts"
 DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR
 SYSCONFDIR = _autoconf.SYSCONFDIR
+TOOLSDIR = _autoconf.TOOLSDIR
 CONF_DIR = SYSCONFDIR + "/ganeti"
 
 MASTER_SOCKET = SOCKET_DIR + "/ganeti-master"