Index: orxonox/branches/buerli/Makefile.in
===================================================================
--- orxonox/branches/buerli/Makefile.in	(revision 2706)
+++ orxonox/branches/buerli/Makefile.in	(revision 2707)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,5 +14,4 @@
 
 @SET_MAKE@
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -22,5 +21,4 @@
 pkgincludedir = $(includedir)/@PACKAGE@
 top_builddir = .
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
@@ -36,4 +34,40 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	depcomp install-sh missing mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -90,4 +124,5 @@
 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
+am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 bindir = @bindir@
@@ -103,4 +138,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -111,40 +147,40 @@
 target_alias = @target_alias@
 SUBDIRS = src console gui
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \
-	COPYING ChangeLog INSTALL Makefile.am NEWS aclocal.m4 \
-	config.h.in configure configure.ac depcomp install-sh missing \
-	mkinstalldirs
-DIST_SUBDIRS = $(SUBDIRS)
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  Makefile
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
-
-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
-$(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+
+$(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(srcdir) && $(AUTOCONF)
-
-$(ACLOCAL_M4):  configure.ac 
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 
@@ -158,8 +194,8 @@
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
-
-$(srcdir)/config.h.in:  $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+$(srcdir)/config.h.in:  $(am__configure_deps) 
 	cd $(top_srcdir) && $(AUTOHEADER)
-	touch $(srcdir)/config.h.in
+	rm -f stamp-h1
+	touch $@
 
 distclean-hdr:
@@ -226,12 +262,4 @@
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -242,4 +270,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
@@ -247,12 +276,14 @@
 	tags=; \
 	here=`pwd`; \
-	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
+	  empty_fix=.; \
 	else \
 	  include_option=--include; \
+	  empty_fix=; \
 	fi; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && \
+	    test ! -f $$subdir/TAGS || \
 	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
@@ -264,8 +295,9 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
@@ -290,17 +322,4 @@
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = .
-distdir = $(PACKAGE)-$(VERSION)
-
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
 
 distdir: $(DISTFILES)
@@ -318,5 +337,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -335,11 +354,11 @@
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
+	    test -d "$(distdir)/$$subdir" \
+	    || mkdir "$(distdir)/$$subdir" \
 	    || exit 1; \
 	    (cd $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
+	        top_distdir="../$(top_distdir)" \
+	        distdir="../$(distdir)/$$subdir" \
 	        distdir) \
 	      || exit 1; \
@@ -355,4 +374,21 @@
 	$(am__remove_distdir)
 
+dist-bzip2: distdir
+	$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
 dist dist-all: distdir
 	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -363,6 +399,16 @@
 # tarfile.
 distcheck: dist
-	$(am__remove_distdir)
-	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
 	chmod -R a-w $(distdir); chmod a+w $(distdir)
 	mkdir $(distdir)/_build
@@ -384,5 +430,5 @@
 	  && chmod -R a-w "$$dc_install_base" \
 	  && ({ \
-	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
@@ -391,10 +437,11 @@
 	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
 	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
-	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
 	$(am__remove_distdir)
-	@echo "$(distdir).tar.gz is ready for distribution" | \
-	  sed 'h;s/./=/g;p;x;p;x'
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
 distuninstallcheck:
 	@cd $(distuninstallcheck_dir) \
@@ -420,5 +467,4 @@
 installdirs: installdirs-recursive
 installdirs-am:
-
 install: install-recursive
 install-exec: install-exec-recursive
@@ -458,4 +504,6 @@
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
@@ -494,20 +542,18 @@
 uninstall-info: uninstall-info-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-generic clean-recursive ctags ctags-recursive dist \
-	dist-all dist-gzip distcheck distclean distclean-generic \
-	distclean-hdr distclean-recursive distclean-tags distcleancheck \
-	distdir distuninstallcheck dvi dvi-am dvi-recursive info \
-	info-am info-recursive install install-am install-data \
-	install-data-am install-data-recursive install-exec \
-	install-exec-am install-exec-recursive install-info \
-	install-info-am install-info-recursive install-man \
-	install-recursive install-strip installcheck installcheck-am \
-	installdirs installdirs-am installdirs-recursive \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
-	ps-recursive tags tags-recursive uninstall uninstall-am \
-	uninstall-info-am uninstall-info-recursive uninstall-recursive
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-generic clean-recursive ctags \
+	ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+	dist-tarZ dist-zip distcheck distclean distclean-generic \
+	distclean-hdr distclean-recursive distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
Index: orxonox/branches/buerli/aclocal.m4
===================================================================
--- orxonox/branches/buerli/aclocal.m4	(revision 2706)
+++ orxonox/branches/buerli/aclocal.m4	(revision 2707)
@@ -1,5 +1,5 @@
-# generated automatically by aclocal 1.7.1 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -12,10 +12,145 @@
 # PARTICULAR PURPOSE.
 
-# Do all the work for Automake.                            -*- Autoconf -*-
-
-# This macro actually does too much some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+#                                                        -*- Autoconf -*-
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.8.5])])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 6
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# serial 7						-*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
 
@@ -35,5 +170,4 @@
 # 02111-1307, USA.
 
-# serial 8
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
@@ -44,9 +178,252 @@
 
 
-AC_PREREQ([2.54])
-
-# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
-# the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 11
 
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
@@ -62,6 +439,10 @@
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
 # test to see if srcdir already configured
 if test "`cd $srcdir && pwd`" != "`pwd`" &&
@@ -87,6 +468,6 @@
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
- AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
@@ -105,8 +486,10 @@
 AM_PROG_INSTALL_SH
 AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
 _AM_IF_OPTION([no-dependencies],,
@@ -131,39 +514,253 @@
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
-# Copyright 2002  Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.7.1])])
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	-*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+#  -*- Autoconf -*-
+
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # Keeping the `.' argument allows $(mkdir_p) to be used without
+  # argument.  Indeed, we sometimes output rules like
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.
+  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+  # expensive solution, as it forces Make to start a sub-shell.)
+  mkdir_p='mkdir -p -- .'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
 
 # Helper functions for option handling.                    -*- Autoconf -*-
 
-# Copyright 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -211,5 +808,5 @@
 #
 
-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -271,144 +868,7 @@
 AC_MSG_RESULT(yes)])
 
-#  -*- Autoconf -*-
-
-
-# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-# Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-
-# Copyright 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
 # AM_PROG_INSTALL_STRIP
 
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -447,339 +907,2 @@
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# serial 4						-*- Autoconf -*-
-
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    echo '#include "conftest.h"' > conftest.c
-    echo 'int i;' > conftest.h
-    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-	continue
-      else
-	break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=conftest.c object=conftest.o \
-       depfile=conftest.Po tmpdepfile=conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
-       grep conftest.h conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      am_cv_$1_dependencies_compiler_type=$depmode
-      break
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
-  DEPDIR=.deps
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST([DEPDIR])
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking Speeds up one-time builds
-  --enable-dependency-tracking  Do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking.   -*- Autoconf -*-
-
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
-  # Extract the definition of DEP_FILES from the Makefile without
-  # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
-  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
-  # We invoke sed twice because it is the simplest approach to
-  # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
-    /^DEP_FILES = .*\\\\$/ {
-      s/^DEP_FILES = //
-      :loop
-	s/\\\\$//
-	p
-	n
-	/\\\\$/ b loop
-      p
-    }
-    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Check to see how 'make' treats includes.	-*- Autoconf -*-
-
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-doit:
-	@echo done
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
-rm -f confinc confmf
-])
-
-# AM_CONDITIONAL                                              -*- Autoconf -*-
-
-# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 5
-
-AC_PREREQ(2.52)
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
-
Index: orxonox/branches/buerli/config.h.in
===================================================================
--- orxonox/branches/buerli/config.h.in	(revision 2706)
+++ orxonox/branches/buerli/config.h.in	(revision 2707)
@@ -3,7 +3,4 @@
 /* Define to 1 if you have the `bzero' function. */
 #undef HAVE_BZERO
-
-/* Define to 1 if you have the <GL/glut.h> header file. */
-#undef HAVE_GL_GLUT_H
 
 /* Define to 1 if you have the <GL/glu.h> header file. */
Index: orxonox/branches/buerli/configure
===================================================================
--- orxonox/branches/buerli/configure	(revision 2706)
+++ orxonox/branches/buerli/configure	(revision 2707)
@@ -312,5 +312,5 @@
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MSBITFIELDS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP MSBITFIELDS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -858,6 +858,6 @@
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --disable-dependency-tracking Speeds up one-time builds
-  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
 
 Some influential environment variables:
@@ -1321,5 +1321,5 @@
 
 
-am__api_version="1.7"
+am__api_version="1.8"
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -1484,5 +1484,4 @@
 rm conftest.sed
 
-
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1496,4 +1495,29 @@
   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # Keeping the `.' argument allows $(mkdir_p) to be used without
+  # argument.  Indeed, we sometimes output rules like
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.
+  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+  # expensive solution, as it forces Make to start a sub-shell.)
+  mkdir_p='mkdir -p -- .'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
 fi
 
@@ -1576,5 +1600,5 @@
 rmdir .tst 2>/dev/null
 
- # test to see if srcdir already configured
+# test to see if srcdir already configured
 if test "`cd $srcdir && pwd`" != "`pwd`" &&
    test -f $srcdir/config.status; then
@@ -1723,21 +1747,6 @@
 
 
+
           ac_config_headers="$ac_config_headers config.h"
-
-
-echo "$as_me:$LINENO: checking for mingw" >&5
-echo $ECHO_N "checking for mingw... $ECHO_C" >&6
-case `uname` in
-  *MINGW*)
-    mingw="yes"
-    MSBITFIELDS="-mms-bitfields"
-    MWINDOWS="-mwindows"
-    ;;
-  *)
-    mingw="no"
-    ;;
-esac
-echo "$as_me:$LINENO: result: $mingw" >&5
-echo "${ECHO_T}$mingw" >&6
 
 
@@ -2406,5 +2415,7 @@
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -2434,7 +2445,12 @@
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
         am_cv_CXX_dependencies_compiler_type=$depmode
         break
@@ -3237,5 +3253,7 @@
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      : > sub/conftst$i.h
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
@@ -3265,7 +3283,12 @@
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
-      # (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored.
-      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
         am_cv_CC_dependencies_compiler_type=$depmode
         break
@@ -3299,7 +3322,6 @@
 
 
-# Checks for libraries.
-
-#  cheking for libGL
+
+# checking gl header (has to be here because of a Linux error)
 
 ac_ext=c
@@ -3946,12 +3968,30 @@
 
 
-#   checking for Unix GL
-echo "$as_me:$LINENO: checking for main in -lGL" >&5
-echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
-if test "${ac_cv_lib_GL_main+set}" = set; then
+
+
+### CHECKING FOR SYSTEM ###
+
+echo "$as_me:$LINENO: checking for System" >&5
+echo $ECHO_N "checking for System... $ECHO_C" >&6
+case `uname` in
+### WINDOWS ###
+  *MINGW*)
+echo "mingw-WINDOWS detected"
+
+    mingw="yes"
+    MSBITFIELDS="-mms-bitfields"
+    MWINDOWS="-mwindows"
+
+# checking gl header
+	#done before loop
+
+#   checking for Windows openGl library
+    echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
+echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
+if test "${ac_cv_lib_opengl32_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lGL  $LIBS"
+LIBS="-lopengl32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3992,71 +4032,4 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_GL_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_GL_main=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
-echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
-if test $ac_cv_lib_GL_main = yes; then
-  FOUND_GL=yes
-fi
-
-if test "$FOUND_GL" = "yes" ; then
-    LIBS="$LIBS -lGL"
-    #   checking for Windows openGl library
-else
-    echo "We did not find the Linux opengl Library. Checking for Windows Library"
-    echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
-echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
-if test "${ac_cv_lib_opengl32_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lopengl32  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
   ac_cv_lib_opengl32_main=yes
 else
@@ -4080,5 +4053,4 @@
     if test "$FOUND_opengl32" = "yes" ; then
 	LIBS="$LIBS -lopengl32"
-
     else
 	 echo "------------------"
@@ -4088,7 +4060,6 @@
 	 exit -1
     fi
-fi
-
-#  cheking for libGLU
+
+# cheking for GLU-header
 
 for ac_header in GL/glu.h
