diff --git a/Makefile.am b/Makefile.am
index 6037d951746dbdd31bbd49d6abbabb1d486b198f..b59f75612602132997e14e6972ab7a70debb20f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,7 @@ demo-tarball: $(DEMO).tar.gz
 $(DEMO).tar.gz: $(DEMO)
 	$(TAR_PROGRAM) cf - $(DEMO) | $(GZIP_PROGRAM) -9 > $@
 
-demo: $(wildcard $(srcdir)/demo/src/Common/*.[ch]) $(top_builddir)/config.status
+demo: @DEMOSOURCES@ $(top_builddir)/config.status
 	echo $?
 	@case '$?' in \
 	  *config.status*) \
diff --git a/configure.ac b/configure.ac
index b84b5d48a3941efa07c388f1601ad6abec422f0b..ee81113f0e918e05a8d5c3560e6472947f2ff0fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,10 @@ AC_CONFIG_COMMANDS([demo],
     find demo -exec chmod u+rwX \{\} \;
 fi])
 
+# Collect the demo programs
+DEMOSOURCES=`find ${srcdir}/demo/src -name "*.\[ch\]"`
+AC_SUBST(DEMOSOURCES)
+
 #
 # A special command that checks whether alberta_util_inlines.h exists
 # and is identical to alberta_util_inlines.h.in. Then do nothing. If
@@ -66,7 +70,7 @@ fi])
 # ALBERT_DIMENSION_ENABLE/DISABLE() macros
 #
 
-AM_INIT_AUTOMAKE([1.7 dist-bzip2])
+AM_INIT_AUTOMAKE([1.10 dist-bzip2])
 AM_CONFIG_HEADER([config.h])
 
 # change the installation directory. This could surely be done more elegantly...
@@ -544,7 +548,6 @@ if test "z${EXPERIMENTAL}" = "z1"; then
   AC_MSG_RESULT([])
 fi
 
-
 #
 # flush everything to disk
 #