diff --git a/configure.ac b/configure.ac
index 6aa53219df5608fcfa26ac20d9499f85979f6481..fc7460e6c840d5ff3b05ecd86532792c6c7a4e8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@ dnl with the CFLAGS to the user. Mmmh.
 dnl
 test -z "$CFLAGS" && CFLAGS="       "
 test -z "$FFLAGS" && FFLAGS="       "
-test -z "$CXXFLAGS" && CXXFLAGS="       "
+dnl test -z "$CXXFLAGS" && CXXFLAGS="       "
 dnl
 dnl ****************************************************************************
 dnl
@@ -76,6 +76,14 @@ dnl
 if test `basename $CC` = icc; then
 	GCC=yes
 fi
+dnl
+dnl work around a bug in libtool which pulls in the C++ compiler which
+dnl we do not want at the moment. Remove the next two lines when this
+dnl changes!
+dnl
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
+AC_DEFUN([AC_LIBTOOL_CXX],[:])
+dnl *********************** end CXX hack ***************************************
 AC_PROG_LIBTOOL
 if test `basename $CC` = icc; then
 	GCC=no
@@ -92,19 +100,20 @@ if test -z "${ALBERTA_DEBUG_CFLAGS}"; then
 		ALBERTA_DEBUG_CFLAGS="-g"
 	fi
 fi
-AC_SUBST(ALBERTA_DEBUG_CFLAGS)
+AC_ARG_VAR([ALBERTA_DEBUG_CFLAGS],[Compiler-flags used to create the debug-enabled libraries])
 dnl
 dnl ****************************************************************************
 dnl
 dnl set default optimizing flags, but allow for user-override
 dnl
-if test "${CFLAGS}" = "       "; then
+if test -z "${ALBERTA_OPTIMISE_CFLAGS}"; then
 	if test "$GCC" = yes; then
-		CFLAGS="-O3"
+		ALBERTA_OPTIMISE_CFLAGS="-O3"
 	else
-		CFLAGS="-O"
+		ALBERTA_OPTIMISE_CFLAGS="-O"
 	fi
 fi
+AC_ARG_VAR([ALBERTA_OPTIMISE_CFLAGS],[Compiler-flags used to create the optimised libraries])
 if test "${FFLAGS}" = "       "; then
 	if test "$GCC" = yes; then
 		FFLAGS="-O3"
@@ -112,13 +121,13 @@ if test "${FFLAGS}" = "       "; then
 		FFLAGS="-O"
 	fi
 fi
-if test "${CXXFLAGS}" = "       "; then
-	if test "$GCC" = yes; then
-		CXXFLAGS="-O3"
-	else
-		CXXFLAGS="-O"
-	fi
-fi
+dnl if test "${CXXFLAGS}" = "       "; then
+dnl 	if test "$GCC" = yes; then
+dnl 		CXXFLAGS="-O3"
+dnl 	else
+dnl 		CXXFLAGS="-O"
+dnl 	fi
+dnl fi
 dnl
 dnl ****************************************************************************
 dnl
@@ -142,9 +151,6 @@ AC_CHECK_FUNCS([getopt_long],[],
 	GNUCOMPAT_INCLUDE_PATH='$(top_srcdir)/gnu-compat/'])
 AC_SUBST([GNUCOMPAT_INCLUDE_PATH])
 
-# look for X11 library paths AND sets all necessary flags (X_CFLAGS) e.g.
-AC_PATH_XTRA
-
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([malloc.h unistd.h X11/Xlib.h X11/Xutil.h],,
@@ -184,7 +190,7 @@ esac
 
 dnl
 dnl check for BLAS library. The BLAS may come under different names. We default
-dnl to -lblas, but other possibilities are sunperf, atlas, cpml (Alpha AXP)
+dnl to -lblas, but other possibilities are sunperf, atlas, cxml (Alpha AXP)
 dnl etc etc etc etc etc etc etc etc etc etc ...........................
 dnl
 dnl Let the user decide what it wants (handled by ALBERTA_CHECK_PACKAGE()
@@ -210,7 +216,9 @@ dnl
 ALBERTA_CHECK_PACKAGE(gltools, gltools, , ${X_ALL_LIBS}, glmesh.h,,,optional)
 
 dnl
-dnl some defines to enable building of alberta_movi
+dnl Some defines to enable building of alberta_movi. This is more
+dnl complicated than necessary so that it is easier to build a
+dnl stand-alone version of albert_movi.
 dnl
 ALBERTA_CHECK_PACKAGE(grape, gr, , ${OPENGL_LIB} ${X_ALL_LIBS}, grape.h,,, optional)
 AM_CONDITIONAL(GRAPE, test -n "${GRAPE_LIB}")
@@ -249,7 +257,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
@@ -267,7 +275,7 @@ ALBERTA_DIMENSION_ENABLE(2,3)
 
 AC_CONFIG_COMMANDS_POST([
 if ! test "$srcdir" = \. ; then
-	AC_MSG_RESULT([Copying $srcdir/DEMO to current directory])
+	AC_MSG_CHECKING([Copying $srcdir/DEMO to current directory])
 	( cd $srcdir && tar cf - DEMO ) | tar xf -
 	rm -rf `find DEMO -name CVS`
 fi])