@@ -4246,77 +4217,5 @@
 
 
-echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
-echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
-if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lGLU  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char gluProject ();
-int
-main ()
-{
-gluProject ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_GLU_gluProject=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_GLU_gluProject=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
-echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
-if test $ac_cv_lib_GLU_gluProject = yes; then
-  FOUND_GLU=yes
-fi
-
-if test "$FOUND_GLU" = "yes" ; then
-    LIBS="$LIBS -lGLU"
-    #   checking for Windows GLU32 library
-else
-    echo "We did not find the Linux GLU Library. Checking for Windows Library"
+# checking for libGLU
     echo "$as_me:$LINENO: checking for main in -lglu32" >&5
 echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6
@@ -4383,6 +4282,5 @@
     if test "$FOUND_glu32" = "yes" ; then
 	LIBS="$LIBS -lGLU32"
-
-	else
+    else
 	 echo "------------------"
 	 echo "GLU library not found."
@@ -4391,15 +4289,14 @@
 	 exit -1
     fi
-fi
-
-# FIXME: Replace `main' with a function in `-lOSMesa':
-
-echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
-echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
-if test "${ac_cv_lib_OSMesa_main+set}" = set; then
+
+
+# checking for mingw32
+    echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
+echo $ECHO_N "checking for main in -lmingw32... $ECHO_C" >&6
+if test "${ac_cv_lib_mingw32_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lOSMesa  $LIBS"
+LIBS="-lmingw32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4440,10 +4337,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_OSMesa_main=yes
+  ac_cv_lib_mingw32_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_OSMesa_main=no
+ac_cv_lib_mingw32_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4451,157 +4348,16 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5
-echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
-if test $ac_cv_lib_OSMesa_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBOSMESA 1
-_ACEOF
-
-  LIBS="-lOSMesa $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lX11':
-
-echo "$as_me:$LINENO: checking for main in -lX11" >&5
-echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
-if test "${ac_cv_lib_X11_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lX11  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_X11_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_X11_main=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
-echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
-if test $ac_cv_lib_X11_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBX11 1
-_ACEOF
-
-  LIBS="-lX11 $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lXt':
-
-echo "$as_me:$LINENO: checking for main in -lXt" >&5
-echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
-if test "${ac_cv_lib_Xt_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_Xt_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_Xt_main=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
-echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
-if test $ac_cv_lib_Xt_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBXT 1
-_ACEOF
-
-  LIBS="-lXt $LIBS"
-
-fi
-
-
-#  cheking for libglut32
-
-for ac_header in GL/glut.h
+echo "$as_me:$LINENO: result: $ac_cv_lib_mingw32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_mingw32_main" >&6
+if test $ac_cv_lib_mingw32_main = yes; then
+  FOUND_mingw32=yes
+fi
+
+    if test $FOUND_mingw32 = "yes"; then
+	LIBS="$LIBS -lmingw32"
+    fi
+# checking for SDL-headers
+
+for ac_header in SDL/SDL.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4749,6 +4505,6 @@
 
 else
-  { { echo "$as_me:$LINENO: error: cannot find glut headers" >&5
-echo "$as_me: error: cannot find glut headers" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
+echo "$as_me: error: cannot find SDL headers" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -4756,84 +4512,13 @@
 done
 
-echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
-echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6
-if test "${ac_cv_lib_glut_glutInit+set}" = set; then
+
+#checking for libSDL
+    echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
+echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
+if test "${ac_cv_lib_sdlmain_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglut  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char glutInit ();
-int
-main ()
-{
-glutInit ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_glut_glutInit=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_glut_glutInit=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5
-echo "${ECHO_T}$ac_cv_lib_glut_glutInit" >&6
-if test $ac_cv_lib_glut_glutInit = yes; then
-  FOUND_glut=yes
-fi
-
-if test "$FOUND_glut" = "yes" ; then
-    LIBS="$LIBS -lglut"
-    #   checking for Windows glut32 library
-else
-    echo "We did not find the Linux glut Library. Checking for Windows Library"
-    echo "$as_me:$LINENO: checking for main in -lglut32" >&5
-echo $ECHO_N "checking for main in -lglut32... $ECHO_C" >&6
-if test "${ac_cv_lib_glut32_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglut32  $LIBS"
+LIBS="-lsdlmain  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4874,10 +4559,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_glut32_main=yes
+  ac_cv_lib_sdlmain_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_glut32_main=no
+ac_cv_lib_sdlmain_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4885,30 +4570,26 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_glut32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_glut32_main" >&6
-if test $ac_cv_lib_glut32_main = yes; then
-  FOUND_glut32=yes
-fi
-
-    if test "$FOUND_glut32" = "yes" ; then
-	LIBS="$LIBS -lglut32"
+echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
+echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
+if test $ac_cv_lib_sdlmain_main = yes; then
+  FOUND_sdlmain=yes
+fi
+
+    if test "$FOUND_sdlmain" = "yes" ; then
+	LIBS="$LIBS -lsdlmain"
     else
 	 echo "------------------"
-	 echo "glut library not found."
-	 echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
+	 echo "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
 	 echo "------------------"
-	 exit -1
+	 exit 1
     fi
-fi
-
-## mingw CHECK
-if test $mingw = yes ; then
-	echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
-echo $ECHO_N "checking for main in -lmingw32... $ECHO_C" >&6
-if test "${ac_cv_lib_mingw32_main+set}" = set; then
+    echo "$as_me:$LINENO: checking for main in -lsdl" >&5
+echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
+if test "${ac_cv_lib_sdl_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmingw32  $LIBS"
+LIBS="-lsdl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4949,10 +4630,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_mingw32_main=yes
+  ac_cv_lib_sdl_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mingw32_main=no
+ac_cv_lib_sdl_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4960,20 +4641,107 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mingw32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_mingw32_main" >&6
-if test $ac_cv_lib_mingw32_main = yes; then
-  FOUND_mingw32=yes
-fi
-
-	if test $FOUND_mingw32 = "yes"; then
-		LIBS="$LIBS -lmingw32"
-	fi
-fi
-
-## SDL CHECK
-
-#checking for SDL libs
-
-for ac_header in SDL/SDL.h
+echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
+if test $ac_cv_lib_sdl_main = yes; then
+  FOUND_sdl=yes
+fi
+
+    if test "$FOUND_sdl" = "yes" ; then
+    	LIBS="$LIBS -lsdl"
+    else
+	 echo "------------------"
+	 echo "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+
+    ;;
+
+### LINUX ###
+ *Linux*)
+echo "Linux detected"
+
+ Linux="yes"
+
+# checking gl header
+	#has been done befor linux-check
+
+#  checking for Unix GL
+   echo "$as_me:$LINENO: checking for main in -lGL" >&5
+echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
+if test "${ac_cv_lib_GL_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_GL_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_GL_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
+if test $ac_cv_lib_GL_main = yes; then
+  FOUND_GL=yes
+fi
+
+   if test "$FOUND_GL" = "yes" ; then
+     LIBS="$LIBS -lGL"
+   else
+	 echo "------------------"
+	 echo "opengl not found."
+	 echo "please install the opengl package which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+   fi
+
+# cheking for GLU-header
+
+for ac_header in GL/glu.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5121,4 +4889,238 @@
 
 else
+  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
+echo "$as_me: error: cannot find opengl headers" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+done
+
+
+    echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
+echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
+if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGLU  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gluProject ();
+int
+main ()
+{
+gluProject ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_GLU_gluProject=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_GLU_gluProject=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
+echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
+if test $ac_cv_lib_GLU_gluProject = yes; then
+  FOUND_GLU=yes
+fi
+
+    if test "$FOUND_GLU" = "yes" ; then
+      LIBS="$LIBS -lGLU"
+    else
+	 echo "------------------"
+	 echo "GLU library not found."
+	 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+
+# checking for SDL-headers
+
+for ac_header in SDL/SDL.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------- ##
+## Report this to orxonox-dev@mail.datacore.ch ##
+## ------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
 echo "$as_me: error: cannot find SDL headers" >&2;}
@@ -5128,6 +5130,6 @@
 done
 
-if test $mingw = no ; then
-	echo "$as_me:$LINENO: checking for main in -lSDL" >&5
+
+    echo "$as_me:$LINENO: checking for main in -lSDL" >&5
 echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
 if test "${ac_cv_lib_SDL_main+set}" = set; then
@@ -5191,16 +5193,34 @@
 fi
 
-	if test "$FOUND_SDL" = "yes" ; then
-    		LIBS="$LIBS -lSDL"
-	fi
-#   checking for Windows sdl library
-else
-    echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
-echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
-if test "${ac_cv_lib_sdlmain_main+set}" = set; then
+     if test "$FOUND_SDL" = "yes" ; then
+    	LIBS="$LIBS -lSDL"
+     else
+	 echo "------------------"
+	 echo "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit -1
+     fi
+
+    ;;
+  *)
+    mingw="no"
+    ;;
+esac
+echo "$as_me:$LINENO: result: $mingw" >&5
+echo "${ECHO_T}$mingw" >&6
+
+
+#### Checking for LIBraries.
+
+# FIXME: Replace `main' with a function in `-lOSMesa':
+
+echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
+echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
+if test "${ac_cv_lib_OSMesa_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsdlmain  $LIBS"
+LIBS="-lOSMesa  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5241,10 +5261,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_sdlmain_main=yes
+  ac_cv_lib_OSMesa_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_sdlmain_main=no
+ac_cv_lib_OSMesa_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5252,20 +5272,24 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
-echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
-if test $ac_cv_lib_sdlmain_main = yes; then
-  FOUND_sdlmain=yes
-fi
-
-    if test "$FOUND_sdlmain" = "yes" ; then
-	LIBS="$LIBS -lsdlmain"
-    fi
-	echo "$as_me:$LINENO: checking for main in -lsdl" >&5
-echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
-if test "${ac_cv_lib_sdl_main+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5
+echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
+if test $ac_cv_lib_OSMesa_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBOSMESA 1
+_ACEOF
+
+  LIBS="-lOSMesa $LIBS"
+
+fi
+
+# FIXME: Replace `main' with a function in `-lX11':
+
+echo "$as_me:$LINENO: checking for main in -lX11" >&5
+echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
+if test "${ac_cv_lib_X11_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsdl  $LIBS"
+LIBS="-lX11  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5306,10 +5330,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_sdl_main=yes
+  ac_cv_lib_X11_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_sdl_main=no
+ac_cv_lib_X11_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5317,14 +5341,85 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
-echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
-if test $ac_cv_lib_sdl_main = yes; then
-  FOUND_sdl=yes
-fi
-
-	if test "$FOUND_sdl" = "yes" ; then
-    		LIBS="$LIBS -lsdl"
-	fi
-fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
+echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
+if test $ac_cv_lib_X11_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBX11 1
+_ACEOF
+
+  LIBS="-lX11 $LIBS"
+
+fi
+
+# FIXME: Replace `main' with a function in `-lXt':
+
+echo "$as_me:$LINENO: checking for main in -lXt" >&5
+echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
+if test "${ac_cv_lib_Xt_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_Xt_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xt_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
+echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
+if test $ac_cv_lib_Xt_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXT 1
+_ACEOF
+
+  LIBS="-lXt $LIBS"
+
+fi
+
+
 
 #checking for pthread libs
@@ -6951,8 +7046,8 @@
 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
 s,@AWK@,$AWK,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
 s,@am__leading_dot@,$am__leading_dot,;t t
-s,@MSBITFIELDS@,$MSBITFIELDS,;t t
 s,@CXX@,$CXX,;t t
 s,@CXXFLAGS@,$CXXFLAGS,;t t
@@ -6979,4 +7074,5 @@
 s,@CPP@,$CPP,;t t
 s,@EGREP@,$EGREP,;t t
+s,@MSBITFIELDS@,$MSBITFIELDS,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
@@ -7606,12 +7702,12 @@
   # Extract the definition of DEP_FILES from the Makefile without
   # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
   # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  U=`sed -n 's/^U = //p' < "$mf"`
   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
   # We invoke sed twice because it is the simplest approach to
   # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
+  for file in `sed -n '
     /^DEP_FILES = .*\\\\$/ {
       s/^DEP_FILES = //
Index: orxonox/branches/buerli/configure.ac
===================================================================
--- orxonox/branches/buerli/configure.ac	(revision 2706)
+++ orxonox/branches/buerli/configure.ac	(revision 2707)
@@ -5,13 +5,148 @@
 AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
 AM_INIT_AUTOMAKE
+
 AC_CONFIG_SRCDIR([.])
 AC_CONFIG_HEADER([config.h])
 
-AC_MSG_CHECKING([for mingw])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+
+
+# checking gl header (has to be here because of a Linux error)
+   AC_CHECK_HEADERS(GL/gl.h ,,
+      [AC_MSG_ERROR([cannot find opengl headers]) ])
+
+
+
+### CHECKING FOR SYSTEM ###
+
+AC_MSG_CHECKING([for System])
 case `uname` in
+### WINDOWS ###
   *MINGW*)
+echo "mingw-WINDOWS detected"
+
     mingw="yes"
     MSBITFIELDS="-mms-bitfields"
     MWINDOWS="-mwindows"
+
+# checking gl header
+	#done before loop
+
+#   checking for Windows openGl library
+    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
+    if test "$FOUND_opengl32" = "yes" ; then
+	LIBS="$LIBS -lopengl32"
+    else
+	 echo "------------------"
+	 echo "opengl not found."
+	 echo "please install the opengl package which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+
+# cheking for GLU-header
+    AC_CHECK_HEADERS(GL/glu.h ,,
+      [AC_MSG_ERROR([cannot find opengl headers]) ])
+
+# checking for libGLU
+    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
+    if test "$FOUND_glu32" = "yes" ; then
+	LIBS="$LIBS -lGLU32"
+    else
+	 echo "------------------"
+	 echo "GLU library not found."
+	 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+
+
+# checking for mingw32
+    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
+    if test $FOUND_mingw32 = "yes"; then 
+	LIBS="$LIBS -lmingw32"
+    fi
+# checking for SDL-headers
+    AC_CHECK_HEADERS(SDL/SDL.h ,,
+      [AC_MSG_ERROR([cannot find SDL headers]) ])
+
+#checking for libSDL
+    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
+    if test "$FOUND_sdlmain" = "yes" ; then
+	LIBS="$LIBS -lsdlmain"
+    else
+	 echo "------------------"
+	 echo "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit 1
+    fi
+    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
+    if test "$FOUND_sdl" = "yes" ; then
+    	LIBS="$LIBS -lsdl"
+    else
+	 echo "------------------"
+	 echo "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+
+    ;;
+
+### LINUX ###
+ *Linux*)
+echo "Linux detected"
+
+ Linux="yes"
+
+# checking gl header
+	#has been done befor linux-check
+
+#  checking for Unix GL
+   AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
+   if test "$FOUND_GL" = "yes" ; then
+     LIBS="$LIBS -lGL"
+   else
+	 echo "------------------"
+	 echo "opengl not found."
+	 echo "please install the opengl package which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+   fi
+
+# cheking for GLU-header
+    AC_CHECK_HEADERS(GL/glu.h ,,
+      [AC_MSG_ERROR([cannot find opengl headers]) ])
+
+    AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
+    if test "$FOUND_GLU" = "yes" ; then
+      LIBS="$LIBS -lGLU"
+    else
+	 echo "------------------"
+	 echo "GLU library not found."
+	 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi   
+
+# checking for SDL-headers
+    AC_CHECK_HEADERS(SDL/SDL.h ,,
+      [AC_MSG_ERROR([cannot find SDL headers]) ])
+
+    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
+     if test "$FOUND_SDL" = "yes" ; then
+    	LIBS="$LIBS -lSDL"
+     else
+	 echo "------------------"
+	 echo "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit -1
+     fi   
+	
     ;;
   *)
@@ -22,57 +157,5 @@
 AC_SUBST(MSBITFIELDS)
 
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_CC
-
-# Checks for libraries.
-
-#  cheking for libGL
-AC_CHECK_HEADERS(GL/gl.h ,,
-      [AC_MSG_ERROR([cannot find opengl headers]) ])
-
-#   checking for Unix GL
-AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
-if test "$FOUND_GL" = "yes" ; then
-    LIBS="$LIBS -lGL"
-    #   checking for Windows openGl library
-else
-    echo "We did not find the Linux opengl Library. Checking for Windows Library"
-    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
-    if test "$FOUND_opengl32" = "yes" ; then
-	LIBS="$LIBS -lopengl32"
-	
-    else
-	 echo "------------------"
-	 echo "opengl not found."
-	 echo "please install the opengl package which can be found at http://www.opengl.org"
-	 echo "------------------"
-	 exit -1
-    fi
-fi
-
-#  cheking for libGLU
-AC_CHECK_HEADERS(GL/glu.h ,,
-      [AC_MSG_ERROR([cannot find opengl headers]) ])
-
-AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
-if test "$FOUND_GLU" = "yes" ; then
-    LIBS="$LIBS -lGLU"
-    #   checking for Windows GLU32 library
-else
-    echo "We did not find the Linux GLU Library. Checking for Windows Library"
-    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
-    if test "$FOUND_glu32" = "yes" ; then
-	LIBS="$LIBS -lGLU32"
-	
-	else
-	 echo "------------------"
-	 echo "GLU library not found."
-	 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
-	 echo "------------------"
-	 exit -1
-    fi
-fi
+#### Checking for LIBraries.
 
 # FIXME: Replace `main' with a function in `-lOSMesa':
@@ -83,54 +166,4 @@
 AC_CHECK_LIB([Xt], [main])
 
-#  cheking for libglut32
-AC_CHECK_HEADERS(GL/glut.h ,,
-      [AC_MSG_ERROR([cannot find glut headers]) ])
-AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes)
-if test "$FOUND_glut" = "yes" ; then
-    LIBS="$LIBS -lglut"
-    #   checking for Windows glut32 library
-else
-    echo "We did not find the Linux glut Library. Checking for Windows Library"
-    AC_CHECK_LIB([glut32], [main], FOUND_glut32=yes)
-    if test "$FOUND_glut32" = "yes" ; then
-	LIBS="$LIBS -lglut32"
-    else
-	 echo "------------------"
-	 echo "glut library not found."
-	 echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
-	 echo "------------------"
-	 exit -1
-    fi
-fi
-
-## mingw CHECK
-if test $mingw = yes ; then
-	AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
-	if test $FOUND_mingw32 = "yes"; then 
-		LIBS="$LIBS -lmingw32"
-	fi
-fi
-
-## SDL CHECK
-
-#checking for SDL libs
-AC_CHECK_HEADERS(SDL/SDL.h ,,
-      [AC_MSG_ERROR([cannot find SDL headers]) ])
-if test $mingw = no ; then
-	AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
-	if test "$FOUND_SDL" = "yes" ; then
-    		LIBS="$LIBS -lSDL"
-	fi
-#   checking for Windows sdl library
-else
-    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
-    if test "$FOUND_sdlmain" = "yes" ; then
-	LIBS="$LIBS -lsdlmain"
-    fi
-	AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
-	if test "$FOUND_sdl" = "yes" ; then
-    		LIBS="$LIBS -lsdl"
-	fi
-fi
 
 #checking for pthread libs
Index: orxonox/branches/buerli/console/Makefile.in
===================================================================
--- orxonox/branches/buerli/console/Makefile.in	(revision 2706)
+++ orxonox/branches/buerli/console/Makefile.in	(revision 2707)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.7.1 from Makefile.am.
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,4 +14,7 @@
 
 @SET_MAKE@
+
+
+SOURCES = $(console_SOURCES)
 
 srcdir = @srcdir@
@@ -22,5 +25,4 @@
 pkgincludedir = $(includedir)/@PACKAGE@
 top_builddir = ..
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
@@ -36,4 +38,39 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+bin_PROGRAMS = console$(EXEEXT)
+subdir = console
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_console_OBJECTS = orxonox_console.$(OBJEXT) \
+	orxonox_console_entry.$(OBJEXT) orxonox_console_log.$(OBJEXT)
+console_OBJECTS = $(am_console_OBJECTS)
+console_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_console.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_console_entry.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_console_log.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(console_SOURCES)
+DIST_SOURCES = $(console_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -90,4 +127,5 @@
 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
+am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 bindir = @bindir@
@@ -103,4 +141,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -111,53 +150,42 @@
 target_alias = @target_alias@
 AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
-
-#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
-bin_PROGRAMS = console
 console_SOURCES = orxonox_console.cc orxonox_console_entry.cc orxonox_console_log.cc
 noinst_HEADERS = orxonox_console.h orxonox_console_entry.h orxonox_console_log.h
-subdir = console
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = console$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am_console_OBJECTS = orxonox_console.$(OBJEXT) \
-	orxonox_console_entry.$(OBJEXT) orxonox_console_log.$(OBJEXT)
-console_OBJECTS = $(am_console_OBJECTS)
-console_LDADD = $(LDADD)
-console_DEPENDENCIES =
-console_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_console.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_console_entry.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_console_log.Po
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-	-o $@
-DIST_SOURCES = $(console_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
-SOURCES = $(console_SOURCES)
-
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .cc .o .obj
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  console/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  console/Makefile
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
@@ -165,6 +193,6 @@
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
@@ -174,6 +202,6 @@
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
 	done
 
@@ -185,5 +213,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -194,37 +222,20 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_console_log.Po@am__quote@
 
-distclean-depend:
-	-rm -rf ./$(DEPDIR)
-
 .cc.o:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@	fi
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
-@am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@	fi
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 uninstall-info-am:
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -236,4 +247,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -247,8 +259,9 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -273,8 +286,4 @@
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
 distdir: $(DISTFILES)
@@ -290,5 +299,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -308,8 +317,8 @@
 check: check-am
 all-am: Makefile $(PROGRAMS) $(HEADERS)
-
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
-
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
@@ -323,5 +332,5 @@
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
 	  `test -z '$(STRIP)' || \
 	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
@@ -331,5 +340,5 @@
 
 distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
@@ -341,7 +350,8 @@
 
 distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
-	distclean-generic distclean-tags
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
 dvi: dvi-am
@@ -349,4 +359,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -364,5 +376,6 @@
 
 maintainer-clean: maintainer-clean-am
-
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -383,6 +396,6 @@
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic ctags distclean distclean-compile \
-	distclean-depend distclean-generic distclean-tags distdir dvi \
-	dvi-am info info-am install install-am install-binPROGRAMS \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
 	install-data install-data-am install-exec install-exec-am \
 	install-info install-info-am install-man install-strip \
Index: orxonox/branches/buerli/gui/Makefile.am
===================================================================
--- orxonox/branches/buerli/gui/Makefile.am	(revision 2706)
+++ orxonox/branches/buerli/gui/Makefile.am	(revision 2707)
@@ -3,7 +3,7 @@
 
 bin_PROGRAMS=gui
-gui_SOURCES=orxonox_gui.cc orxonox_gui_video.cc	orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc
+gui_SOURCES=orxonox_gui.cc orxonox_gui_video.cc	orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc orxonox_gui_keys.cc
 
-noinst_HEADERS=orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h
+noinst_HEADERS=orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h orxonox_gui_keys.h
 
 #  uncomment the following if bencoder requires the math library
Index: orxonox/branches/buerli/gui/Makefile.in
===================================================================
--- orxonox/branches/buerli/gui/Makefile.in	(revision 2706)
+++ orxonox/branches/buerli/gui/Makefile.in	(revision 2707)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.7.1 from Makefile.am.
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,4 +14,7 @@
 
 @SET_MAKE@
+
+
+SOURCES = $(gui_SOURCES)
 
 srcdir = @srcdir@
@@ -22,5 +25,4 @@
 pkgincludedir = $(includedir)/@PACKAGE@
 top_builddir = ..
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
@@ -36,4 +38,45 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+bin_PROGRAMS = gui$(EXEEXT)
+subdir = gui
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
+	orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
+	orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT) \
+	orxonox_gui_keys.$(OBJEXT)
+gui_OBJECTS = $(am_gui_OBJECTS)
+gui_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_audio.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_banner.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_exec.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_flags.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_keys.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_video.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(gui_SOURCES)
+DIST_SOURCES = $(gui_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -90,4 +133,5 @@
 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
+am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 bindir = @bindir@
@@ -103,4 +147,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -111,10 +156,6 @@
 target_alias = @target_alias@
 AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
-
-#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
-bin_PROGRAMS = gui
-gui_SOURCES = orxonox_gui.cc orxonox_gui_video.cc	orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc
-
-noinst_HEADERS = orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h
+gui_SOURCES = orxonox_gui.cc orxonox_gui_video.cc	orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc orxonox_gui_keys.cc
+noinst_HEADERS = orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h orxonox_gui_keys.h
 
 #  uncomment the following if bencoder requires the math library
@@ -127,52 +168,40 @@
 #TESTS=chk
 EXTRA_DIST = rc banner.xpm
-subdir = gui
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = gui$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
-	orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
-	orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT)
-gui_OBJECTS = $(am_gui_OBJECTS)
-gui_LDADD = $(LDADD)
-gui_DEPENDENCIES =
-gui_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_audio.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_banner.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_exec.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_flags.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox_gui_video.Po
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-	-o $@
-DIST_SOURCES = $(gui_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
-SOURCES = $(gui_SOURCES)
-
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .cc .o .obj
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  gui/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  gui/Makefile
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
@@ -180,6 +209,6 @@
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
@@ -189,6 +218,6 @@
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
 	done
 
@@ -200,5 +229,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -210,39 +239,23 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_keys.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
 
-distclean-depend:
-	-rm -rf ./$(DEPDIR)
-
 .cc.o:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@	fi
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
-@am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@	fi
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 uninstall-info-am:
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -254,4 +267,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -265,8 +279,9 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -291,8 +306,4 @@
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
 distdir: $(DISTFILES)
@@ -308,5 +319,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -326,8 +337,8 @@
 check: check-am
 all-am: Makefile $(PROGRAMS) $(HEADERS)
-
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
-
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
@@ -341,5 +352,5 @@
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
 	  `test -z '$(STRIP)' || \
 	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
@@ -349,5 +360,5 @@
 
 distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
@@ -359,7 +370,8 @@
 
 distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
-	distclean-generic distclean-tags
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
 dvi: dvi-am
@@ -367,4 +379,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -382,5 +396,6 @@
 
 maintainer-clean: maintainer-clean-am
-
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -401,6 +416,6 @@
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic ctags distclean distclean-compile \
-	distclean-depend distclean-generic distclean-tags distdir dvi \
-	dvi-am info info-am install install-am install-binPROGRAMS \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
 	install-data install-data-am install-exec install-exec-am \
 	install-info install-info-am install-man install-strip \
Index: orxonox/branches/buerli/gui/orxonox_gui.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui.cc	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui.cc	(revision 2707)
@@ -32,4 +32,5 @@
 #include "orxonox_gui_flags.h"
 #include "orxonox_gui_banner.h"
+#include "orxonox_gui_keys.h"
 
   Window* orxonoxGUI;
@@ -39,4 +40,5 @@
   OrxonoxGuiFlags* flags;
   OrxonoxGuiBanner* banner;
+  OrxonoxGuiKeys* keys;
 
 int main( int argc, char *argv[] )
@@ -49,5 +51,5 @@
 
 /**
- * Initializes the Gui
+   \brief Initializes the Gui
 */
 OrxonoxGui::OrxonoxGui (int argc, char *argv[])
@@ -56,5 +58,5 @@
   gtk_rc_parse( "rc" );
   
-  orxonoxGUI = new Window("Graphical Orxonox Launcher");
+  orxonoxGUI = new Window( "Grafical OrxOnoX loader, "PACKAGE_VERSION );
   orxonoxGUI->connectSignal ("destroy", orxonoxGUI->orxonox_gui_quit);
   orxonoxGUI->connectSignal ("delete_event", orxonoxGUI->orxonox_gui_quit);
@@ -75,5 +77,8 @@
       
   optionBox->fill (avBox);
-    
+
+  keys = new OrxonoxGuiKeys ();
+  optionBox->fill (keys->getWidget ());
+
   exec = new OrxonoxGuiExec (orxonoxGUI);
   optionBox->fill (exec->getWidget ());
@@ -99,16 +104,66 @@
 
 /* WIDGET */
-/**
- * Initializes a widget.
- * Nothing to do here.
- */
+
+/**
+   \brief deletes any given Widget
+   This is still pretty crappy.
+*/
+Widget::~Widget()
+{
+  //  cout << "hiding: " <<this->label <<"\n";
+  this->hide();
+  //  cout << "check if Packer: "<<this->label <<"\n";
+  if (this->is_option < 0)
+    {
+      //  cout << "get Down "<<this->label <<"\n";
+      static_cast<Packer*>(this)->down->~Widget();
+    }
+  //  cout << "next != NULL?: " <<this->label <<"\n";
+  if (this->next != NULL)
+    this->next->~Widget();
+  cout << "delete Widget: " <<this->label <<"\n";
+  //  delete widget;
+}
+
+/**
+   \brief Initializes a widget.
+   Initializes the next Pointer and the other Widget-specific Defaults.
+*/
 void Widget::init()
 {
+  next = NULL;
+  label = "";
   return;
 }
 
-/** 
- * Connect any signal to any given Sub-widget
- */
+/**
+   \brief makes the widget visible.
+*/
+void Widget::show()
+{
+  gtk_widget_show (this->widget);
+}
+
+/**
+   \brief hides the widget.
+*/
+void Widget::hide()
+{
+  gtk_widget_hide (this->widget);
+}
+
+/**
+   \brief Sets the resolution of a specific widget to the given size.
+   \param width the width of the widget to set.
+   \param height the height of the widget to set.
+*/
+void Widget::setSize(int width, int height)
+{
+  gtk_widget_set_usize (this->widget, width, height);
+}
+
+/** 
+    \brief Connect any signal to any given Sub-widget
+*/
 void Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))
 {
@@ -117,6 +172,6 @@
 
 /**
- * Connect a signal with additionally passing the whole Object
- */
+   \brief Connect a signal with additionally passing the whole Object
+*/
 void Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))
 {
@@ -125,6 +180,6 @@
 
 /**
- * Connect a signal with additionally passing a whole external Object
- */
+   \brief Connect a signal with additionally passing a whole external Object
+*/
 void Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))
 {
@@ -132,29 +187,14 @@
 }
 
