diff --git a/Makefile.am b/Makefile.am
index eef5c32..42e47d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -93,7 +93,7 @@ gnome_dvb_daemon_CPPFLAGS = \
 	-include $(CONFIG_HEADER) \
 	$(NULL)
 
-VALAFLAGS = --target-glib=2.32 --vapidir=$(top_srcdir)/vapi $(own_pkgs) $(vala_pkgs) --basedir $(top_srcdir)
+AM_VALAFLAGS = --target-glib=2.32 --vapidir=$(top_srcdir)/vapi $(own_pkgs) $(vala_pkgs) --basedir $(top_srcdir)
 
 gnome_dvb_daemon_LDFLAGS = \
 	-Wl,--export-dynamic
diff --git a/autogen.sh b/autogen.sh
index 1bc45f7..faf2875 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,5 +6,17 @@ test -z "$srcdir" && srcdir=.
 
 PKG_NAME="gnome-dvb-daemon"
 
-touch ChangeLog
-. gnome-autogen.sh
+(test -f $srcdir/configure.ac) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level $PKG_NAME directory"
+    exit 1
+}
+
+which gnome-autogen.sh || {
+	echo "You need to install gnome-common from the GNOME git"
+	exit 1
+}
+
+REQUIRED_AUTOMAKE_VERSION=1.11
+REQUIRED_AUTOCONF_VERSION=2.63.2
+REQUIRED_INTLTOOL_VERSION=0.40.0 . gnome-autogen.sh "$@"
diff --git a/configure.ac b/configure.ac
index 5206d65..413fc9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,9 +27,6 @@ dnl * i18n
 dnl *********************
 IT_PROG_INTLTOOL([0.40.0])
 
-AM_GNU_GETTEXT_VERSION([0.18.1])
-AM_GNU_GETTEXT([external])
-
 AC_SUBST([GETTEXT_PACKAGE], [gnome-dvb-daemon])
 AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package name])
 
