diff --git a/common/stdstreams.cc b/common/stdstreams.cc
index 81c6e2c5a26dad17dc21fcf74c81b20eea3221a5..eb0638f39e22977219717eb9c613b7b87255e668 100644
--- a/common/stdstreams.cc
+++ b/common/stdstreams.cc
@@ -2,7 +2,7 @@
 // vi: set et ts=4 sw=2 sts=2:
 // $Id$
 
-
+#include <config.h>
 #include "stdstreams.hh"
 
 namespace Dune {
diff --git a/common/stdstreams.hh b/common/stdstreams.hh
index bc228e87fdb568146061510e9076ce872026a1f3..458d9a3dc128998c30a36f71cd41ad2de8de98d0 100644
--- a/common/stdstreams.hh
+++ b/common/stdstreams.hh
@@ -22,6 +22,10 @@ namespace Dune {
      standard debug streams with level below MINIMAL_DEBUG_LEVEL will
      collapse to doing nothing if output is requested.
 
+     MINIMAL_DEBUG_LEVEL is set to DUNE_MINIMAL_DEBUG_LEVEL, wich is
+     defined in config.h and can be changed by the configure option
+     @code --with-minimal-debug-level=[grave|warn|info|verb|vverb] @endcode
+
      For a Dune-Release this should be set to at least 4 so that only
      important messages are active. Dune-developers may adapt this
      setting to their debugging needs locally
@@ -61,7 +65,7 @@ namespace Dune {
    * If the  level of a stream is bigger than this value
    * it will be activated.
    */
-  static const DebugLevel MINIMAL_DEBUG_LEVEL = 4;
+  static const DebugLevel MINIMAL_DEBUG_LEVEL = DUNE_MINIMAL_DEBUG_LEVEL;
 
   /**
    * @brief The level of the very verbose debug stream.
diff --git a/m4/dune_all.m4 b/m4/dune_all.m4
index 448220a80b3c08848275aead8614b3e32c4bcbb9..fd97f80fcff4f85038d9f057b8f2448ed9cfdffe 100644
--- a/m4/dune_all.m4
+++ b/m4/dune_all.m4
@@ -94,6 +94,7 @@ AC_SUBST(DUNEWEBDIR, $with_duneweb)
 
   dnl check all components
   DUNE_MODULE_DEPENDENCIES($@)
+  AC_REQUIRE([DUNE_SET_MINIMAL_DEBUG_LEVEL])
   AC_REQUIRE([DUNE_PATH_XDR])
   AC_REQUIRE([DUNE_GRID_DIMENSION])
   AC_REQUIRE([DUNE_PATH_GRAPE])
diff --git a/m4/dune_streams.m4 b/m4/dune_streams.m4
new file mode 100644
index 0000000000000000000000000000000000000000..7ef6240b9f938839bf4a6811b89c17d7e9e5483f
--- /dev/null
+++ b/m4/dune_streams.m4
@@ -0,0 +1,44 @@
+# $Id: dune_deprecated.m4 1114 2004-11-17 14:00:06Z christi $
+
+# Set the minimal verbosity level. All stream with a level below will
+# get removed by the optimizer.
+
+AC_DEFUN([DUNE_SET_MINIMAL_DEBUG_LEVEL],[
+
+  # VERY_VERBOSE_DEBUG_LEVEL = 1;
+  # VERBOSE_DEBUG_LEVEL = 2;
+  # INFO_DEBUG_LEVEL = 3;
+  # WARN_DEBUG_LEVEL = 4;
+  # GRAVE_DEBUG_LEVEL = 5;
+
+  AC_ARG_WITH(minimal-debug-level,
+    AC_HELP_STRING([--with-minimal-debug-level=[grave|warn|info|verb|vverb]],
+     [set the MINIMAL_DEBUG_LEVEL. Standard debug streams with level below 
+      MINIMAL_DEBUG_LEVEL will collapse to doing nothing if output is 
+      requested. (default=warn)]
+    )
+  )
+
+  MINIMAL_DEBUG_LEVEL=4
+
+  case "$with_psurface" in
+    grave)
+      MINIMAL_DEBUG_LEVEL=5
+    ;;
+    warn)
+      MINIMAL_DEBUG_LEVEL=4
+    ;;
+    info)
+      MINIMAL_DEBUG_LEVEL=3
+    ;;
+    verb)
+      MINIMAL_DEBUG_LEVEL=2
+    ;;
+    vverb)
+      MINIMAL_DEBUG_LEVEL=1
+    ;;
+  esac
+
+  AC_DEFINE_UNQUOTED([DUNE_MINIMAL_DEBUG_LEVEL], $MINIMAL_DEBUG_LEVEL,
+    [Standard debug streams with a level below will collapse to doing nothing])
+])