-
-/**
- * Function to Shows a specific widget.
- */
-void Widget::show()
-{
-  gtk_widget_show (this->widget);
-}
-
-/**
- * Moves through all the Widgets downwards from this and executes the function on them.
- \param function must be of type void and takes a Widget* as an Input.
-
- */
+/**
+   \brief Moves through all the Widgets downwards from this and executes the function on them.
+   \param function must be of type void and takes a Widget* as an Input. 
+*/
 void Widget::walkThrough (void (*function)(Widget*))
 {
   function(this);
-  switch (this->is_option)
+  if (this->is_option < 0)
     {
-    case -1:
-      static_cast<Container*>(this)->down->walkThrough (function);
-      break;
-    case -2:
-      static_cast<Box*>(this)->down->walkThrough (function);
-      break;
+      static_cast<Packer*>(this)->down->walkThrough (function);
     } 
 
@@ -163,18 +203,17 @@
 }
 
-
-/** 
- * This is for listing the option of "widget"
- \param widget specifies the widget that should be listed
+/** 
+    \brief This is for listing the option of "widget"
+    \param widget specifies the widget that should be listed
 */
 void Widget::listOptions (Widget* widget)
 {
   if (widget->is_option >= 1)
-    cout << static_cast<Option*>(widget)->option_name <<" is : " << static_cast<Option*>(widget)->value <<endl;
-}
-
-/** 
- * This is for setting the option of "widget"
- \param widget specifies the widget that should be set.
+    cout << static_cast<Option*>(widget)->label <<" is : " << static_cast<Option*>(widget)->value <<endl;
+}
+
+/** 
+    \brief This is for setting the option of "widget"
+    \param widget specifies the widget that should be set.
 */
 void Widget::setOptions (Widget* widget)
@@ -184,19 +223,60 @@
 }
 
-/* CONTAINERS*/
-
-/**
- * Initializes a Container.
- * nothing to do here
- */
+//void deleteWidget(Widget* lastWidget)
+
+
+/* PACKERS */
+
+/**
+   \brief Initializes a Packer.
+   Sets the down-pinter to NULL and other PackerSpecific-values to their defaults.
+*/
+void Packer::init (void)
+{
+  down = NULL;
+  this->setGroupName ("");
+
+
+  static_cast<Widget*>(this)->init();
+  return;
+}
+
+/**
+   \brief Sets the group name under which all the lower widgets of this will be saved.
+   \param name The name of the group.
+*/
+void Packer::setGroupName (char* name)
+{
+  groupName = name;
+}
+
+/**
+   \brief Retrieves the group name under which all the lower widgets of this will be saved.
+   \returns name The name of the group.
+*/
+char* Packer::getGroupName (void)
+{
+  return groupName;
+}
+
+/* CONTAINERS */
+
+/**
+   \brief Initializes a Container.
+   sets the Container-Specific defaults.
+*/
 void Container::init (void)
 {
+  is_option = -1;
+
+  static_cast<Packer*>(this)->init();
+
   return;
 }
 
 /**
- * Fills a Container with lowerWidget.
- * It does this by filling up the down pointer only if down points to NULL.
- \param lowerWidget the Widget that should be filled into the Container.
+   \briefFills a Container with lowerWidget.
+   It does this by filling up the down pointer only if down points to NULL.
+   \param lowerWidget the Widget that should be filled into the Container.
 */
 void Container::fill (Widget *lowerWidget)
@@ -215,7 +295,7 @@
 /* WINDOW */
 
