diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..f8d49355aef0a55373da062b1d11c55d427991df
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,19 @@
+# $Id: Makefile.am 2950 2006-07-31 10:08:24Z mblatt $
+
+# we need the module file to be able to build via dunecontrol
+EXTRA_DIST=dune.module
+
+# don't follow the full GNU-standard
+# need automake >= 1.5
+AUTOMAKE_OPTIONS = foreign 1.5
+
+SUBDIRS = grid doc lib
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dune-grid.pc
+
+# use configured compiler for "make distcheck"
+# doxygen is difficult to convince to build in a special directory...
+DISTCHECK_CONFIGURE_FLAGS = --with-dune-common="$(DUNE_COMMON_ROOT)" CXX="$(CXX)" CC="$(CC)" DOXYGEN="true"
+
+include $(top_srcdir)/am/global-rules
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9d860e5b060b3dd65dbd83de3dfb6c629f8962f9
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# barf on errors
+set -e
+
+usage () {
+    echo "Usage: ./autogen.sh DUNE_COMMON_DIR [options]"
+    echo "  --ac=, --acversion=VERSION   use a specific VERSION of autoconf"
+    echo "  --am=, --amversion=VERSION   use a specific VERSION of automake"
+    echo "  -h,    --help                you already found this :-)"
+}
+
+for OPT in "$@"; do
+    set +e
+    # stolen from configure...
+    # when no option is set, this returns an error code
+    arg=`expr "x$OPT" : 'x[^=]*=\(.*\)'`
+    set -e
+
+    case "$OPT" in
+	--ac=*|--acversion=*)
+			if test "x$arg" == "x"; then
+				usage; 
+				exit 1;
+			fi
+			ACVERSION=$arg
+			;;
+	--am=*|--amversion=*)
+			if test "x$arg" == "x"; then
+				usage; 
+				exit 1;
+			fi
+			AMVERSION=$arg
+			;;
+	-h|--help) usage ; exit 0 ;;
+	*)
+            if test -d "$OPT/m4"; then
+              ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $OPT/m4"
+            fi
+            if test -d "$OPT/am"; then
+              am_dir="$OPT/am"
+            fi
+	    if test -d "$OPT/share/aclocal"; then
+	      ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $OPT/share/aclocal"
+	    fi
+	    if test -d "$OPT/share/dune-common/am"; then
+	      am_dir="$OPT/share/dune-common/am"
+	    fi
+            ;;
+    esac
+done
+
+## report parameters
+if test "x$ACVERSION" != "x"; then
+	echo "Forcing autoconf version �$ACVERSION�"
+	if ! which autoconf$ACVERSION > /dev/null; then
+		echo
+		echo "Error: Could not find autoconf$ACVERSION"
+		echo "       Did you specify a wrong version?"
+		exit 1
+	fi
+fi
+if test "x$AMVERSION" != "x"; then
+	echo "Forcing automake version �$AMVERSION�"
+	if ! which automake$AMVERSION > /dev/null; then
+		echo
+		echo "Error: Could not find automake$AMVERSION"
+		echo "       Did you specify a wrong version?"
+		exit 1
+	fi
+fi
+
+
+## run autotools
+
+echo "--> libtoolize..."
+# this script won't rewrite the files if they already exist. This is a
+# PITA when you want to upgrade libtool, thus I'm setting --force
+libtoolize --force
+
+# prepare everything
+echo "--> aclocal..."
+aclocal$AMVERSION $ACLOCAL_FLAGS
+
+# applications should provide a config.h for now
+echo "--> autoheader..."
+autoheader$ACVERSION
+
+# create a link to the dune-common am directory
+if [ -n "$am_dir" ] && [ -d $am_dir ]; then
+  echo "--> linking dune-common/am..."
+  rm -f am
+  ln -s $am_dir am
+else
+  echo
+  echo "Error: Could not find dune-common/am!"
+  usage
+  exit 1
+fi
+
+# call automake/conf
+echo "--> automake..."
+automake$AMVERSION --add-missing
+
+echo "--> autoconf..."
+autoconf$ACVERSION
+
+## tell the user what to do next
+echo "Now run ./configure to setup dune-subgrid"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000000000000000000000000000000000000..3cd3958727a64bdf5c7c49934350804b475039c0
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,39 @@
+#! /bin/bash
+# Process this file with autoconf to produce a configure script.
+AC_INIT(dune-subgrid, 0.8, dune@dune-project.org)
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([subgrid/subgrid.hh])
+AM_CONFIG_HEADER([config.h])
+
+# check all dune-module stuff
+DUNE_CHECK_ALL_M([dune-common])
+
+# preset variable to path such that #include <dune/...> works
+AC_SUBST(AM_CPPFLAGS, '$(DUNE_CPPFLAGS) -I$(top_srcdir)')
+AC_SUBST(AM_LDFLAGS, '$(DUNE_LDFLAGS) $(DUNE_LIBS)')
+AC_SUBST([LOCAL_LIBS], '$(top_builddir)/grid/libgrid.la')
+
+DUNE_SUMMARY_ALL
+
+# write output
+AC_CONFIG_FILES([Makefile
+    lib/Makefile
+    doc/appl/refelements/Makefile
+    doc/appl/Makefile
+    doc/refinement/Makefile
+    doc/doxygen/Makefile
+    doc/layout/Makefile
+    doc/Makefile
+    grid/Makefile
+    grid/test/Makefile
+    grid/common/test/Makefile
+    grid/common/quadraturerules/Makefile
+    grid/common/refinement/Makefile
+    grid/common/Makefile
+    grid/uggrid/Makefile
+    grid/sgrid/Makefile
+    grid/albertagrid/Makefile
+    grid/yaspgrid/Makefile
+    grid/onedgrid/Makefile
+    dune-subgrid.pc])
+AC_OUTPUT
diff --git a/dune-subgrid.pc.in b/dune-subgrid.pc.in
new file mode 100644
index 0000000000000000000000000000000000000000..16edb6a591ec629f5544a94093a7902211bc0598
--- /dev/null
+++ b/dune-subgrid.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+CXX=@CXX@
+CC=@CC@
+
+Name: @PACKAGE_NAME@
+Version: @VERSION@
+Description: Dune (Distributed and Unified Numerics Environment) subgrid module
+URL: http://dune-project.org/
+Requires: @REQUIRES@
+Libs: -L${libdir} -ldunesubgrid
+Cflags: -I${includedir}