diff --git a/configure.ac b/configure.ac
index f7c646fc60b8cd05b28c89107f341bfecf265aed..cb841ec612193180c3de1a426ce869dd4407c7c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,8 @@ AC_PREFIX_DEFAULT([`pwd`])
 # Checks for programs.
 AC_PROG_INSTALL
 AC_PROG_LN_S
+AC_CHECK_PROGS([GZIP],[gzip])
+AC_CHECK_PROGS([TAR],[gtar tar])
 
 # Compiler characteristics
 dnl
@@ -85,7 +87,7 @@ dnl set default debugging flags, but allow for user-override
 dnl
 if test -z "${ALBERTA_DEBUG_CFLAGS}"; then
 	if test "$GCC" = yes; then
-		ALBERTA_DEBUG_CFLAGS="-ggdb -fno-inline -fno-builtin"
+		ALBERTA_DEBUG_CFLAGS="-O0 -ggdb -fno-inline -fno-builtin"
 	else
 		ALBERTA_DEBUG_CFLAGS="-g"
 	fi
@@ -247,7 +249,7 @@ dnl NOTA BENE: using NEIGH_IN_EL=1 is probably buggy.], 0)
 # Debugging
 #
 SIMPLE_ENABLE_FLAG([debug], [disable building of ALBERTA libraries with debugging information.], 1)
-
+-
 # building of parametric versions is disabled by default, but can be
 # enabled using --enable-DIMDIMOFWORLD-dimension switches (the macros
 # below do _not_ enable the builds, but simply implement
@@ -263,6 +265,13 @@ ALBERTA_DIMENSION_ENABLE(1,2)
 ALBERTA_DIMENSION_ENABLE(1,3)
 ALBERTA_DIMENSION_ENABLE(2,3)
 
+AC_CONFIG_COMMANDS_POST([
+if ! test "$srcdir" = \. ; then
+	AC_MSG_RESULT([Copying $srcdir/DEMO to current directory])
+	( cd $srcdir && tar cf - DEMO ) | tar xf -
+	rm -rf `find DEMO -name CVS`
+fi])
+
 #
 # flush everything to disk
 #