-  /**
-   * Creating a new Window without a Name
-   */
+/**
+   \brief Creating a new Window without a Name
+*/
 Window::Window (void)
 {
@@ -224,7 +304,7 @@
 
 /**
- * Creating a Window with a name
- \param windowName the name the window should get.
- */
+   \brief Creating a Window with a name
+   \param windowName the name the window should get.
+*/
 Window::Window (char* windowName)
 {
@@ -234,20 +314,12 @@
 
 /**
- * Destoying a Window (very BAD implemented).
- * For now it just hides the window.
- */
-Window::~Window ()
-{
-  gtk_widget_hide (widget);
-}
-
-/**
- *initializes a new Window
- */
+   \brief initializes a new Window
+*/
 void Window::init()
 {
-  is_option = -1;
-  next = NULL;
-  down = NULL;
+  isOpen = true;
+
+  static_cast<Container*>(this)->init();
+
   widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_window_set_policy (GTK_WINDOW(widget), TRUE, TRUE, TRUE);
@@ -259,17 +331,19 @@
 
 /**
- * Shows all Widgets that are included within this->widget.
- */
+   \brief Shows all Widgets that are included within this->widget.
+*/
 void Window::showall ()
 {
+  isOpen = true;
   gtk_widget_show_all  (widget);
 }
 
 /**
- * Set The Window-title to title
- \param title title the Window should get.
+   \brief Set The Window-title to title
+   \param title title the Window should get.
 */
 void Window::setTitle (char* title)
 {
+  label=title;
   gtk_window_set_title (GTK_WINDOW (widget), title);
 }
@@ -295,6 +369,6 @@
 
 /** 
- * Creates a new Frame without a name
- */
+    \brief Creates a new Frame without a name
+*/
 Frame::Frame (void)
 {
@@ -303,6 +377,6 @@
 
 /**
- * Creates a new Frame with name title
- */
+   \brief Creates a new Frame with name title
+*/
 Frame::Frame (char* title)
 {
@@ -311,19 +385,11 @@
 }
 
-/**
- * Destroys given Frame (not implemented yet)
- */
-Frame::~Frame ()
-{
-}
-
-/** 
- * Initializes a new Frame with default settings
- */
+/** 
+    \brief Initializes a new Frame with default settings
+*/
 void Frame::init()
 {
-  is_option = -1;
-  next = NULL;
-  down = NULL;
+  static_cast<Container*>(this)->init();
+  
   widget = gtk_frame_new ("");
   gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
@@ -331,9 +397,10 @@
 
 /**
- * Sets the Frames name to title
- \param title The title the Frame should get.
- */
+   \brief Sets the Frames name to title
+   \param title The title the Frame should get.
+*/
 void Frame::setTitle (char* title)
 {
+  label = title;
   gtk_frame_set_label (GTK_FRAME (widget), title);
 }
@@ -342,6 +409,6 @@
 
 /**
- * Creates a new EventBox with default settings.
- */
+   \brief Creates a new EventBox with default settings.
+*/
 EventBox::EventBox ()
 {
@@ -349,6 +416,6 @@
 }
 /**
- * Creates a new EventBox with name title
- \param title title the Eventbox should get (only data-structure-internal)
+   \brief Creates a new EventBox with name title
+   \param title title the Eventbox should get (only data-structure-internal)
 */
 EventBox::EventBox (char* title)
@@ -360,11 +427,12 @@
 
 /**
- * Initializes a new EventBox
- */
+   \brief Initializes a new EventBox
+*/
 void EventBox::init(void)
 {
   is_option = -1;
-  next = NULL;
-  down = NULL;
+
+  static_cast<Container*>(this)->init();
+
   widget = gtk_event_box_new ();
   gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
@@ -373,25 +441,17 @@
 
 /**
- * Sets the Title of the EventBox (not implemented)
- \param title Name the EventBox should get (only datastructure-internal).
+   \brief Sets the Title of the EventBox (not implemented)
+   \param title Name the EventBox should get (only datastructure-internal).
 */
 void EventBox::setTitle (char* title)
 {
-
-}
-
-/**
- * Destructs an EventBox (not Implemented)
- */
-EventBox::~EventBox ()
-{
-}
-
+  label = title;
+}
 
 /* BOX */
 
 /**
- * Creates a new horizontal Box
- */
+   \brief Creates a new horizontal Box
+*/
 Box::Box (void)
 {
@@ -400,7 +460,7 @@
 
 /**
- * Creates a new Box of type boxtype
- \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
- */
+   \brief Creates a new Box of type boxtype
+   \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
+*/
 Box::Box (char boxtype)
 {
@@ -409,19 +469,12 @@
 
 /**
- * Destroys given Box (not implemented yet)
- */
-Box::~Box ()
-{
-}
-
-/**
- * Initializes a new Box with type boxtype
- \param boxtype see Box(char boxtype)
+   \brief Initializes a new Box with type boxtype
+   \param boxtype see Box(char boxtype)
 */
 void Box::init(char boxtype)
 {
   is_option = -2;
-  next = NULL;
-  down = NULL;
+
+  static_cast<Packer*>(this)->init();
   if (boxtype == 'v')
     {
@@ -435,13 +488,10 @@
 
 /** 
- * Fills a box with a given Widget.
- * It does this by apending the first one to its down-pointer and all its following ones to the preceding next-pointer. The last one will receive a NULL pointer as Next
- \param lowerWidget the next Widget that should be appendet to this Box
- */
+    \brief Fills a box with a given Widget.
+    It does this by apending the first one to its down-pointer and all its following ones to the preceding next-pointer. The last one will receive a NULL pointer as Next
+    \param lowerWidget the next Widget that should be appendet to this Box
+*/
 void Box::fill (Widget *lowerWidget)
 {
-  /**
-   * Fill a Box with its lowerwidgets
-   */
   gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0);
   if (this->down == NULL)
@@ -462,6 +512,6 @@
 
 /**
- * Creates a new Image
- \param imagename the location of the Image on the Hard Disc
+   \brief Creates a new Image
+   \param imagename the location of the Image on the Hard Disc
 */
 Image::Image (char* imagename)
@@ -469,13 +519,15 @@
   this->init();
   widget = gtk_image_new_from_file (imagename);
-}
-
-/** 
- * Initializes a new Image
- */
+  label = imagename;
+}
+
+/** 
+    \brief Initializes a new Image
+*/
 void Image::init()
 {
   is_option = 0;
-  next = NULL;
+
+  static_cast<Widget*>(this)->init();
 }
 
@@ -484,16 +536,24 @@
 
 /**
- * Initializes a new Option: nothing to do here
- */
+   \brief Initializes a new Option.
+   sets all Option-Specific-Values to their defaults.
+*/
 void Option::init()
 {
+  value = 0;
+  flag_name = "";
+  flag_name_short = "";
+  default_value = 0;
+
+  static_cast<Widget*>(this)->init();
+
   return;
 }
 
 /**
- * This sets The FlagName of an Option and defines its default Values
- !! Options will be saved if flagname is different from "" !!
-\param flagname the Name that will be displayed in the output
-\param defaultvalue the default Value for this Option (see definition of defaultvalue
+   \brief This sets The FlagName of an Option and defines its default Values
+   !! Options will be saved if flagname is different from "" !!
+   \param flagname the Name that will be displayed in the output
+   \param defaultvalue the default Value for this Option (see definition of defaultvalue
 */
 void Option::setFlagName (char* flagname, int defaultvalue)
@@ -501,12 +561,12 @@
   flag_name = flagname;
   default_value = defaultvalue;
-  cout << "Set Flagname of " << option_name << " to " << flagname << endl;
-}
-
-/** 
- * see Option::setFlagName (char* flagname, int defaultvalue)
- \param flagname the Name that will be displayed in the output
- \param defaultvalue the default Value for this Option (see definition of defaultvalue
- \param flagnameshort a short flagname to be displayed in the output
+  cout << "Set Flagname of " << label << " to " << flagname << endl;
+}
+
+/** 
+    \brief see Option::setFlagName (char* flagname, int defaultvalue)
+    \param flagname the Name that will be displayed in the output
+    \param defaultvalue the default Value for this Option (see definition of defaultvalue
+    \param flagnameshort a short flagname to be displayed in the output
 */
 void Option::setFlagName (char* flagname, char* flagnameshort,  int defaultvalue)
@@ -515,5 +575,5 @@
   flag_name_short = flagnameshort;
   default_value = defaultvalue;
-  cout << "Set Flagname of " << option_name << " to " << flagname << endl;
+  cout << "Set Flagname of " << label << " to " << flagname << endl;
 }
 
@@ -522,6 +582,6 @@
 
 /**
- * Creates a new Button with a buttonname
- \param buttonname sets the Name of the Button
+   \brief Creates a new Button with a buttonname
+   \param buttonname sets the Name of the Button
 */
 Button::Button(char* buttonname)
@@ -532,32 +592,29 @@
 
 /**
- * Initializes a new Button
- */
+   \brief Initializes a new Button
+*/
 void Button::init(void)
 {
   is_option = 0;
-  value = 0;
-  next = NULL;
-  option_name ="";
-  flag_name = "";
-  flag_name_short = "";
-  default_value = 0;
+
+  static_cast<Option*>(this)->init();
+
   widget = gtk_button_new_with_label ("");
 }
 
 /**
- * Sets a new name to the Button
-\param title The name the Button should get
+   \brief Sets a new name to the Button
+   \param title The name the Button should get
 */
 void Button::setTitle (char *title)
 {
-  option_name = title;
+  label = title;
   gtk_button_set_label (GTK_BUTTON(widget), title);
 }
 
 /**
- * redraws the Button
- * not implemented yet
- */
+   \brief redraws the Button
+   not implemented yet
+*/
 void Button::redraw ()
 {
@@ -567,7 +624,7 @@
 
 /**
- * Creates a new CheckButton with an ame 
- \param buttonname The name the CheckButton should display.
- */
+   \brief Creates a new CheckButton with an ame 
+   \param buttonname The name the CheckButton should display.
+*/
 CheckButton::CheckButton (char* buttonname)
 {
@@ -578,33 +635,23 @@
 }
 
-/** 
- * Destructs a CheckButton (not Implemented yet).
- */
-CheckButton::~CheckButton()
-{
-}
-
-/**
- * Initiali a new CheckButton with default settings
- */
+/**
+   \brief Initialize a new CheckButton with default settings
+*/
 void CheckButton::init(void)
 {
   is_option = 1;
-  value = 0;
-  next = NULL;
-  option_name = "";
-  flag_name = "";
-  flag_name_short = "";
-  default_value = 0;
+
+  static_cast<Option*>(this)->init();
+
   widget = gtk_check_button_new_with_label ("");
 }
 
 /**
- * Sets a new Title to a CheckButton
- \param title The new Name the CheckButton should display.
+   \brief Sets a new Title to a CheckButton
+   \param title The new Name the CheckButton should display.
 */
 void CheckButton::setTitle(char* title)
 {
-  option_name = title;
+  label = title;
   gtk_button_set_label(GTK_BUTTON(widget), title);
 }
@@ -612,19 +659,19 @@
 
 /** 
- * Signal OptionChange writes the Value from the CheckButton to its Object-Database.
- \param widget The widget(CheckButton) that has a changed Value
- \param checkbutton the CheckButton-Object that should receive the change.
- */
+    \brief Signal OptionChange writes the Value from the CheckButton to its Object-Database.
+    \param widget The widget(CheckButton) that has a changed Value
+    \param checkbutton the CheckButton-Object that should receive the change.
+*/
 gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton)
 {
   static_cast<CheckButton*>(checkbutton)->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((CheckButton*)checkbutton->widget));
   flags->setTextFromFlags(orxonoxGUI);
-  cout << static_cast<CheckButton*>(checkbutton)->option_name << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl;
-}
-
-/**
- * Redraws the CheckButton (if option has changed).
- * Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
- */
+  cout << static_cast<CheckButton*>(checkbutton)->label << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl;
+}
+
+/**
+   \brief Redraws the CheckButton (if option has changed).
+   Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
+*/
 void CheckButton::redraw ()
 {
@@ -635,8 +682,8 @@
 
 /**
- * Creates a new Slider
- \param slidername The data-structure-name of the slider.
- \param start The minimal Value of the slider.
- \param end The maximal Value of the slider.
+   \brief Creates a new Slider
+   \param slidername The data-structure-name of the slider.
+   \param start The minimal Value of the slider.
+   \param end The maximal Value of the slider.
 */
 Slider::Slider (char* slidername, int start, int end)
@@ -649,39 +696,29 @@
 
 /**
- * Destructs a Slider (not implemented yet)
- */
-Slider::~Slider()
-{
-}
-
-/**
- * Initializes a Slider with start and end Values
- * params: see Slider::Slider (char* slidername, int start, int end)
- */
+   \brief Initializes a Slider with start and end Values
+   params: see Slider::Slider (char* slidername, int start, int end)
+*/
 void Slider::init(int start, int end)
 {
   is_option = 2;
-  value = 0;
-  next = NULL;
-  option_name = "";
-  flag_name = "";
-  flag_name_short = "";
-  default_value = 0;
+
+  static_cast<Option*>(this)->init();
+
   widget = gtk_hscale_new_with_range (start, end, 5);
 }
 
 /**
- * Sets a new Title to the Slider
- \param title The new Name of the slider
+   \brief Sets a new Title to the Slider
+   \param title The new Name of the slider
 */
 void Slider::setTitle(char* title)
 {
-  option_name = title;
-}
-
-/**
- * Setting a new value to the Slider.
- * Maybe you also require a Slider::redraw() for this to display
- */
+  label = title;
+}
+
+/**
+   \brief Setting a new value to the Slider.
+   Maybe you also require a Slider::redraw() for this to display
+*/
 void Slider::setValue(int value)
 {
@@ -690,19 +727,19 @@
 
 /** 
- * Signal OptionChange writes the Value from the Slider to its Object-Database.
- \param widget The widget(Slider) that has a changed Value
- \param slider the Slider-Object that should receive the change.
- */
+    \brief Signal OptionChange writes the Value from the Slider to its Object-Database.
+    \param widget The widget(Slider) that has a changed Value
+    \param slider the Slider-Object that should receive the change.
+*/
 gint Slider::OptionChange (GtkWidget *widget, Widget* slider)
 {
   static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget));
   flags->setTextFromFlags(orxonoxGUI);
-  cout << static_cast<Slider*>(slider)->option_name << " set to: "<< static_cast<Slider*>(slider)->value << endl;
-}
-
-/**
- * Redraws the widget
- * Example: see void CheckButton::redraw ()
- */
+  cout << static_cast<Slider*>(slider)->label << " set to: "<< static_cast<Slider*>(slider)->value << endl;
+}
+
+/**
+   \brief Redraws the widget
+   Example: see void CheckButton::redraw ()
+*/
 void Slider::redraw ()
 {
@@ -713,9 +750,9 @@
 
 /** 
- * Creates a Menu-Item-list out of multiple input.
- * !! Consider, that the last input argument has to be "lastItem" for this to work!!
- \param menuname The Database-Name of this Menu
- \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
- */
+    \brief Creates a Menu-Item-list out of multiple input.
+    !! Consider, that the last input argument has to be "lastItem" for this to work!!
+    \param menuname The Database-Name of this Menu
+    \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
+*/
 Menu::Menu (char* menuname, ...)
 {
@@ -737,14 +774,12 @@
 
 /**
- * Initializes a new Menu with no items
- */
+   \brief Initializes a new Menu with no items
+*/
 void Menu::init(void)
 {
   is_option = 2;
-  value = 0;
-  next = NULL;
-  flag_name = "";
-  flag_name_short = "";
-  default_value = 0;
+
+  static_cast<Option*>(this)->init();
+
   widget = gtk_option_menu_new ();
   menu = gtk_menu_new ();
@@ -758,10 +793,10 @@
 void Menu::setTitle(char* title)
 {
-  option_name = title;
-}
-
-/**
- * appends a new Item to the Menu-List.
- \param itemName the itemName to be appendet.
+  label = title;
+}
+
+/**
+   \brief appends a new Item to the Menu-List.
+   \param itemName the itemName to be appendet.
 */
 void Menu::addItem (char* itemName)
@@ -772,17 +807,18 @@
 
 /** 
- * Signal OptionChange writes the Value from the Menu to its Object-Database.
- \param widget The widget(Menu) that has a changed Value
- \param menu the Menu-Object that should receive the change.
- */gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
+    \brief Signal OptionChange writes the Value from the Menu to its Object-Database.
+    \param widget The widget(Menu) that has a changed Value
+    \param menu the Menu-Object that should receive the change.
+*/
+gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
 {
   static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget));
   flags->setTextFromFlags(orxonoxGUI);
-  cout << static_cast<Menu*>(menu)->option_name << " changed to : " << static_cast<Menu*>(menu)->value << endl;
-}
-
-/**
- * Redraws the widget
- * Example: see void CheckButton::redraw ()
+  cout << static_cast<Menu*>(menu)->label << " changed to : " << static_cast<Menu*>(menu)->value << endl;
+}
+
+/**
+   \brief Redraws the widget
+   Example: see void CheckButton::redraw ()
  */
 void Menu::redraw ()
@@ -792,7 +828,7 @@
 
 /**
- * Creates a new default Label with no Text.
- * You migth consider adding Label::setTitle with this.
- */
+   \brief Creates a new default Label with no Text.
+   You migth consider adding Label::setTitle with this.
+*/
 Label:: Label ()
 {
@@ -801,45 +837,39 @@
 
 /**
- * Creates a new Label with a Text.
- \param text The text to be displayed.
+   \brief Creates a new Label with a Text.
+   \param text The text to be displayed.
 */
 Label:: Label (char* text)
 {
+  this->init();
+  this->setText(text);
+}
+
+/**
+   \brief initializes a new Label
+*/
+void Label::init(void)
+{
   is_option = 0;
-  next = NULL;
-  widget = gtk_label_new (text);
+
+  static_cast<Widget*>(this)->init();
+
+  widget = gtk_label_new ("");
   gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
 }
 
-/** 
- * Destructs a Label
- */
-Label::~Label ()
-{}
-
-/**
- * initializes a new Label
- */
-void Label::init(void)
-{
-  is_option = 0;
-  next = NULL;
-  widget = gtk_label_new ("");
-  gtk_widget_set_usize (widget, 260, 60);
-  gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
-}
-
-/**
- * Sets a new Text to a Label.
- \param text The text to be inserted into the Label.
- */
+/**
+   \brief Sets a new Text to a Label.
+   \param text The text to be inserted into the Label.
+*/
 void Label::setText (char * text)
 {
+  label = text;
   gtk_label_set_text (GTK_LABEL (this->widget), text);
 }
 
 /**
- * get the Text of a Label
- \return The Text the Label holds.
+   \brief get the Text of a Label
+   \return The Text the Label holds.
 */
 char* Label::getText ()
Index: orxonox/branches/buerli/gui/orxonox_gui.h
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui.h	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui.h	(revision 2707)
@@ -7,6 +7,9 @@
 #define _ORXONOX_GUI_H
 
+#if HAVE_CONFIG_H 
+#include <config.h> 
+#endif
+
 #include <stdlib.h>
-#include <string.h>
 #include <gtk/gtkmain.h>
 #include <gtk/gtkwindow.h>
@@ -34,18 +37,25 @@
 
 //! This is the topmost object that can be displayed all others are derived from it.
-
 class Widget
 {
  private:
  public:
+  ~Widget ();
+
   Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next
   GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains.
-  virtual void init(void);
+  void init(void);
   int is_option; //!< with this Paramenter one can set the IsOption type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option
-  enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; //!< defines is_option states
+  /**
+     \briefdefines is_option states
+  */
+  enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 
+  char* label; //!< The name of the Widget. Some do display it, Options need it to save;
   void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
   void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
   void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *));
   void show ();
+  void hide ();
+  void setSize(int width, int height);
 
   void walkThrough (void (*function)(Widget*));
@@ -55,4 +65,15 @@
 };
 
+//! This is a Packer Object, which has the ability to Pack other Widgets into itself.
+class Packer : public Widget
+{
+ public:
+  Widget* down; //!< this points to the Widget below this.
+  char* groupName; //!< For each Packer you can specify a Groupname under which the lowerWidgets will be saved.
+
+  void init(void);
+  void setGroupName (char* name);
+  char* getGroupName (void);
+};
 
 //! This is a Container Class, it can contain one sub-Widget: down.
@@ -62,14 +83,12 @@
  * The derived classes of Container can be displayed
 */
-class Container : public Widget
+class Container : public Packer
 {
  private:
   int borderwidth;
   int policy;
-  char* label;
-  
- public:
-  void init(void);
-  Widget* down; //!< this points to the Widget below this.
+  
+ public:
+  void init(void);
   //  void setBorderWidth (int borderwidth);
   //  virtual void setTitle (char* title) = 0;
@@ -84,8 +103,9 @@
 class Window : public Container
 {
+ private:
+  bool isOpen;
  public:
   Window (char* windowName);
   Window (void);
-  ~Window ();
   void init ();
   
@@ -105,5 +125,4 @@
   Frame (char* frameName);
   Frame (void);
-  ~Frame ();
   void init(void);
   
@@ -120,5 +139,4 @@
   EventBox (char* eventBoxName);
   EventBox (void);
-  ~EventBox ();
   void init(void);
   
@@ -132,13 +150,11 @@
  * A Box is always filled left->right (horizontally) or up->down (vertically)
  */
-class Box : public Widget
+class Box : public Packer
 {
  public:
   Box (void);
   Box (char boxtype);
-  ~Box (void);
   void init(char boxtype);
 
-  Widget* down; //!< the Lower Widget of a Box.
   void fill (Widget* lowerWidget);
 
@@ -154,5 +170,4 @@
  public:
   Image (char* imgaename);
-  ~Image ();
   void init(void);
 };
@@ -169,5 +184,4 @@
 
   int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume
-  char* option_name; //!< options have a name, that can be displayed around them
   char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI.
   char* flag_name_short; //!< like flag_name but shorter
@@ -187,5 +201,4 @@
  public:
   Button (char* buttonname);
-  ~Button (void);
   void init(void);
 
@@ -202,5 +215,4 @@
  public:
   CheckButton (char* buttonname);
-  ~CheckButton (void);
   static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
   
@@ -219,5 +231,4 @@
  public:
   Slider (char* slidername,int start, int end);
-  ~Slider ();
   void init(int start, int end);
 
@@ -239,5 +250,4 @@
  public:
   Menu (char* menuname, ...);
-  ~Menu ();
   void init(void);
 
@@ -255,5 +265,4 @@
   Label ();
   Label (char* text);
-  ~Label ();
   void init(void);
   
Index: orxonox/branches/buerli/gui/orxonox_gui_audio.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_audio.cc	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui_audio.cc	(revision 2707)
@@ -33,4 +33,5 @@
   audioFrame = new Frame ("Audio-Options:");
   audioBox = new Box ('v');
+  audioFrame->setGroupName ("audio");
   
   enableSound = new CheckButton ("Disable Sound");
Index: orxonox/branches/buerli/gui/orxonox_gui_banner.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_banner.cc	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui_banner.cc	(revision 2707)
@@ -63,5 +63,5 @@
 	  logoEventBox = new EventBox();
 	  logoBox = new Box('v');
-	  logoLabel = new Label("OrxOnoX");
+	  logoLabel = new Label("OrxOnoX, " PACKAGE_VERSION);
 	  logoImage = new Image("banner.xpm");
 	  logoEventBox->fill(logoImage);
@@ -88,5 +88,5 @@
 {
   logoWindowIsOpen = 0;
-  logoWindow->~Window();
+  logoWindow->hide();
 }
 
Index: orxonox/branches/buerli/gui/orxonox_gui_exec.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_exec.cc	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui_exec.cc	(revision 2707)
@@ -38,4 +38,5 @@
   execFrame = new Frame ("Execute-Tags:");
   execBox = new Box ('v');
+  execFrame->setGroupName ("misc");
   
   start = new Button ("Start");
@@ -109,5 +110,5 @@
   CONFIG_FILE = fopen (configFile, "w");
   if (CONFIG_FILE)
-    writeFileText (widget);
+    writeFileText (widget, 0);
   fclose (CONFIG_FILE);
 }
@@ -116,7 +117,34 @@
    \brief Actually writes into the configuration file to the disk.
    \param widget from which Widget on should be saved.
-*/
-void OrxonoxGuiExec::writeFileText (Widget* widget)
-{
+   \param depth initially "0", and grows higher, while new Groups are bundeled.
+*/
+void OrxonoxGuiExec::writeFileText (Widget* widget, int depth)
+{
+  int counter = 0;
+  while (counter < depth && ((widget->is_option>0
+			      && (strcmp (static_cast<Option*>(widget)->flag_name, "")
+				  || strcmp (static_cast<Option*>(widget)->flag_name_short, "")) )
+			     || (widget->is_option<0
+				 && strcmp (static_cast<Packer*>(widget)->getGroupName(), ""))))
+    {
+      fprintf (CONFIG_FILE, "  ", depth);
+      counter++;
+    }
+  
+  // check if it is a Packer, and if it is, check if it has a name and if there is something in it.
+  if (widget->is_option <0)
+    {
+      if (strcmp (static_cast<Packer*>(widget)->getGroupName(), ""))
+	{
+	  fprintf (CONFIG_FILE, "[%s]\n", static_cast<Packer*>(widget)->getGroupName());
+	  writeFileText (static_cast<Packer*>(widget)->down, depth+1);
+	  fprintf(CONFIG_FILE, "\n");
+	}
+      else
+	{
+	  writeFileText (static_cast<Packer*>(widget)->down, depth);
+	}
+    } 
+  
   if (widget->is_option >= 1)
     if  (strcmp (static_cast<Option*>(widget)->flag_name, "") || strcmp (static_cast<Option*>(widget)->flag_name_short, ""))
@@ -124,7 +152,7 @@
 	char Buffer[256];
 	char* space2under;
-	sprintf (Buffer, "%s", static_cast<Option*>(widget)->option_name);
+	sprintf (Buffer, "%s", static_cast<Option*>(widget)->label);
 	if (strchr (Buffer, '_'))
-	  cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl; 
+	  cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl;
 	while (space2under = strchr(Buffer, ' '))
 	  {
@@ -133,16 +161,7 @@
 	fprintf (CONFIG_FILE, "%s = %i\n", Buffer, static_cast<Option*>(widget)->value);
       }
-  switch (widget->is_option)
-    {
-    case -1:
-      writeFileText (static_cast<Container*>(widget)->down);
-      break;
-    case -2:
-      writeFileText (static_cast<Box*>(widget)->down);
-      break;
-    } 
-  
+
   if (widget->next != NULL)
-    writeFileText (widget->next);
+    writeFileText (widget->next, depth);
 }
 
@@ -156,4 +175,5 @@
   if (CONFIG_FILE)
     {
+      Widget* groupWidget = widget;
       char Buffer[256] = "";
       char Variable[256]= "";
@@ -161,4 +181,12 @@
       while (fscanf (CONFIG_FILE, "%s", Buffer) != EOF)
 	{
+	  if (!strncmp (Buffer, "[", 1))
+	    {
+	      if ((groupWidget = locateGroup (widget, Buffer, 1))==NULL)
+		{
+		  cout << "!!There is no group called " << Buffer << " in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n";
+		  groupWidget = widget;
+		}
+	    }
 	  if (!strcmp (Buffer, "="))
 	    {
@@ -171,5 +199,5 @@
 	      fscanf (CONFIG_FILE, "%s", Buffer);
 	      Value = atoi(Buffer);
-	      readFileText (widget, Variable, Value);
+	      readFileText (groupWidget, Variable, Value, 0);
 	      sprintf (Variable, "");
 	    }
@@ -179,5 +207,4 @@
     }
 }
-
 /**
    \brief Maps Confugurations to the Options.
@@ -185,23 +212,54 @@
    \param variableName the name of the Variable that should be set up.
    \param variableValue the Value of the Variable that should be set up
-*/
-void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, int variableValue)
+   \param depth the depth of the local Widget
+*/
+void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, int variableValue, int depth)
 {
   if (widget->is_option >= 1)
-    if (!strcmp (static_cast<Option*>(widget)->option_name, variableName))
+    if (!strcmp (static_cast<Option*>(widget)->label, variableName))
 	static_cast<Option*>(widget)->value = variableValue;
 
-  switch (widget->is_option)
-    {
-    case -1:
-      readFileText (static_cast<Container*>(widget)->down, variableName, variableValue);
-      break;
-    case -2:
-      readFileText (static_cast<Box*>(widget)->down, variableName, variableValue);
-      break;
+  if (widget->is_option < 0)
+    {
+      readFileText (static_cast<Packer*>(widget)->down, variableName, variableValue, depth+1);
     } 
 
-  if (widget->next != NULL)
-    readFileText (widget->next, variableName, variableValue);
+  if (widget->next != NULL && depth !=0)
+    readFileText (widget->next, variableName, variableValue, depth);
+}
+
+/**
+   \brief locates a Group member
+*/
+Widget* OrxonoxGuiExec::locateGroup(Widget* widget, char* groupName, int depth)
+{
+  Widget* tmp;
+
+  // removes the trailing and ending [ ].
+  if (!strncmp (groupName, "[", 1))
+    {
+      groupName = groupName+1;
+      groupName[strlen(groupName)-1] = '\0';
+    }
+
+  if (widget->is_option < 0)
+    {
+      if (!strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
+	{
+	  return widget;
+	}
+      else
+	{
+	  if ((tmp = locateGroup (static_cast<Packer*>(widget)->down, groupName, depth+1)) != NULL)
+	    return tmp;
+	}
+    } 
+  
+  if (widget->next != NULL && depth != 0)
+    {
+      if ((tmp = locateGroup (widget->next, groupName, depth)) != NULL)
+	return tmp;
+    }
+  return NULL;
 }
 
Index: orxonox/branches/buerli/gui/orxonox_gui_exec.h
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_exec.h	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui_exec.h	(revision 2707)
@@ -33,7 +33,8 @@
   int shouldsave ();
   void writeToFile (Widget* widget);
-  void writeFileText (Widget* widget);
+  void writeFileText (Widget* widget, int depth);
   void readFromFile (Widget* widget);
-  void readFileText (Widget* widget, char* variableName, int variableValue);
+  void readFileText (Widget* widget, char* variableName, int variableValue, int depth);
+  Widget* locateGroup(Widget* widget, char* groupName, int depth);
 
 };
Index: orxonox/branches/buerli/gui/orxonox_gui_flags.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_flags.cc	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui_flags.cc	(revision 2707)
@@ -39,4 +39,5 @@
 
   flagsLabel = new Label ();
+  flagsLabel->setSize (260,60);
   flagsBox->fill (flagsLabel);
   shortFlags = new CheckButton ("shortFlags");
Index: orxonox/branches/buerli/gui/orxonox_gui_keys.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_keys.cc	(revision 2707)
+++ orxonox/branches/buerli/gui/orxonox_gui_keys.cc	(revision 2707)
@@ -0,0 +1,77 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+
+*/
+
+#include "orxonox_gui_keys.h"
+#include <iostream.h>
+
+/**
+   \brief Creates an Keyboard-Frame
+*/
+OrxonoxGuiKeys::OrxonoxGuiKeys ()
+{
+  keysFrame = new Frame ("Keyboard-Options:");
+  keysFrame->setGroupName("Keyboard");
+  keysBox = new Box ('v');
+  player1 = new Player("player1");
+  player2 = new Player("player2");
+  
+  keysBox->fill(player1->getOpenButton());
+
+  keysFrame->fill (keysBox);
+}
+
+/**
+   \brief Return the Frame
+   \return Returns the Audio-frame
+*/
+Widget* OrxonoxGuiKeys::getWidget ()
+{
+  return keysFrame;
+}
+
+
+
+/* PLAYER */
+Player::Player(char* player)
+{
+  openButton = new Button (player);
+}
+
+Button* Player::getOpenButton()
+{
+  return openButton;
+}
+
+
+void Player::setkey(KEYS key)
+{
+  cout << "setting up Key: "<< key <<endl;
+}
+
+gint WindowOpen (GtkWidget* widget, GdkEvent* event, void* player)
+{
+  
+}
+
Index: orxonox/branches/buerli/gui/orxonox_gui_keys.h
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_keys.h	(revision 2707)
+++ orxonox/branches/buerli/gui/orxonox_gui_keys.h	(revision 2707)
@@ -0,0 +1,55 @@
+/*!
+  \file orxonox_gui_keys.h
+  \brief File that holds the class that creates the Keyboard-Options.
+*/
+
+#ifndef _ORXONOX_GUI_KEYS_H
+#define _ORXONOX_GUI_KEYS_H
+
+#include "orxonox_gui.h"
+
+/**
+ * defines the Possible Player Keys
+ */
+enum KEYS { UP, DOWN, LEFT, RIGTH, SHOOT };
+
+/**
+   \brief Class to hold infos about a Player
+*/
+class Player
+{
+ private:
+  char keys[10];
+  Button* openButton;
+  Window* window;
+  
+ public:
+  Player(char* player);
+
+  Button* getOpenButton();
+
+  void setkey(KEYS key);
+  
+};
+
+//! Class that creates the Keys-Options.
+class OrxonoxGuiKeys
+{
+ private:
+  Frame* keysFrame;
+  Box* keysBox;
+  Player* player1;
+  Player* player2;
+  Button* misc;
+
+ public:
+  OrxonoxGuiKeys ();
+  ~OrxonoxGuiKeys ();
+  
+  Widget* getWidget ();
+};
+
+
+    
+
+#endif /* _ORXONOX_GUI_KEYS_H */
Index: orxonox/branches/buerli/gui/orxonox_gui_video.cc
===================================================================
--- orxonox/branches/buerli/gui/orxonox_gui_video.cc	(revision 2706)
+++ orxonox/branches/buerli/gui/orxonox_gui_video.cc	(revision 2707)
@@ -32,4 +32,5 @@
   videoFrame = new Frame ("Video-Options:");
   videoBox = new Box ('v');
+  videoFrame->setGroupName("video");
   
   fullscreen = new CheckButton ("Fullscreen-mode");
Index: orxonox/branches/buerli/src/Makefile.in
===================================================================
--- orxonox/branches/buerli/src/Makefile.in	(revision 2706)
+++ orxonox/branches/buerli/src/Makefile.in	(revision 2707)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,4 +14,7 @@
 
 @SET_MAKE@
+
+
+SOURCES = $(orxonox_SOURCES)
 
 srcdir = @srcdir@
@@ -22,5 +25,4 @@
 pkgincludedir = $(includedir)/@PACKAGE@
 top_builddir = ..
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
@@ -36,4 +38,48 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+bin_PROGRAMS = orxonox$(EXEEXT)
+subdir = src
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in INSTALL
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \
+	player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \
+	vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \
+	command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
+	track.$(OBJEXT) base_entity.$(OBJEXT) IPhys.$(OBJEXT)
+orxonox_OBJECTS = $(am_orxonox_OBJECTS)
+orxonox_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/IPhys.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/collision.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/ini_parser.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/keynames.Po ./$(DEPDIR)/orxonox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/track.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/world_entity.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(orxonox_SOURCES)
+DIST_SOURCES = $(orxonox_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -90,4 +136,5 @@
 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
+am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 bindir = @bindir@
@@ -103,4 +150,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -112,65 +160,42 @@
 AM_CXXFLAGS = "-I/usr/X11R6/include"
 AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
-
-
-#"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
-bin_PROGRAMS = orxonox
 orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc IPhys.cc 
-
 noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h IPhys.h
-subdir = src
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = orxonox$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) player.$(OBJEXT) \
-	data_tank.$(OBJEXT) world_entity.$(OBJEXT) vector.$(OBJEXT) \
-	camera.$(OBJEXT) collision.$(OBJEXT) command_node.$(OBJEXT) \
-	ini_parser.$(OBJEXT) keynames.$(OBJEXT) track.$(OBJEXT) \
-	base_entity.$(OBJEXT) IPhys.$(OBJEXT)
-orxonox_OBJECTS = $(am_orxonox_OBJECTS)
-orxonox_LDADD = $(LDADD)
-orxonox_DEPENDENCIES =
-orxonox_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/IPhys.Po ./$(DEPDIR)/base_entity.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/camera.Po ./$(DEPDIR)/collision.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/ini_parser.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/keynames.Po ./$(DEPDIR)/orxonox.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/track.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/world_entity.Po
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-	-o $@
-DIST_SOURCES = $(orxonox_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in INSTALL \
-	Makefile.am
-SOURCES = $(orxonox_SOURCES)
-
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .cc .o .obj
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu  src/Makefile
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
@@ -178,6 +203,6 @@
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
@@ -187,6 +212,6 @@
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
 	done
 
@@ -198,5 +223,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -219,33 +244,19 @@
 
 .cc.o:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@	fi
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
-@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCXX_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCXX_TRUE@	fi
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 uninstall-info-am:
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -257,4 +268,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -268,8 +280,9 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -294,8 +307,4 @@
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
 distdir: $(DISTFILES)
@@ -311,5 +320,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -329,7 +338,8 @@
 check: check-am
 all-am: Makefile $(PROGRAMS) $(HEADERS)
-
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
 install: install-am
 install-exec: install-exec-am
@@ -370,4 +380,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -405,9 +417,9 @@
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic ctags distclean distclean-compile \
-	distclean-generic distclean-tags distdir dvi dvi-am info \
-	info-am install install-am install-binPROGRAMS install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
Index: orxonox/branches/buerli/src/camera.cc
===================================================================
--- orxonox/branches/buerli/src/camera.cc	(revision 2706)
+++ orxonox/branches/buerli/src/camera.cc	(revision 2707)
@@ -27,6 +27,7 @@
    This standard constructor sets all parameters to zero
 */
-Camera::Camera ()
-{
+Camera::Camera (World* world)
+{
+  this->world = world;
   bound = NULL;
   /* give it some physical live */
@@ -36,5 +37,4 @@
   fs = new Vector(0.0, 0.0, 0.0);
   cameraMode = NORMAL;
-
   deltaTime = 3000.0;
   cameraOffset = 1.0;
@@ -179,10 +179,9 @@
       /* the camera is handled like an entity and rolls on the track */
     case NORMAL:
-      Orxonox *orx = Orxonox::getInstance();
       Location lookat;  
-      if( bound != NULL)
+      if( bound != NULL && world != NULL )
 	{
 	  bound->get_lookat (&lookat);
-	  orx->get_world()->calc_camera_pos (&lookat, &desired_place);
+	  world->calc_camera_pos (&lookat, &desired_place);
 	} 
       else
@@ -293,2 +292,8 @@
     } 
 }
+
+
+void Camera::setWorld(World* world)
+{
+  this->world = world;
+}
Index: orxonox/branches/buerli/src/camera.h
===================================================================
--- orxonox/branches/buerli/src/camera.h	(revision 2706)
+++ orxonox/branches/buerli/src/camera.h	(revision 2707)
@@ -10,12 +10,13 @@
 
 class WorldEntity;
+class World;
 
 //! Camera
 /**
- 	This class controls the viewpoint from which the World is rendered. To use the 
-	Camera it has to be bound to a WorldEntity which serves as the reference focus 
-	point. The Camera itself calls the WorldEntity::get_lookat() and 
-	World::calc_camera_pos() functions to calculate the position it currently should
-	be in.
+   This class controls the viewpoint from which the World is rendered. To use the 
+   Camera it has to be bound to a WorldEntity which serves as the reference focus 
+   point. The Camera itself calls the WorldEntity::get_lookat() and 
+   World::calc_camera_pos() functions to calculate the position it currently should
+   be in.
 */
 
@@ -27,4 +28,5 @@
   Placement actual_place;	        //!< the Camera's current position
   Placement desired_place;        //!< where the Camera should be according to calculations
+  World* world;
   
   /* physical system - not needed yet */
@@ -49,17 +51,19 @@
   Quaternion *res;
   
+  
+  CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
+  
+  void update_desired_place ();
+  
+ public:
+  Camera (World* world);
+  ~Camera ();
+  
+  void time_slice (Uint32 deltaT);
+  void apply ();
+  void bind (WorldEntity* entity);
+  void jump (Placement* plc);
 
-  CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
-
-	void update_desired_place ();
-	
- public:
-  Camera ();
-  ~Camera ();
-
-	void time_slice (Uint32 deltaT);
-	void apply ();
-	void bind (WorldEntity* entity);
-	void jump (Placement* plc);
+  void setWorld(World* world);  
 
 };
Index: orxonox/branches/buerli/src/campaign.cc
===================================================================
--- orxonox/branches/buerli/src/campaign.cc	(revision 2707)
+++ orxonox/branches/buerli/src/campaign.cc	(revision 2707)
@@ -0,0 +1,157 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: 
+*/
+
+
+#include "campaign.h"
+#include "world.h"
+#include "camera.h"
+#include "story_entity.h"
+
+using namespace std;
+
+
+Campaign::Campaign () 
+{
+  this->entities = new List<StoryEntity>();
+  this->isInit = false;
+}
+
+Campaign::~Campaign () {}
+
+
+Error Campaign::init()
+{
+  this->isInit = true;
+}
+
+/** 
+    \brief adds an game stroy entity to the campaign
+
+    \param se: The entity
+    \param storyID: The number that identifies the entity in the campaign. Each ID only used once in a Campaign
+
+    An entity can be a world (playable), a cinematic, a shop, sounds, whatever you
+    want to queue up in the campaign.
+*/
+void Campaign::addEntity(StoryEntity* se, Uint32 storyID)
+{
+  se->setStoryID(storyID);
+  this->addEntity(se);
+}
+
+void Campaign::addEntity(StoryEntity* se)
+{
+  this->entities->add(se);
+}
+
+
+void Campaign::removeEntity(Uint32 storyID)
+{
+  this->removeEntity(this->getStoryEntity(storyID));
+  
+}
+
+
+void Campaign::removeEntity(StoryEntity* se)
+{
+  this->entities->remove(se);
+}
+
+
+Error Campaign::start()
+{
+  this->start(0);
+}
+
+Error Campaign::start(Uint32 storyID = 0)
+{
+  printf("World::start() - starting new StoryEntity Nr:%i\n", storyID);
+  Error errorCode;
+  if(!this->isInit) return errorCode; 
+  if(storyID == WORLD_ID_GAMEEND) return errorCode;
+  this->running = true;
+  StoryEntity* se = this->getStoryEntity(storyID);
+  while(se != NULL && this->running)
+    {
+      se = this->getStoryEntity(storyID);
+      this->currentEntity = se;
+      
+      se->displayEntityScreen();
+      se->load();
+      se->init();
+      se->releaseEntityScreen();
+      se->start();
+
+      int nextWorldID = se->getNextStoryID();
+      if(nextWorldID == WORLD_ID_GAMEEND) return errorCode;
+      se = this->getStoryEntity(nextWorldID);
+      if(se == NULL)
+	printf("Campaign::start() - ERROR: world it not found, oh oh...");
+    }
+}
+
+Error Campaign::stop()
+{
+  this->running = false;
+  if(this->currentEntity != NULL) 
+    {
+      this->currentEntity->stop();
+      delete this->currentEntity;
+      this->currentEntity = NULL;
+    }
+}
+
+Error Campaign::pause()
+{
+  if(this->currentEntity != NULL)
+    this->isPaused = true;
+}
+
+
+Error Campaign::resume()
+{
+  if(this->currentEntity != NULL)
+    this->isPaused = false;
+}
+
+
+void Campaign::nextLevel()
+{
+  printf("Campaign|nextLevel\n");
+  int nextID = this->currentEntity->getNextStoryID();
+  this->stop();
+  this->start(nextID);
+}
+
+void Campaign::previousLevel()
+{}
+
+
+StoryEntity* Campaign::getStoryEntity(Uint32 storyID)
+{
+  List<StoryEntity>* l;
+  StoryEntity* entity;
+  l = this->entities->get_next();  
+  while( l != NULL) 
+    { 
+      entity = l->get_object();
+      l = l->get_next();
+      if(entity->getStoryID() == storyID)
+	return entity;
+    }
+  return NULL;
+}
Index: orxonox/branches/buerli/src/campaign.h
===================================================================
--- orxonox/branches/buerli/src/campaign.h	(revision 2707)
+++ orxonox/branches/buerli/src/campaign.h	(revision 2707)
@@ -0,0 +1,41 @@
+
+#ifndef CAMPAIGN_H
+#define CAMPAIGN_H
+
+#include "stdincl.h"
+#include "story_entity.h"
+
+
+class World;
+
+class Campaign : public StoryEntity {
+
+ public:
+  Campaign ();
+  ~Campaign ();
+
+  StoryEntity* currentEntity;
+
+  virtual Error init();
+  virtual Error start();
+  virtual Error start(Uint32 storyID);
+  virtual Error stop();
+  virtual Error pause();
+  virtual Error resume();
+
+  void addEntity(StoryEntity* se, Uint32 storyID);
+  void addEntity(StoryEntity* se);
+  void removeEntity(Uint32 storyID);
+  void removeEntity(StoryEntity* se);
+  
+  void nextLevel();
+  void previousLevel();
+
+ private:
+  List<StoryEntity>* entities;
+  bool running;
+
+  StoryEntity* getStoryEntity(Uint32 storyID);
+};
+
+#endif
Index: orxonox/branches/buerli/src/command_node.cc
===================================================================
--- orxonox/branches/buerli/src/command_node.cc	(revision 2706)
+++ orxonox/branches/buerli/src/command_node.cc	(revision 2707)
@@ -19,4 +19,5 @@
 #include "ini_parser.h"
 #include "world_entity.h"
+#include "game_loader.h"
 
 #include <stdio.h>
@@ -27,187 +28,188 @@
 
 /**
-	\brief constructs a CommandNode to handle remote input
-	\param ID: unique denumerator to identify the node in the network
+   \brief constructs a CommandNode to handle remote input
+   \param ID: unique denumerator to identify the node in the network
 */
 CommandNode::CommandNode (int ID)
 {
-	bound = new List<WorldEntity>();
-	aliases = NULL;
-	netID = ID;
-	bLocalInput = false;
-}
-
-/**
-	\brief constructs a CommandNode to handle local input
-	\param filename: The path and name of the file to load the key bindings from
+  bound = new List<WorldEntity>();
+  aliases = NULL;
+  netID = ID;
+  bLocalInput = false;
+}
+
+/**
+   \brief constructs a CommandNode to handle local input
+   \param filename: The path and name of the file to load the key bindings from
 */
 CommandNode::CommandNode (char* filename = DEFAULT_KEYBIND_FILE)
 {
-	aliases = NULL;
-	bLocalInput = true;
-	netID = 0;
-	bound = new List<WorldEntity>();
-	load_bindings (filename);
-}
-
-/**
-	\brief removes the CommandNode from memory
+  aliases = NULL;
+  bLocalInput = true;
+  netID = 0;
+  bound = new List<WorldEntity>();
+  load_bindings (filename);
+}
+
+/**
+   \brief removes the CommandNode from memory
 */
 CommandNode::~CommandNode ()
 {
-	if( aliases != NULL) free (aliases);
-	if( bound != NULL) delete bound;
-}
-
-/**
-	\brief loads new key bindings from a file
-	\param filename: The path and name of the file to load the bindings from
+  if( aliases != NULL) free (aliases);
+  if( bound != NULL) delete bound;
+}
+
+/**
+   \brief loads new key bindings from a file
+   \param filename: The path and name of the file to load the bindings from
 */
 void CommandNode::load_bindings (char* filename)
 {
-	FILE* stream;
-	
-	printf("Loading key bindings from %s\n", filename);
-	
-	if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
-	
-		// remove old bindings if present
-	if( aliases != NULL)
+  FILE* stream;
+  
+  printf("Loading key bindings from %s\n", filename);
+  
+  if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
+  
+  // remove old bindings if present
+  if( aliases != NULL)
+    {
+      free (aliases);
+      aliases = NULL;
+    }
+  
+  // create parser
+  IniParser parser (filename);
+  if( parser.get_section ("Bindings") == -1)
+    {
+      printf("Could not find key bindings in %s\n", filename);
+      return;
+    }
+  // allocate empty lookup table
+  aliases = (KeyBindings*) calloc (1, sizeof (KeyBindings));
+  
+  char namebuf[256];
+  char valuebuf[256];
+  memset (namebuf, 0, 256);
+  memset (valuebuf, 0, 256);
+  int* index;
+  
+  while( parser.next_var (namebuf, valuebuf) != -1)
+    {
+      index = name_to_index (namebuf);
+      switch( index[0])
 	{
-		free (aliases);
-		aliases = NULL;
+	case 0:
+	  printf("Key binding %d(%s) set to %s\n", index[1], SDLK_to_keyname( index[1]), valuebuf);
+	  strcpy (aliases->keys[index[1]], valuebuf);
+	  break;
+	case 1:
+	  printf("Button binding %d(%s) set to %s\n", index[1], SDLB_to_buttonname( index[1]), valuebuf);
+	  strcpy (aliases->buttons[index[1]], valuebuf);
+	  break;
+	default:
+	  break;
 	}
-			
-		// create parser
-	IniParser parser (filename);
-	if( parser.get_section ("Bindings") == -1)
+      memset (namebuf, 0, 256);
+      memset (valuebuf, 0, 256);
+    }
+}
+
+/**
+   \brief binds a WorldEntity to the CommandNode
+   \param entity: Pointer to the entity to bind
+*/
+void CommandNode::bind (WorldEntity* entity)
+{
+  bound->add (entity, LIST_ADD_NEXT, true);
+}
+
+/**
+   \brief removes an entity from the list of the CommandNode
+   \param entity: Pointer to the entity to relese
+*/
+void CommandNode::unbind (WorldEntity* entity)
+{
+  bound->remove (entity, LIST_FIND_FW);
+}
+
+int* CommandNode::name_to_index (char* name)
+{
+  coord[0] = -1;
+  coord[1] = -1;
+  int c;
+  if( (c = keyname_to_SDLK (name)) != -1)
+    {
+      coord[1] = c;
+      coord[0] = 0;
+    }
+  if( (c = buttonname_to_SDLB (name)) != -1)
+    {
+      coord[1] = c;
+      coord[0] = 1;
+    }
+  return coord;
+}
+
+/**
+   \brief tells the CommandNode to run through all pending events and relay them accordingly
+*/
+void CommandNode::process ()
+{
+  if( bLocalInput) process_local ();
+  else process_network ();
+}
+
+void CommandNode::process_local ()
+{
+  SDL_Event event;
+  Command cmd;
+  
+  while( SDL_PollEvent (&event))
+    {
+      memset (cmd.cmd, 0, CMD_LENGHT); 
+      switch( event.type)
 	{
-		printf("Could not find key bindings in %s\n", filename);
-		return;
+	case SDL_KEYDOWN:
+	  strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
+	  cmd.bUp = false;
+	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  break;
+	case SDL_KEYUP:
+	  strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]);
+	  cmd.bUp = true;
+	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  break;
+	case SDL_MOUSEMOTION:
+	  strcpy( cmd.cmd, "cursor");
+	  cmd.x = event.motion.x;
+	  cmd.y = event.motion.y;
+	  cmd.xrel = event.motion.xrel;
+	  cmd.yrel = event.motion.yrel;
+	  break;
+	case SDL_MOUSEBUTTONUP:
+	  strcpy( cmd.cmd, aliases->buttons[event.button.button]);
+	  cmd.bUp = true;
+	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  break;
+	case SDL_MOUSEBUTTONDOWN:
+	  strcpy( cmd.cmd, aliases->buttons[event.button.button]);
+	  cmd.bUp = false;
+	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  break;
+	case SDL_JOYAXISMOTION:
+	case SDL_JOYBALLMOTION:
+	case SDL_JOYHATMOTION:
+	case SDL_JOYBUTTONDOWN:
+	case SDL_JOYBUTTONUP:
+	  break;
+	default:
+	  Orxonox *orx = Orxonox::getInstance();
+	  orx->event_handler (&event);
+	  
+	  break;
 	}
-			// allocate empty lookup table
-	aliases = (KeyBindings*) calloc (1, sizeof (KeyBindings));
-	
-	char namebuf[256];
-	char valuebuf[256];
-	memset (namebuf, 0, 256);
-	memset (valuebuf, 0, 256);
-	int* index;
-
-	while( parser.next_var (namebuf, valuebuf) != -1)
-	{
-		index = name_to_index (namebuf);
-		switch( index[0])
-		{
-			case 0:
-				printf("Key binding %d(%s) set to %s\n", index[1], SDLK_to_keyname( index[1]), valuebuf);
-				strcpy (aliases->keys[index[1]], valuebuf);
-				break;
-			case 1:
-				printf("Button binding %d(%s) set to %s\n", index[1], SDLB_to_buttonname( index[1]), valuebuf);
-				strcpy (aliases->buttons[index[1]], valuebuf);
-				break;
-			default:
-				break;
-		}
-		memset (namebuf, 0, 256);
-		memset (valuebuf, 0, 256);
-	}
-}
-
-/**
-	\brief binds a WorldEntity to the CommandNode
-	\param entity: Pointer to the entity to bind
-*/
-void CommandNode::bind (WorldEntity* entity)
-{
-	bound->add (entity, LIST_ADD_NEXT, true);
-}
-
-/**
-	\brief removes an entity from the list of the CommandNode
-	\param entity: Pointer to the entity to relese
-*/
-void CommandNode::unbind (WorldEntity* entity)
-{
-	bound->remove (entity, LIST_FIND_FW);
-}
-
-int* CommandNode::name_to_index (char* name)
-{
-	coord[0] = -1;
-	coord[1] = -1;
-	int c;
-	if( (c = keyname_to_SDLK (name)) != -1)
-	{
-		coord[1] = c;
-		coord[0] = 0;
-	}
-	if( (c = buttonname_to_SDLB (name)) != -1)
-	{
-		coord[1] = c;
-		coord[0] = 1;
-	}
-	return coord;
-}
-
-/**
-	\brief tells the CommandNode to run through all pending events and relay them accordingly
-*/
-void CommandNode::process ()
-{
-	if( bLocalInput) process_local ();
-	else process_network ();
-}
-
-void CommandNode::process_local ()
-{
-	SDL_Event event;
-	Command cmd;
-	
-	while( SDL_PollEvent (&event))
-	{
-		memset (cmd.cmd, 0, CMD_LENGHT); 
-		switch( event.type)
-		{
-			case SDL_KEYDOWN:
-				strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
-				cmd.bUp = false;
-				if( strlen (cmd.cmd) > 0) relay (&cmd);
-				break;
-			case SDL_KEYUP:
-				strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]);
-				cmd.bUp = true;
-				if( strlen (cmd.cmd) > 0) relay (&cmd);
-				break;
-			case SDL_MOUSEMOTION:
-				strcpy( cmd.cmd, "cursor");
-				cmd.x = event.motion.x;
-				cmd.y = event.motion.y;
-				cmd.xrel = event.motion.xrel;
-				cmd.yrel = event.motion.yrel;
-				break;
-			case SDL_MOUSEBUTTONUP:
-				strcpy( cmd.cmd, aliases->buttons[event.button.button]);
-				cmd.bUp = true;
-				if( strlen (cmd.cmd) > 0) relay (&cmd);
-				break;
-			case SDL_MOUSEBUTTONDOWN:
-				strcpy( cmd.cmd, aliases->buttons[event.button.button]);
-				cmd.bUp = false;
-				if( strlen (cmd.cmd) > 0) relay (&cmd);
-				break;
-			case SDL_JOYAXISMOTION:
-			case SDL_JOYBALLMOTION:
-			case SDL_JOYHATMOTION:
-			case SDL_JOYBUTTONDOWN:
-			case SDL_JOYBUTTONUP:
-				break;
-			default:
-  				Orxonox *orx = Orxonox::getInstance();
-  				orx->event_handler (&event);
-				break;
-		}
-	}
+    }
 }
 
@@ -219,25 +221,27 @@
 void CommandNode::relay (Command* cmd)
 {
-printf("CommandNode|relay()\n");
-	List<WorldEntity>* plist = bound;
-	
-	Orxonox *orx = Orxonox::getInstance();
-	if( orx->system_command (cmd)) return;
-		
-	if( bLocalInput) send_over_network (cmd);
-	
-	while( (plist = plist->get_next()) != NULL)
-	{
-		plist->get_object()->command (cmd);
-	}
-}
-
-/**
-	\brief sets the network identifier of the CommandNode
-	\param ID: the new ID to use
+  //printf("CommandNode|relay()\n");
+  List<WorldEntity>* plist = bound;
+  
+  Orxonox *orx = Orxonox::getInstance();
+  if( orx->system_command (cmd)) return;
+  GameLoader* gl = GameLoader::getInstance();
+  if(gl->worldCommand(cmd)) return;
+  
+  if( bLocalInput) send_over_network (cmd);
+  
+  while( (plist = plist->get_next()) != NULL)
+    {
+      plist->get_object()->command (cmd);
+    }
+}
+
+/**
+   \brief sets the network identifier of the CommandNode
+   \param ID: the new ID to use
 */
 void CommandNode::set_netID (int ID)
 {
-	netID = ID;
+  netID = ID;
 }
 
Index: orxonox/branches/buerli/src/error.h
===================================================================
--- orxonox/branches/buerli/src/error.h	(revision 2706)
+++ orxonox/branches/buerli/src/error.h	(revision 2707)
@@ -22,5 +22,35 @@
 */ 
 
+// this are the two undefined error nr. Don't use them ...
+#define ERROR -1
+#define NERROR 0
 
-#define ERROR -1
-#define NO_ERROR 0
+/*!
+    \brief Error Definitions:
+
+    Error Classes:
+    0xx application framework codes
+    1xx graphics codes
+    2xx file/FS codes
+    3xx network codes
+    4xx general codes
+
+    Error Specifier 1:
+    x0x action finsished as desired
+    x1x initialisation error
+    x2x execution error
+    x3x uninitialisation error
+
+    Error Specifier 2:
+    xx0 no further informations
+    xx1 only a warning - feel free to ignore, the program will proceed
+    xx2 this could lead unexpected behaviour
+    xx3 this is a fatal error - you are invited to quit the program - panic!
+*/
+
+typedef struct 
+{
+  int code;
+  char* message;
+  char* location;
+} Error;
Index: orxonox/branches/buerli/src/game_loader.cc
===================================================================
--- orxonox/branches/buerli/src/game_loader.cc	(revision 2707)
+++ orxonox/branches/buerli/src/game_loader.cc	(revision 2707)
@@ -0,0 +1,180 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+
+#include "game_loader.h"
+#include "campaign.h"
+#include "world.h"
+#include "player.h"
+#include "orxonox.h"
+#include "camera.h"
+#include "command_node.h"
+#include "vector.h"
+#include "track.h"
+
+#include <string.h>
+
+
+using namespace std;
+
+
+GameLoader* GameLoader::singletonRef = 0;
+
+
+GameLoader::GameLoader () {}
+
+
+GameLoader::~GameLoader () {}
+
+
+GameLoader* GameLoader::getInstance()
+{
+  if(singletonRef == NULL)
+    singletonRef = new GameLoader();
+  return singletonRef;
+}
+
+
+Error GameLoader::init()
+{
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->init();
+}
+
+
+Error GameLoader::loadCampaign(char* name)
+{
+  Error errorCode;
+  
+  this->currentCampaign = this->fileToCampaign(name);
+}
+
+Error GameLoader::loadDebugCampaign(Uint32 campaignID)
+{
+  switch(campaignID)
+    {
+      // Debug Level 0: Debug level used to test the base frame work.
+    case DEBUG_CAMPAIGN_0:
+      {
+	Campaign* debugCampaign = new Campaign();
+	World* world0 = new World(DEBUG_WORLD_0);
+	world0->setNextStoryID(DEBUG_WORLD_1);
+	debugCampaign->addEntity(world0, WORLD_ID_0);
+	World* world1 = new World(DEBUG_WORLD_1);
+	world1->setNextStoryID(WORLD_ID_GAMEEND);
+	debugCampaign->addEntity(world1, WORLD_ID_1);
+
+	this->currentCampaign = debugCampaign;
+	break;
+      }
+    }
+}
+
+Error GameLoader::start()
+{
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->start();
+}
+
+
+Error GameLoader::stop()
+{
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->stop();
+  this->currentCampaign = NULL;
+}
+
+
+Error GameLoader::pause()
+{
+  this->isPaused = true;
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->pause();
+}
+
+
+Error GameLoader::resume()
+{
+  this->isPaused = false;
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->resume();
+}
+
+Error GameLoader::free()
+{}
+
+
+
+
+
+Campaign* GameLoader::fileToCampaign(char *name)
+{
+  /* do not entirely load the campaign. just the current world
+     before start of each world, it has to be initialized so it
+     can load everything it needs into memory then.
+  */
+}
+
+
+/**
+   \brief handle keyboard commands 
+   \param cmd: the command to handle
+   \return true if the command was handled by the system
+*/
+bool GameLoader::worldCommand (Command* cmd)
+{
+  if( !strcmp( cmd->cmd, "up_world"))
+    {
+      if( !cmd->bUp) 
+	{
+	  this->nextLevel();
+	}
+      return true;
+    }
+  else if( !strcmp( cmd->cmd, "down_world"))
+    {
+      if( !cmd->bUp)
+	{
+	  this->previousLevel();
+	}
+      return true;
+    }
+  else if( !strcmp( cmd->cmd, "pause"))
+    {
+      if( !cmd->bUp)
+	{
+	  if(this->isPaused)
+	    this->resume();
+	  else
+	    this->pause();
+	}
+      return true;
+    }
+  return false;
+}
+
+void GameLoader::nextLevel()
+{
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->nextLevel();
+}
+
+void GameLoader::previousLevel()
+{
+  if(this->currentCampaign != NULL)
+    this->currentCampaign->previousLevel();
+}
Index: orxonox/branches/buerli/src/game_loader.h
===================================================================
--- orxonox/branches/buerli/src/game_loader.h	(revision 2707)
+++ orxonox/branches/buerli/src/game_loader.h	(revision 2707)
@@ -0,0 +1,49 @@
+#ifndef GAME_LOADER_H
+#define GAME_LOADER_H
+
+#include "stdincl.h"
+#include "story_def.h"
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class Campaign;
+class World;
+class Camera;
+class CammandNode;
+
+
+class GameLoader 
+{
+
+ public:
+  static GameLoader* getInstance();
+
+  Error init();
+  Error loadCampaign(char* name);
+  Error start();
+  Error stop();
+  Error pause();
+  Error resume();
+  Error free();
+
+  void nextLevel();
+  void previousLevel();
+
+  bool worldCommand(Command* cmd);
+  Error loadDebugCampaign(Uint32 campaignID);
+  
+ private:
+  GameLoader ();
+  ~GameLoader ();
+  Uint32 startTime; //!> start time of the campaign
+  static GameLoader* singletonRef;
+  bool isPaused;
+
+  Campaign* currentCampaign; //!> the current campaign playing
+  
+  Campaign* fileToCampaign(char* name);
+
+};
+
+#endif
Index: orxonox/branches/buerli/src/list.h
===================================================================
--- orxonox/branches/buerli/src/list.h	(revision 2706)
+++ orxonox/branches/buerli/src/list.h	(revision 2707)
@@ -1,2 +1,21 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Christian Meyer
+
+   ADDONS/FIXES:
+  
+   Patrick Boenzli     :          Implemented getSize() function
+*/
+
+
 /*!
   \file list.h
@@ -21,4 +40,5 @@
   List<T>* prev;
   bool bReference;
+  int size;
   
  public:
@@ -35,4 +55,5 @@
   void set_prev (List<T>* ptr);
   int remove (T* obj, FINDMODE mode);
+  int getSize();
 };
 
@@ -52,4 +73,6 @@
   prev = p;
   bReference = bRef;
+  if(obj != NULL)
+    ++size;
 }
 
@@ -127,4 +150,5 @@
       break;
   }
+  ++size;
   return 0;
 }
@@ -224,4 +248,5 @@
     }
   }
+  --size;
   return 0;
 }
@@ -262,4 +287,13 @@
 
 
+/**
+  \brief Returns the current size of the List
+  \return Size of List
+*/
+template<class T>
+int List<T>::getSize()
+{
+  return this->size;
+}
 
 #endif
Index: orxonox/branches/buerli/src/orxonox.cc
===================================================================
--- orxonox/branches/buerli/src/orxonox.cc	(revision 2706)
+++ orxonox/branches/buerli/src/orxonox.cc	(revision 2707)
@@ -29,4 +29,5 @@
 #include "data_tank.h"
 #include "command_node.h"
+#include "game_loader.h"
 #include <string.h>
 
@@ -34,5 +35,5 @@
 
 /**
-	\brief create a new Orxonox
+   \brief create a new Orxonox
 */
 Orxonox::Orxonox ()
@@ -42,13 +43,13 @@
 
 /**
-	\brief remove Orxonox from memory
+   \brief remove Orxonox from memory
 */
 Orxonox::~Orxonox () 
 {
-	Orxonox::singleton_ref = NULL;
-	if( world != NULL) delete world;
-	if( localinput != NULL) delete world;
-	if( localcamera != NULL) delete localcamera;
-	if( resources != NULL) delete resources;
+  Orxonox::singleton_ref = NULL;
+  if( world != NULL) delete world;
+  if( localinput != NULL) delete world;
+  if( localcamera != NULL) delete localcamera;
+  if( resources != NULL) delete resources;
 }
 
@@ -65,63 +66,63 @@
 
 /**
-	\brief this finds the config file
-	
-	Since the config file varies from user to user and since one may want to specify different config files
-	for certain occasions or platforms this function finds the right config file for every occasion and stores
-	it's path and name into configfilename
+   \brief this finds the config file
+   
+   Since the config file varies from user to user and since one may want to specify different config files
+   for certain occasions or platforms this function finds the right config file for every occasion and stores
+   it's path and name into configfilename
 */
 void Orxonox::get_config_file (int argc, char** argv)
 {
-/*	char* path;
-	#ifdef __WIN32__
-	path = getenv("");
-	#else
-	path = getenv("HOME");
-	#endif
-	
-	if( path != NULL) strcpy (configfilename, path);
-	else strcpy (configfilename, "./");
-	strcat (configfilename, "/.orxonox.conf");*/
-	
-	strcpy (configfilename, "orxonox.conf");
-}
-
-/**
-	\brief initialize Orxonox with command line
+  /*	char* path;
+    #ifdef __WIN32__
+    path = getenv("");
+    #else
+    path = getenv("HOME");
+    #endif
+    
+    if( path != NULL) strcpy (configfilename, path);
+    else strcpy (configfilename, "./");
+    strcat (configfilename, "/.orxonox.conf");*/
+  
+  strcpy (configfilename, "orxonox.conf");
+}
+
+/**
+   \brief initialize Orxonox with command line
 */
 int Orxonox::init (int argc, char** argv)
 {
-		// parse command line
-		// config file
-		
-	get_config_file (argc, argv);
-	
-		// initialize SDL
+  // parse command line
+  // config file
+  
+  get_config_file (argc, argv);
+  
+  // initialize SDL
   printf("> Initializing SDL\n");
   if( SDL_Init (SDL_INIT_EVERYTHING) == -1)
-  {
-    printf ("Could not SDL_Init(): %s\n", SDL_GetError());
-    return -1;
-  }
-  
-  	// initialize everything
+    {
+      printf ("Could not SDL_Init(): %s\n", SDL_GetError());
+      return -1;
+    }
+  
+  // initialize everything
   printf("> Initializing video\n");
-	if( init_video () == -1) return -1;
+  if( init_video () == -1) return -1;
   printf("> Initializing sound\n");
-	if( init_sound () == -1) return -1;
+  if( init_sound () == -1) return -1;
   printf("> Initializing input\n");
-	if( init_input () == -1) return -1;
+  if( init_input () == -1) return -1;
   printf("> Initializing networking\n");
-	if( init_networking () == -1) return -1;
+  if( init_networking () == -1) return -1;
   printf("> Initializing resources\n");
-	if( init_resources () == -1) return -1;
-  printf("> Initializing world\n");
-	if( init_world () == -1) return -1;
-	
-	return 0;
-}
-
-/**
-	\brief initializes SDL and OpenGL
+  if( init_resources () == -1) return -1;
+  //printf("> Initializing world\n");
+  //if( init_world () == -1) return -1; PB: world will be initialized when started
+  
+  return 0;
+}
+
+/**
+   \brief initializes SDL and OpenGL
 */
 int Orxonox::init_video () 
@@ -161,70 +162,88 @@
   
   // create camera
-  localcamera = new Camera();
-  
-  return 0;
-}
-
-/**
-	\brief initializes the sound engine
+  localcamera = new Camera(world);
+  
+  return 0;
+}
+
+/**
+   \brief initializes the sound engine
 */
 int Orxonox::init_sound () 
 {
-	printf("Not yet implemented\n");
-	return 0;
-}
-
-/**
-	\brief initializes input functions
+  printf("Not yet implemented\n");
+  return 0;
+}
+
+/**
+   \brief initializes input functions
 */
 int Orxonox::init_input () 
 {
-	// create localinput
-	localinput = new CommandNode( configfilename);
-	
-	return 0;
-}
-
-/**
-	\brief initializes network system
+  // create localinput
+  localinput = new CommandNode( configfilename);
+  
+  return 0;
+}
+
+/**
+   \brief initializes network system
 */
 int Orxonox::init_networking () 
 {
-	printf("Not yet implemented\n");
-	return 0;
-}
-
-/**
-	\brief initializes and loads resource files
+  printf("Not yet implemented\n");
+  return 0;
+}
+
+/**
+   \brief initializes and loads resource files
 */
 int Orxonox::init_resources () 
 {
-	printf("Not yet implemented\n");
-	return 0;
-}
-
-/**
-	\brief initializes the world
+  printf("Not yet implemented\n");
+  return 0;
+}
+
+/**
+   \brief initializes the world
 */
 int Orxonox::init_world () 
 {
-	world = new World();
-	
-	// TO DO: replace this with a menu/intro
-	world->load_debug_level();
-	
-	return 0;
-}
-
-/**
-	\brief exits Orxonox
+  //world = new World();
+  
+  // TO DO: replace this with a menu/intro
+  //world->load_debug_level();
+  
+  return 0;
+}
+
+
+/**
+   \brief starts the orxonox game or menu
+
+   here is the central orxonox state manager. There are currently two states
+   - menu
+   - game-play
+   both states manage their states themselfs again.
+*/
+void Orxonox::start()
+{
+  
+  this->gameLoader = GameLoader::getInstance();
+  this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0);
+  this->gameLoader->init();
+  this->gameLoader->start();
+}
+
+/**
+   \brief exits Orxonox
 */
 void Orxonox::quitGame() 
 {
-	bQuitOrxonox = true;
-}
-
-/**
-	\brief this runs all of Orxonox
+  bQuitOrxonox = true;
+}
+
+/**
+   \brief this runs all of Orxonox
 */
 void Orxonox::mainLoop()
@@ -236,6 +255,4 @@
   while( !bQuitOrxonox)
     {
-      printf("<==");
-
       // Network
       synchronize();
@@ -248,6 +265,4 @@
       // Draw
       display();
-
-      printf(">\n");
     }
   printf("Orxonox|Exiting the main loop\n");
@@ -255,33 +270,33 @@
 
 /**
-	\brief handles sprecial events from localinput
-	\param event: an event not handled by the CommandNode 
+   \brief handles sprecial events from localinput
+   \param event: an event not handled by the CommandNode 
 */
 void Orxonox::event_handler (SDL_Event* event)
 {
-	// Handle special events such as reshape, quit, focus changes
-}
-
-/**
-	\brief synchronize local data with remote data
+  // Handle special events such as reshape, quit, focus changes
+}
+
+/**
+   \brief synchronize local data with remote data
 */
 void Orxonox::synchronize ()
 {
-	// Get remote input
-	// Update synchronizables
-}
-
-/**
-	\brief run all input processing
+  // Get remote input
+  // Update synchronizables
+}
+
+/**
+   \brief run all input processing
 */
 void Orxonox::handle_input ()
 {
-	// localinput
-		localinput->process();
-	// remoteinput
-}
-
-/**
-	\brief advance the timeline
+  // localinput
+  localinput->process();
+  // remoteinput
+}
+
+/**
+   \brief advance the timeline
 */
 void Orxonox::time_slice ()
@@ -295,5 +310,5 @@
 	{
 	  float fps = 1000/dt;
-	  printf("%f", fps);
+	  printf("fps = %f\n", fps);
 	}
       
@@ -306,82 +321,84 @@
 
 /**
-	\brief compute collision detection
+   \brief compute collision detection
 */
 void Orxonox::collision ()
 {
-	world->collide ();
-}
-
-/**
-	\brief handle keyboard commands that are not meant for WorldEntities
-	\param cmd: the command to handle
-	\return true if the command was handled by the system or false if it may be passed to the WorldEntities
+  world->collide ();
+}
+
+/**
+   \brief handle keyboard commands that are not meant for WorldEntities
+   \param cmd: the command to handle
+   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
 */
 bool Orxonox::system_command (Command* cmd)
 {
-	if( !strcmp( cmd->cmd, "quit"))
-	{
-		if( !cmd->bUp) bQuitOrxonox = true;
-		return true;
-	}
-	return false;
-}
-
-/**
-	\brief render the current frame
+  if( !strcmp( cmd->cmd, "quit"))
+    {
+      if( !cmd->bUp) this->gameLoader->stop();
+      return true;
+    }
+  return false;
+}
+
+/**
+   \brief render the current frame
 */
 void Orxonox::display ()
 {
-		// clear buffer
-	glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-		// set camera
-	localcamera->apply ();
-		// draw world
-	world->draw ();
-		// draw HUD
-		// flip buffers
-	SDL_GL_SwapBuffers();
-}
-
-/**
-	\brief retrieve a pointer to the local Camera
-	\return a pointer to localcamera
+  // clear buffer
+  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+  // set camera
+  localcamera->apply ();
+  // draw world
+  world->draw ();
+  // draw HUD
+  // flip buffers
+  SDL_GL_SwapBuffers();
+}
+
+/**
+   \brief retrieve a pointer to the local Camera
+   \return a pointer to localcamera
 */
 Camera* Orxonox::get_camera ()
 {
-	return localcamera;
-}
-
-/**
-	\brief retrieve a pointer to the local CommandNode
-	\return a pointer to localinput
+  return localcamera;
+}
+
+/**
+   \brief retrieve a pointer to the local CommandNode
+   \return a pointer to localinput
 */
 CommandNode* Orxonox::get_localinput ()
 {
-	return localinput;
-}
-
-/**
-	\brief retrieve a pointer to the local World
-	\return a pointer to world
+  return localinput;
+}
+
+/**
+   \brief retrieve a pointer to the local World
+   \return a pointer to world
 */
 World* Orxonox::get_world ()
 {
-	return world;
+  return world;
 }
 
 int main (int argc, char** argv) 
 {  
-	printf(">>> Starting Orxonox <<<\n");
+  printf(">>> Starting Orxonox <<<\n");
   Orxonox *orx = Orxonox::getInstance();
   
   if( (*orx).init(argc, argv) == -1)
-  {
-    printf("! Orxonox initialization failed\n");
-    return -1;
-  }
-	
-  (*orx).mainLoop();
-
+    {
+      printf("! Orxonox initialization failed\n");
+      return -1;
+    }
+  
+  //(*orx).mainLoop();
+
+  orx->start();
+  
   //delete orx;
   
Index: orxonox/branches/buerli/src/orxonox.conf
===================================================================
--- orxonox/branches/buerli/src/orxonox.conf	(revision 2706)
+++ orxonox/branches/buerli/src/orxonox.conf	(revision 2707)
@@ -6,6 +6,10 @@
 SPACE=fire
 ESCAPE=quit
+p=pause
 q=quit
 BUTTON_LEFT=fire
 BUTTON_RIGHT=altfire
 b=benscho
+x=up_world
+z=down_world
+
Index: orxonox/branches/buerli/src/orxonox.h
===================================================================
--- orxonox/branches/buerli/src/orxonox.h	(revision 2706)
+++ orxonox/branches/buerli/src/orxonox.h	(revision 2707)
@@ -16,4 +16,5 @@
 class World;
 class Camera;
+class GameLoader;
 
 //! Orxonox core singleton class
@@ -33,12 +34,13 @@
   Camera* localcamera;
   SDL_Surface* screen;
+  GameLoader* gameLoader;
   
   bool bQuitOrxonox;
   bool pause;
-	Uint32 lastframe;
-
-	void get_config_file (int argc, char** argv);
-	
-		// main loop functions
+  Uint32 lastframe;
+  
+  void get_config_file (int argc, char** argv);
+  
+  // main loop functions
   void synchronize ();
   void handle_input ();
@@ -57,4 +59,5 @@
  public:
   static Orxonox* getInstance ();
+  void start();
   void quitGame();
 
@@ -63,9 +66,9 @@
 
   int init (int argc, char** argv);
-	
-	CommandNode* get_localinput();
-	Camera* get_camera();
-	World* get_world();
-	
+  
+  CommandNode* get_localinput();
+  Camera* get_camera();
+  World* get_world();
+  
   void mainLoop();
 };
Index: orxonox/branches/buerli/src/player.cc
===================================================================
--- orxonox/branches/buerli/src/player.cc	(revision 2706)
+++ orxonox/branches/buerli/src/player.cc	(revision 2707)
@@ -62,14 +62,14 @@
 void Player::command (Command* cmd)
 {
-	printf("Player|recieved command [%s]\n", cmd->cmd);
-	if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
-	else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
-	else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
-	else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
-	else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
+  //printf("Player|recieved command [%s]\n", cmd->cmd);
+  if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
 }
 
 void Player::draw ()
-{
+{ 
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
Index: orxonox/branches/buerli/src/stdincl.h
===================================================================
--- orxonox/branches/buerli/src/stdincl.h	(revision 2706)
+++ orxonox/branches/buerli/src/stdincl.h	(revision 2707)
@@ -15,4 +15,5 @@
 #include "coordinates.h"
 #include "list.h"
+#include "error.h"
 #include "message_structures.h"
 #include "orxonox.h"
Index: orxonox/branches/buerli/src/story_def.h
===================================================================
--- orxonox/branches/buerli/src/story_def.h	(revision 2707)
+++ orxonox/branches/buerli/src/story_def.h	(revision 2707)
@@ -0,0 +1,24 @@
+
+#ifndef STORY_DEF_H
+#define STORY_DEF_H
+
+
+#define DEBUG_CAMPAIGN_0 0
+#define DEBUG_CAMPAIGN_1 1
+#define DEBUG_CAMPAIGN_2 2
+
+#define DEBUG_WORLD_0 0
+#define DEBUG_WORLD_1 1
+#define DEBUG_WORLD_2 2
+
+#define WORLD_ID_0 0
+#define WORLD_ID_1 1
+#define WORLD_ID_2 2
+#define WORLD_ID_3 3
+#define WORLD_ID_4 4
+#define WORLD_ID_5 5
+#define WORLD_ID_GAMEEND 999
+
+#define MAX_STORY_ENTITIES 99; //!> maximal StoryEntities in a Campaign
+
+#endif
Index: orxonox/branches/buerli/src/story_entity.cc
===================================================================
--- orxonox/branches/buerli/src/story_entity.cc	(revision 2707)
+++ orxonox/branches/buerli/src/story_entity.cc	(revision 2707)
@@ -0,0 +1,87 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: 
+*/
+
+
+#include "story_entity.h"
+
+
+using namespace std;
+
+
+
+StoryEntity::StoryEntity () {}
+StoryEntity::~StoryEntity () {}
+
+
+/** 
+    \brief initialize the entity before use. 
+
+    After execution of this function, the Entity is ready to be played/executed, 
+    this shifts the initialisation work before the execution - very important...
+    
+*/
+Error StoryEntity::init()
+{}
+
+
+void StoryEntity::setStoryID(Uint32 storyID)
+{
+  this->storyID = storyID;
+}
+
+int StoryEntity::getStoryID()
+{
+  return this->storyID;
+}
+
+
+void StoryEntity::setNextStoryID(Uint32 nextStoryID)
+{
+  this->nextStoryID = nextStoryID;
+}
+
+Uint32 StoryEntity::getNextStoryID()
+{
+  return this->nextStoryID;
+}
+
+
+Error StoryEntity::start(Uint32 storyID)
+{}
+
+Error StoryEntity::start()
+{}
+
+Error StoryEntity::stop()
+{}
+
+Error StoryEntity::pause()
+{}
+
+Error StoryEntity::resume()
+{}
+
+
+void StoryEntity::load()
+{}
+
+
+void StoryEntity::displayEntityScreen()
+{}
+
+void StoryEntity::releaseEntityScreen()
+{}
Index: orxonox/branches/buerli/src/story_entity.h
===================================================================
--- orxonox/branches/buerli/src/story_entity.h	(revision 2707)
+++ orxonox/branches/buerli/src/story_entity.h	(revision 2707)
@@ -0,0 +1,41 @@
+
+#ifndef STORY_ENTITY_H
+#define STORY_ENTITY_H
+
+#include "stdincl.h"
+#include "story_def.h"
+
+class StoryEntity {
+
+ public:
+  StoryEntity ();
+  ~StoryEntity ();
+
+  bool isInit;
+  bool isPaused;
+
+  virtual Error init();
+  virtual Error start(Uint32 storyID);
+  virtual Error start();
+  virtual Error stop();
+  virtual Error pause();
+  virtual Error resume();
+
+  virtual void load();
+
+  virtual void displayEntityScreen();
+  virtual void releaseEntityScreen();
+
+  void setStoryID(Uint32 storyID);
+  int getStoryID();
+
+  void setNextStoryID(Uint32 nextStoryID);
+  Uint32 getNextStoryID();
+
+
+ private:
+  Uint32 storyID;
+  Uint32 nextStoryID;
+};
+
+#endif
Index: orxonox/branches/buerli/src/track.cc
===================================================================
--- orxonox/branches/buerli/src/track.cc	(revision 2706)
+++ orxonox/branches/buerli/src/track.cc	(revision 2707)
@@ -52,4 +52,10 @@
 {
 }
+
+void Track::init()
+{
+  
+}
+
 
 /**
Index: orxonox/branches/buerli/src/track.h
===================================================================
--- orxonox/branches/buerli/src/track.h	(revision 2706)
+++ orxonox/branches/buerli/src/track.h	(revision 2707)
@@ -27,13 +27,14 @@
  	
  public:
- 	Track ();
+  Track ();
   Track (Uint32 number, Uint32 next, Vector* start, Vector* finish);
   ~Track ();
-	
-	virtual void post_enter (WorldEntity* entity);	// handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
-	virtual void post_leave (WorldEntity* entity);
-	virtual void tick (float deltaT);
-	virtual void map_camera (Location* lookat, Placement* camplc);
-	virtual bool map_coords (Location* loc, Placement* plc);	// this should return true if the entity left track boundaries
+  virtual void init();
+  
+  virtual void post_enter (WorldEntity* entity);	// handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
+  virtual void post_leave (WorldEntity* entity);
+  virtual void tick (float deltaT);
+  virtual void map_camera (Location* lookat, Placement* camplc);
+  virtual bool map_coords (Location* loc, Placement* plc);	// this should return true if the entity left track boundaries
 };
 
Index: orxonox/branches/buerli/src/world.cc
===================================================================
--- orxonox/branches/buerli/src/world.cc	(revision 2706)
+++ orxonox/branches/buerli/src/world.cc	(revision 2707)
@@ -31,7 +31,16 @@
     This creates a new empty world!
 */
-World::World ()
-{
-  entities = new List<WorldEntity>();
+World::World (char* name)
+{
+  this->worldName = name;
+  this->debugWorldNr = -1;
+  this->entities = new List<WorldEntity>();
+}
+
+World::World (int worldID)
+{
+  this->debugWorldNr = worldID;
+  this->worldName = NULL;
+  this->entities = new List<WorldEntity>();
 }
 
@@ -41,7 +50,125 @@
 World::~World ()
 {
-  unload ();
-  delete entities;
-}
+  Orxonox *orx = Orxonox::getInstance();
+  orx->get_localinput()->unbind (this->localPlayer);
+  delete this->entities;
+  delete this->localCamera;
+}
+
+
+/** 
+    \brief initialize the world before use.
+*/
+Error World::init()
+{
+  this->bPause = false;
+}
+
+Error World::start()
+{
+  this->mainLoop();
+}
+
+Error World::stop()
+{
+  this->bQuitCurrentGame = true;
+  this->localCamera->setWorld(NULL);
+  this->~World();
+}
+
+Error World::pause()
+{
+  this->isPaused = true;
+}
+
+Error World::resume()
+{
+  this->isPaused = false;
+}
+
+void World::load()
+{
+  if(this->debugWorldNr != -1)
+    {
+      switch(this->debugWorldNr)
+	{
+	case DEBUG_WORLD_0:
+	  {
+	    // create some path nodes
+	    this->pathnodes = new Vector[6];
+	    this->pathnodes[0] = Vector(0, 0, 0);
+	    this->pathnodes[1] = Vector(-100, 40, 0);
+	    this->pathnodes[2] = Vector(-100, 140, 0);
+	    this->pathnodes[3] = Vector(0, 180, 0);
+	    this->pathnodes[4] = Vector(100, 140, 0);
+	    this->pathnodes[5] = Vector(100, 40, 0);
+	    
+	    // create the tracks
+	    this->tracklen = 6;
+	    this->track = new Track[6];
+	    for( int i = 0; i < this->tracklen; i++)
+	      {
+		this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
+	      }
+	    
+	    // create a player
+	    //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
+	    WorldEntity* myPlayer = new Player();
+	    this->spawn(myPlayer);
+	    this->localPlayer = myPlayer;	    
+
+	    // bind input
+	    Orxonox *orx = Orxonox::getInstance();
+	    orx->get_localinput()->bind (myPlayer);
+	    
+	    // bind camera
+	    this->localCamera = new Camera(this);
+	    this->getCamera()->bind (myPlayer);	
+	    break;
+	  }
+	case DEBUG_WORLD_1:
+	  {
+	    // create some path nodes
+	    this->pathnodes = new Vector[6];
+	    this->pathnodes[0] = Vector(0, 0, 0);
+	    this->pathnodes[1] = Vector(20, 10, 10);
+	    this->pathnodes[2] = Vector(40, 0, 10);
+	    this->pathnodes[3] = Vector(60, 10, 0);
+	    this->pathnodes[4] = Vector(80, 20, 10);
+	    this->pathnodes[5] = Vector(30, 50, 0);
+	    
+	    // create the tracks
+	    this->tracklen = 6;
+	    this->track = new Track[6];
+	    for( int i = 0; i < this->tracklen; i++)
+	      {
+		this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
+	      }
+	    
+	    // create a player
+	    //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
+	    WorldEntity* myPlayer = new Player();
+	    this->spawn(myPlayer);
+	    this->localPlayer = myPlayer;
+	    
+	    // bind input
+	    Orxonox *orx = Orxonox::getInstance();
+	    orx->get_localinput()->bind (myPlayer);
+	    
+	    // bind camera
+	    this->localCamera = new Camera(this);
+	    this->getCamera()->bind (myPlayer);	
+	    break;
+	  }
+	default:
+	  printf("World::load() - no world with ID %i found", this->debugWorldNr );
+	}
+    }
+  else if(this->worldName != NULL)
+    {
+
+    }
+}
+
 
 /** 
@@ -254,36 +381,5 @@
 }
 
-/**
-   \brief loads a simple level for testing purposes
-*/
-void World::load_debug_level()
-{
-  // create some path nodes
-  pathnodes = new Vector[6];
-  pathnodes[0] = Vector(0, 0, 0);
-  pathnodes[1] = Vector(-100, 40, 0);
-  pathnodes[2] = Vector(-100, 140, 0);
-  pathnodes[3] = Vector(0, 180, 0);
-  pathnodes[4] = Vector(100, 140, 0);
-  pathnodes[5] = Vector(100, 40, 0);	
-  
-  // create the tracks
-  tracklen = 6;
-  track = new Track[6];
-  for( int i = 0; i < tracklen; i++)
-    {
-      track[i] = Track( i, (i+1)%tracklen, &pathnodes[i], &pathnodes[(i+1)%tracklen]);
-    }
-  
-  // create a player
-  WorldEntity* myPlayer = (WorldEntity*) spawn<Player>();
-  
-  // bind input
-  Orxonox *orx = Orxonox::getInstance();
-  orx->get_localinput()->bind (myPlayer);
-  
-  // bind camera
-  orx->get_camera()->bind (myPlayer);
-}
+
 
 /**
@@ -295,2 +391,168 @@
   track[loc->part].map_camera (loc, plc);
 }
+
+
+void World::setTrackLen(Uint32 len)
+{
+  this->tracklen = len;
+}
+
+int World::getTrackLen()
+{
+  return this->tracklen;
+}
+
+void World::debug()
+{
+  List<WorldEntity> *l;
+  WorldEntity* entity;
+  
+  printf("counting all entities\n");
+  l = entities->get_next();  
+  while( l != NULL ) 
+    { 
+      entity = l->get_object();
+      if( entity->bDraw ) printf("got an entity\n");
+      l = l->get_next();
+    }
+}
+
+
+void World::mainLoop()
+{
+  this->lastFrame = SDL_GetTicks();
+  this->bQuitOrxonox = false;
+  this->bQuitCurrentGame = false;
+  printf("World|Entering main loop\n");
+  while(!this->bQuitOrxonox && !this->bQuitCurrentGame) /* pause pause pause ?!?!?*/
+    {
+      //debug routine
+      //debug();
+      // Network
+      synchronize();
+      // Process input
+      handle_input();
+      // Process time
+      time_slice();
+      // Process collision
+      collision();
+      // Draw
+      display();
+    }
+  printf("World|Exiting the main loop\n");
+}
+
+/**
+   \brief synchronize local data with remote data
+*/
+void World::synchronize ()
+{
+  // Get remote input
+  // Update synchronizables
+}
+
+/**
+   \brief run all input processing
+*/
+void World::handle_input ()
+{
+  // localinput
+  Orxonox::getInstance()->get_localinput()->process();
+  // remoteinput
+}
+
+/**
+   \brief advance the timeline
+*/
+void World::time_slice ()
+{
+  Uint32 currentFrame = SDL_GetTicks();
+  if(!this->bPause)
+    {
+      Uint32 dt = currentFrame - this->lastFrame;
+      /*
+      if(dt > 0)
+	{
+	  float fps = 1000/dt;
+	  printf("fps = %f\n", fps);
+	}
+      else
+	{
+	  printf("fps = 1000\n");
+	}
+      */
+      this->time_slice (dt);
+      this->update ();
+      this->localCamera->time_slice (dt);
+    }
+  this->lastFrame = currentFrame;
+}
+
+/**
+   \brief compute collision detection
+*/
+void World::collision ()
+{
+  this->collide ();
+}
+
+/**
+   \brief handle keyboard commands that are not meant for WorldEntities
+   \param cmd: the command to handle
+   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
+*/
+bool World::system_command (Command* cmd)
+{
+  if( !strcmp( cmd->cmd, "quit"))
+    {
+      if( !cmd->bUp) this->bQuitOrxonox = true;
+      return true;
+    }
+  return false;
+}
+
+/**
+	\brief render the current frame
+*/
+void World::display ()
+{
+  // clear buffer
+  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+  // set camera
+  this->localCamera->apply ();
+  // draw world
+  this->draw();
+  // draw HUD
+  // flip buffers
+  SDL_GL_SwapBuffers();
+}
+
+Camera* World::getCamera()
+{
+  return this->localCamera;
+}
+
+
+void World::spawn(WorldEntity* entity)
+{
+  Location zeroloc;
+  Location* loc = NULL;
+  WorldEntity* owner;
+  //T* entity = new T();
+  entities->add (entity, LIST_ADD_NEXT);
+  //if( loc == NULL)
+  //{
+      zeroloc.dist = 0;
+      zeroloc.part = 0;
+      zeroloc.pos = Vector();
+      zeroloc.rot = Quaternion();
+      loc = &zeroloc;
+      //}
+  entity->init (loc, owner);
+  if (entity->bFree)
+    {
+      this->track[loc->part].map_coords( loc, entity->get_placement());
+    }
+  entity->post_spawn ();
+  //return entity;
+}
Index: orxonox/branches/buerli/src/world.h
===================================================================
--- orxonox/branches/buerli/src/world.h	(revision 2706)
+++ orxonox/branches/buerli/src/world.h	(revision 2707)
@@ -8,39 +8,75 @@
 
 #include "stdincl.h"
+#include "story_entity.h"
+
+
 
 class Track;
 class WorldEntity;
+class Camera;
 
 //! The game environment
-class World {
+class World : public StoryEntity {
 
  public:
-  World ();
+  World (char* name);
+  World (int worldID);
   ~World ();
 
-	template<typename T> 
-	  T* spawn(Location* loc, WorldEntity* owner);	// template to be able to spawn any derivation of WorldEntity
-	template<typename T> 
-	  T* spawn(Placement* plc, WorldEntity* owner);
+  template<typename T> 
+    T* spawn(Location* loc, WorldEntity* owner);	// template to be able to spawn any derivation of WorldEntity
+  template<typename T> 
+    T* spawn(Placement* plc, WorldEntity* owner);
+  
+  virtual Error init();
+  virtual Error start();
+  virtual Error stop();
+  virtual Error pause();
+  virtual Error resume();
 
-	void time_slice (Uint32 deltaT);
-	void collide ();
-	void draw ();
-	void update ();	// maps Locations to Placements
-	void calc_camera_pos (Location* loc, Placement* plc);
+  virtual void load();
+
+  void time_slice (Uint32 deltaT);
+  void collide ();
+  void draw ();
+  void update ();	// maps Locations to Placements
+  void calc_camera_pos (Location* loc, Placement* plc);
 	
-	void unload ();
-	
-	void load_debug_level ();
-	
+  void unload ();
+  
+  void setTrackLen(Uint32 tracklen);
+  int getTrackLen();
+  bool system_command (Command* cmd);
+  Camera* getCamera();
+  //private:
+
+  void spawn(WorldEntity* entity);
+
+  List<WorldEntity>* entities;
+  
+  // base level data
+  Track* track;
+  Uint32 tracklen;   // number of Tracks the World consist of
+  Vector* pathnodes;
+  Camera* localCamera;  
+
  private:
- 
-	List<WorldEntity>* entities;
-	
-		// base level data
-	Track* track;
-	Uint32 tracklen;   // number of Tracks the World consist of
-	Vector* pathnodes;
+  Uint32 lastFrame; //!> last time of frame
+  bool bQuitOrxonox; //!> quit this application
+  bool bQuitCurrentGame; //!> quit only the current game and return to menu
+  bool bPause;
 
+  char* worldName;
+  int debugWorldNr;
+
+  WorldEntity* localPlayer;
+  
+  void mainLoop();
+  void synchronize();
+  void handle_input();
+  void time_slice();
+  void collision();
+  void display();
+  void debug();
 };
 
@@ -58,22 +94,22 @@
 template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL)
 {
-	Location zeroloc;
-	T* entity = new T();
-	entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
-	if( loc == NULL)
-	{
-		zeroloc.dist = 0;
-		zeroloc.part = 0;
-		zeroloc.pos = Vector();
-		zeroloc.rot = Quaternion();
-		loc = &zeroloc;
-	}
-	entity->init (loc, owner);
-	if (entity->bFree)
-	{
-		track[loc->part].map_coords( loc, entity->get_placement());
-	}
-	entity->post_spawn ();
-	return entity;
+  Location zeroloc;
+  T* entity = new T();
+  entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
+  if( loc == NULL)
+    {
+      zeroloc.dist = 0;
+      zeroloc.part = 0;
+      zeroloc.pos = Vector();
+      zeroloc.rot = Quaternion();
+      loc = &zeroloc;
+    }
+  entity->init (loc, owner);
+  if (entity->bFree)
+    {
+      track[loc->part].map_coords( loc, entity->get_placement());
+    }
+  entity->post_spawn ();
+  return entity;
 }
 
@@ -92,15 +128,15 @@
 template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL)
 {
-	T* entity = new T();
-	entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
-	entity->init (plc, owner);
-	if (!entity->bFree)
-	{
-		printf("Can't spawn unfree entity with placement\n"); 
-		entities->remove( (WorldEntity*)entity, LIST_FIND_FW);
-		return NULL;
-	}
-	entity->post_spawn ();
-	return entity;
+  T* entity = new T();
+  entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
+  entity->init (plc, owner);
+  if (!entity->bFree)
+    {
+      printf("Can't spawn unfree entity with placement\n"); 
+      entities->remove( (WorldEntity*)entity, LIST_FIND_FW);
+      return NULL;
+    }
+  entity->post_spawn ();
+  return entity;
 }
 
