Index: orxonox/branches/sound/Makefile.in
===================================================================
--- orxonox/branches/sound/Makefile.in	(revision 2963)
+++ orxonox/branches/sound/Makefile.in	(revision 2964)
@@ -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@
@@ -104,4 +138,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -112,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)
 
@@ -159,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:
@@ -227,12 +262,4 @@
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -243,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) \
@@ -248,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; \
@@ -265,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) \
@@ -291,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)
@@ -319,5 +337,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -336,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; \
@@ -356,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
@@ -364,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
@@ -385,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 \
@@ -392,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) \
@@ -421,5 +467,4 @@
 installdirs: installdirs-recursive
 installdirs-am:
-
 install: install-recursive
 install-exec: install-exec-recursive
@@ -459,4 +504,6 @@
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
@@ -495,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/sound/NEWS
===================================================================
--- orxonox/branches/sound/NEWS	(revision 2963)
+++ orxonox/branches/sound/NEWS	(revision 2964)
@@ -1,13 +1,18 @@
+Date:	November 16, 2004
+Topic:	Importer
+Body:	There now exists a possibility to import .obj-files (alias wavefront format) into the Game. You can find some test models here: <A href="/files/models">models</a>. You can also test them with the included importer which is locates in trunk/importer. enjoy.
+
+
 Date:	June 22, 2004
 Topic: 	Develop on Win32 - bg
-Body:	Now the moment you have all been waiting for has arrived. Orxonox can finally be compiled on Windows machines. We know that it is no good idea to do this, but since there are some people interessted in working with Windows, we will give you a chance: read <A href = "http://www.orxonox.ethz.ch/index.php?site=additional.sites/howto.dev.win/howto.dev.win.cc.php" >the manual </A>.
+Body:	Now the moment you have all been waiting for has arrived. Orxonox can finally be compiled on Windows machines. We know that it is no good idea to do this, but since there are some people interessted in working with Windows, we will give you a chance: read <A href = "/index.php?site=additional.sites/howto.dev.win/howto.dev.win.cc.php" >the manual </A>.
 
 Date:	June 04, 2004
 Topic:	Orxonox Convention - pb
-Body:	Here you can find all the information you need, to join us at the <A href="http://www.orxonox.ethz.ch/index.php?site=additional.sites/convention01/convention01.php"> Orxonox Convention </A>, that takes Place at Stuz June 9. 2004.
+Body:	Here you can find all the information you need, to join us at the <A href="index.php?site=additional.sites/convention01/convention01.php"> Orxonox Convention </A>, that takes Place at Stuz June 9. 2004.
 
 Date:	June 04, 2004
 Topic:  Manual for Subversion@DataCore.ch
-Body:	A manual for <A href="http://www.orxonox.ethz.ch/files/subversion/subversion.pdf"> Subversion at DataCore</A> is made. Now we need someone, to correct all the errors. Please someone Checkout the Source of this at http://orxonox.ethz.ch/repos/latex/subversion an do the repairs.
+Body:	A manual for <A href="/files/subversion/subversion.pdf"> Subversion at DataCore</A> is made. Now we need someone, to correct all the errors. Please someone Checkout the Source of this at http://orxonox.ethz.ch/repos/latex/subversion an do the repairs.
 
 Date:	June 02, 2004
@@ -17,4 +22,4 @@
 Date:	May 26, 2004
 Topic:	New ship models - bg
-Body:	Some new space models are now ready for download. You'll find them in the download section or try it <A href="http://www.orxonox.ethz.ch/files/orx_pictures.tar.bz2">here</A>
+Body:	Some new space models are now ready for download. You'll find them in the download section or try it <A href="/files/orx_pictures.tar.bz2">here</A>
 
Index: orxonox/branches/sound/aclocal.m4
===================================================================
--- orxonox/branches/sound/aclocal.m4	(revision 2963)
+++ orxonox/branches/sound/aclocal.m4	(revision 2964)
@@ -1,5 +1,5 @@
-# generated automatically by aclocal 1.7.9 -*- 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,130 +12,7 @@
 # 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 (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 10
-
-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_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# 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
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-# 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],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# 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.
+#                                                        -*- 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
@@ -157,5 +34,5 @@
 # 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"])
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
@@ -164,163 +41,9 @@
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.7.9])])
-
-# Helper functions for option handling.                    -*- Autoconf -*-
-
-# Copyright 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_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright 1996, 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 3
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-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_AUTOMAKE_VERSION([1.8.5])])
 
 # AM_AUX_DIR_EXPAND
 
-# 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
@@ -377,113 +100,58 @@
 # 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], [
+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_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.
-
-# 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.
-
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-#                                                          -*- 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=.
+# 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
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# serial 5						-*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+  $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.
 
 # This program is free software; you can redistribute it and/or modify
@@ -569,5 +237,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
@@ -597,7 +267,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_$1_dependencies_compiler_type=$depmode
         break
@@ -633,6 +308,6 @@
 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])
+[  --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"
@@ -645,5 +320,5 @@
 # Generate code to set up dependency tracking.   -*- Autoconf -*-
 
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -684,12 +359,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 = //
@@ -726,4 +401,187 @@
      [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])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[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`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+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],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# 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])
+
+# 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 -*-
@@ -790,46 +648,261 @@
 ])
 
-# 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='#'
+#  -*- 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
-  $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])])
-
+  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 (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_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright (C) 1996, 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 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# AM_PROG_INSTALL_STRIP
+
+# 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.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
Index: orxonox/branches/sound/configure
===================================================================
--- orxonox/branches/sound/configure	(revision 2963)
+++ orxonox/branches/sound/configure	(revision 2964)
@@ -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
@@ -1725,20 +1749,4 @@
 
           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
 
 
@@ -2407,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
@@ -2435,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
@@ -3238,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
@@ -3266,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
@@ -3300,7 +3322,6 @@
 
 
-# Checks for libraries.
-
-#  cheking for libGL
+
+
 
 ac_ext=c
@@ -3720,5 +3741,23 @@
 fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+### 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 gl header
+   # On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
 
@@ -3946,13 +3985,12 @@
 done
 
-
-#   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 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.  */
@@ -3993,71 +4031,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
@@ -4081,5 +4052,4 @@
     if test "$FOUND_opengl32" = "yes" ; then
 	LIBS="$LIBS -lopengl32"
-
     else
 	 echo "------------------"
@@ -4089,7 +4059,6 @@
 	 exit -1
     fi
-fi
-
-#  cheking for libGLU
+
+# cheking for GLU-header
 
 for ac_header in GL/glu.h
@@ -4247,77 +4216,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
@@ -4384,6 +4281,5 @@
     if test "$FOUND_glu32" = "yes" ; then
 	LIBS="$LIBS -lGLU32"
-
-	else
+    else
 	 echo "------------------"
 	 echo "GLU library not found."
@@ -4392,8 +4288,75 @@
 	 exit -1
     fi
-fi
-
-
-for ac_header in SDL/SDL_mixer.h
+
+
+# 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="-lmingw32  $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_mingw32_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_mingw32_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_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`
@@ -4541,6 +4504,6 @@
 
 else
-  { { echo "$as_me:$LINENO: error: cannot find sdlmixer headers" >&5
-echo "$as_me: error: cannot find sdlmixer 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
@@ -4549,15 +4512,12 @@
 
 
-LIBS="$LIBS -lSDL_mixer"
-
-# 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 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="-lOSMesa  $LIBS"
+LIBS="-lsdlmain  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4598,10 +4558,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_OSMesa_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_OSMesa_main=no
+ac_cv_lib_sdlmain_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4609,24 +4569,26 @@
 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 "$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 "SDL library not found."
+	 echo "please install the SDL library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit 1
+    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 $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lX11  $LIBS"
+LIBS="-lsdl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4667,10 +4629,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_X11_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_X11_main=no
+ac_cv_lib_sdl_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4678,159 +4640,23 @@
 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
-
-
-## 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 $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmingw32  $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_mingw32_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_mingw32_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_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
+
+# checking for SDL-Mixer-headers
+
+for ac_header in SDL/SDL_mixer.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4985,12 +4811,13 @@
 done
 
-if test $mingw = no ; 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
+
+#checking for libSDL_mixer
+    echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5
+echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6
+if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lSDL  $LIBS"
+LIBS="-lSDL_mixer  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5031,10 +4858,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_SDL_main=yes
+  ac_cv_lib_SDL_mixer_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_SDL_mixer_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5042,460 +4869,32 @@
 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
-#   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
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsdlmain  $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_sdlmain_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_sdlmain_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_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"
+echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_main" >&5
+echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6
+if test $ac_cv_lib_SDL_mixer_main = yes; then
+  FOUND_SDL_mixer=yes
+fi
+
+    if test "$FOUND_SDL_mixer" = "yes" ; then
+	LIBS="$LIBS -lSDL_mixer"
+    else
+	 echo "------------------"
+	 echo "SDL Mixer library not found."
+	 echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit 1
     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 $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsdl  $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_sdl_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_sdl_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_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
-
-#checking for pthread libs
-echo "$as_me:$LINENO: checking for main in -lpthread" >&5
-echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $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_pthread_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread_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_pthread_main" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
-if test $ac_cv_lib_pthread_main = yes; then
-  FOUND_pthread=yes
-fi
-
-if test "$FOUND_pthread" = "yes" ; then
-    LIBS="$LIBS -lpthread"
-fi
-
-
-
-
-# FIXME: Replace `main' with a function in `-lm':
-
-echo "$as_me:$LINENO: checking for main in -lm" >&5
-echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
-if test "${ac_cv_lib_m_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $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_m_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_m_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_m_main" >&5
-echo "${ECHO_T}$ac_cv_lib_m_main" >&6
-if test $ac_cv_lib_m_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
-  LIBS="-lm $LIBS"
-
-fi
-
-
-LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
-
-
-# Checks for header files.
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_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_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./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
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-
-
-for ac_header in stdlib.h string.h
+
+
+    ;;
+
+### LINUX ###
+ *Linux*)
+echo "Linux detected"
+
+ Linux="yes"
+
+# checking gl header
+
+for ac_header in GL/gl.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5642,4 +5041,8 @@
 _ACEOF
 
+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
 
@@ -5647,11 +5050,13 @@
 
 
-# Checks for typedefs, structures, and compiler characteristics.
-echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
-echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
-if test "${ac_cv_header_stdbool_h+set}" = set; then
+#  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
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5660,47 +5065,16 @@
 /* end confdefs.h.  */
 
-#include <stdbool.h>
-#ifndef bool
-# error bool is not defined
-#endif
-#ifndef false
-# error false is not defined
-#endif
-#if false
-# error false is not 0
-#endif
-#ifndef true
-# error true is not defined
-#endif
-#if true != 1
-# error true is not 1
-#endif
-#ifndef __bool_true_false_are_defined
-# error __bool_true_false_are_defined is not defined
-#endif
-
-	struct s { _Bool s: 1; _Bool t; } s;
-
-	char a[true == 1 ? 1 : -1];
-	char b[false == 0 ? 1 : -1];
-	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-	char d[(bool) -0.5 == true ? 1 : -1];
-	bool e = &s;
-	char f[(_Bool) -0.0 == false ? 1 : -1];
-	char g[true];
-	char h[sizeof (_Bool)];
-	char i[sizeof s.t];
 
 int
 main ()
 {
- return !a + !b + !c + !d + !e + !f + !g + !h + !i;
+main ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+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
@@ -5716,5 +5090,5 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
@@ -5722,92 +5096,34 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_header_stdbool_h=yes
+  ac_cv_lib_GL_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_header_stdbool_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
-echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
-echo "$as_me:$LINENO: checking for _Bool" >&5
-echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
-if test "${ac_cv_type__Bool+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  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
-int
-main ()
-{
-if ((_Bool *) 0)
-  return 0;
-if (sizeof (_Bool))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type__Bool=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type__Bool=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
-echo "${ECHO_T}$ac_cv_type__Bool" >&6
-if test $ac_cv_type__Bool = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
-_ACEOF
-
-
-fi
-
-if test $ac_cv_header_stdbool_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STDBOOL_H 1
-_ACEOF
-
-fi
-
-
-# Checks for library functions.
-
-for ac_header in stdlib.h
+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`
@@ -5954,4 +5270,1538 @@
 _ACEOF
 
+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;}
+   { (exit 1); exit 1; }; }
+fi
+
+done
+
+
+    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="-lSDL  $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_SDL_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_SDL_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_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
+
+# checking for SDL-Mixer-headers
+
+for ac_header in SDL/SDL_mixer.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;}
+   { (exit 1); exit 1; }; }
+fi
+
+done
+
+
+
+#checking for libSDL_mixer
+    echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5
+echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6
+if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSDL_mixer  $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_SDL_mixer_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_SDL_mixer_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_SDL_mixer_main" >&5
+echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6
+if test $ac_cv_lib_SDL_mixer_main = yes; then
+  FOUND_SDL_mixer=yes
+fi
+
+    if test "$FOUND_SDL_mixer" = "yes" ; then
+	LIBS="$LIBS -lSDL_mixer"
+    else
+	 echo "------------------"
+	 echo "SDL Mixer library not found."
+	 echo "please install the SDL Mixer 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="-lOSMesa  $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_OSMesa_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_OSMesa_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_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
+
+
+
+#checking for pthread libs
+echo "$as_me:$LINENO: checking for main in -lpthread" >&5
+echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $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_pthread_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread_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_pthread_main" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
+if test $ac_cv_lib_pthread_main = yes; then
+  FOUND_pthread=yes
+fi
+
+if test "$FOUND_pthread" = "yes" ; then
+    LIBS="$LIBS -lpthread"
+fi
+
+
+
+
+# FIXME: Replace `main' with a function in `-lm':
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $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_m_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_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_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
+
+
+# Checks for header files.
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_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_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./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
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+for ac_header in stdlib.h string.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
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
+if test "${ac_cv_header_stdbool_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#ifndef bool
+# error bool is not defined
+#endif
+#ifndef false
+# error false is not defined
+#endif
+#if false
+# error false is not 0
+#endif
+#ifndef true
+# error true is not defined
+#endif
+#if true != 1
+# error true is not 1
+#endif
+#ifndef __bool_true_false_are_defined
+# error __bool_true_false_are_defined is not defined
+#endif
+
+	struct s { _Bool s: 1; _Bool t; } s;
+
+	char a[true == 1 ? 1 : -1];
+	char b[false == 0 ? 1 : -1];
+	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+	char d[(bool) -0.5 == true ? 1 : -1];
+	bool e = &s;
+	char f[(_Bool) -0.0 == false ? 1 : -1];
+	char g[true];
+	char h[sizeof (_Bool)];
+	char i[sizeof s.t];
+
+int
+main ()
+{
+ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
+  ;
+  return 0;
+}
+_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_cv_header_stdbool_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdbool_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
+echo "$as_me:$LINENO: checking for _Bool" >&5
+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
+if test "${ac_cv_type__Bool+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  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
+int
+main ()
+{
+if ((_Bool *) 0)
+  return 0;
+if (sizeof (_Bool))
+  return 0;
+  ;
+  return 0;
+}
+_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_cv_type__Bool=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type__Bool=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+echo "${ECHO_T}$ac_cv_type__Bool" >&6
+if test $ac_cv_type__Bool = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STDBOOL_H 1
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+
+for ac_header in stdlib.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
+
 fi
 
@@ -6143,5 +6993,5 @@
 
 
-                                        ac_config_files="$ac_config_files Makefile console/Makefile gui/Makefile src/Makefile"
+                                                  ac_config_files="$ac_config_files Makefile console/Makefile gui/Makefile src/Makefile importer/Makefile"
 
 cat >confcache <<\_ACEOF
@@ -6705,4 +7555,5 @@
   "gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES importer/Makefile" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
@@ -6808,8 +7659,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
@@ -6836,4 +7687,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
@@ -7463,12 +8315,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/sound/configure.ac
===================================================================
--- orxonox/branches/sound/configure.ac	(revision 2963)
+++ orxonox/branches/sound/configure.ac	(revision 2964)
@@ -9,10 +9,179 @@
 AC_CONFIG_HEADER([config.h])
 
-AC_MSG_CHECKING([for mingw])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+
+
+
+AC_HEADER_STDC
+
+### 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 gl header
+   AC_CHECK_HEADERS(GL/gl.h ,,
+      [AC_MSG_ERROR([cannot find opengl headers]) ])
+#   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
+
+# checking for SDL-Mixer-headers
+    AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
+      [AC_MSG_ERROR([cannot find SDL headers]) ])
+
+#checking for libSDL_mixer
+    AC_CHECK_LIB([SDL_mixer], [main], FOUND_SDL_mixer=yes)
+    if test "$FOUND_SDL_mixer" = "yes" ; then
+	LIBS="$LIBS -lSDL_mixer"
+    else
+	 echo "------------------"
+	 echo "SDL Mixer library not found."
+	 echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit 1
+    fi
+
+
+    ;;
+
+### LINUX ###
+ *Linux*)
+echo "Linux detected"
+
+ Linux="yes"
+
+# checking gl header
+   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"
+   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   
+	
+# checking for SDL-Mixer-headers
+    AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
+      [AC_MSG_ERROR([cannot find SDL headers]) ])
+
+
+#checking for libSDL_mixer
+    AC_CHECK_LIB([SDL_mixer], [main], FOUND_SDL_mixer=yes)
+    if test "$FOUND_SDL_mixer" = "yes" ; then
+	LIBS="$LIBS -lSDL_mixer"
+    else
+	 echo "------------------"
+	 echo "SDL Mixer library not found."
+	 echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
+	 echo "------------------"
+	 exit 1
+    fi
+
     ;;
   *)
@@ -23,62 +192,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
-
-AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
-      [AC_MSG_ERROR([cannot find sdlmixer headers]) ])
-
-LIBS="$LIBS -lSDL_mixer"
+#### Checking for LIBraries.
 
 # FIXME: Replace `main' with a function in `-lOSMesa':
@@ -89,33 +201,4 @@
 AC_CHECK_LIB([Xt], [main])
 
-## 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
@@ -148,4 +231,5 @@
 		 console/Makefile
                  gui/Makefile
-                 src/Makefile])
+                 src/Makefile
+		 importer/Makefile])
 AC_OUTPUT
Index: orxonox/branches/sound/console/Makefile.in
===================================================================
--- orxonox/branches/sound/console/Makefile.in	(revision 2963)
+++ orxonox/branches/sound/console/Makefile.in	(revision 2964)
@@ -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 = $(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@
@@ -104,4 +141,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -112,54 +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
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-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) $(srcdir)/Makefile.in Makefile.am
-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)$$//'`; \
@@ -167,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
@@ -176,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
 
@@ -187,5 +213,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -197,33 +223,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)
@@ -235,4 +247,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -246,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) \
@@ -272,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)
@@ -289,5 +299,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -307,7 +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
@@ -348,4 +359,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -383,9 +396,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/sound/gui/Makefile.in
===================================================================
--- orxonox/branches/sound/gui/Makefile.in	(revision 2963)
+++ orxonox/branches/sound/gui/Makefile.in	(revision 2964)
@@ -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 = $(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@
@@ -104,4 +147,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -112,9 +156,5 @@
 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 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
 
@@ -128,55 +168,40 @@
 #TESTS=chk
 EXTRA_DIST = rc banner.xpm
-subdir = gui
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-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) \
-	orxonox_gui_keys.$(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_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 $@
-DIST_SOURCES = $(gui_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in Makefile.am
-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)$$//'`; \
@@ -184,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
@@ -193,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
 
@@ -204,5 +229,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -218,33 +243,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)
@@ -256,4 +267,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -267,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) \
@@ -293,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)
@@ -310,5 +319,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -328,7 +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
@@ -369,4 +379,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -404,9 +416,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/sound/importer/Makefile.am
===================================================================
--- orxonox/branches/sound/importer/Makefile.am	(revision 2964)
+++ orxonox/branches/sound/importer/Makefile.am	(revision 2964)
@@ -0,0 +1,27 @@
+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=importer
+importer_SOURCES=framework.cc windowHandler.cc vector.cc object.cc array.cc material.cc
+
+noinst_HEADERS=framework.h windowHandler.h  vector.h object.h array.h material.h
+
+
+#  uncomment the following if bencoder requires the math library
+#orxonox_LDADD=-lm
+
+#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
+
+#  if you write a self-test script named `chk', uncomment the
+#  following and add `chk' to the EXTRA_DIST list
+#TESTS=chk
+
+#  build and install the .info pages
+#info_TEXINFOS = orxonox.texinfo
+#orxonox_TEXINFOS = gpl.texinfo
+
+#  install the man pages
+#man_MANS=orxonox.1
Index: orxonox/branches/sound/importer/Makefile.in
===================================================================
--- orxonox/branches/sound/importer/Makefile.in	(revision 2964)
+++ orxonox/branches/sound/importer/Makefile.in	(revision 2964)
@@ -0,0 +1,430 @@
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# @configure_input@
+
+# 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,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+SOURCES = $(importer_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+bin_PROGRAMS = importer$(EXEEXT)
+subdir = importer
+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_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
+	vector.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
+	material.$(OBJEXT)
+importer_OBJECTS = $(am_importer_OBJECTS)
+importer_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/material.Po ./$(DEPDIR)/object.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/windowHandler.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 = $(importer_SOURCES)
+DIST_SOURCES = $(importer_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MSBITFIELDS = @MSBITFIELDS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CXXFLAGS = "-I/usr/X11R6/include"
+AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
+importer_SOURCES = framework.cc windowHandler.cc vector.cc object.cc array.cc material.cc
+noinst_HEADERS = framework.h windowHandler.h  vector.h object.h array.h material.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(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  importer/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  importer/Makefile
+.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)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; 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; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@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"; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+importer$(EXEEXT): $(importer_OBJECTS) $(importer_DEPENDENCIES) 
+	@rm -f importer$(EXEEXT)
+	$(CXXLINK) $(importer_LDFLAGS) $(importer_OBJECTS) $(importer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windowHandler.Po@am__quote@
+
+.cc.o:
+@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 $@ $<
+
+.cc.obj:
+@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 $@ `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	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) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.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 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 \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+
+#  uncomment the following if bencoder requires the math library
+#orxonox_LDADD=-lm
+
+#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
+
+#  if you write a self-test script named `chk', uncomment the
+#  following and add `chk' to the EXTRA_DIST list
+#TESTS=chk
+
+#  build and install the .info pages
+#info_TEXINFOS = orxonox.texinfo
+#orxonox_TEXINFOS = gpl.texinfo
+
+#  install the man pages
+#man_MANS=orxonox.1
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: orxonox/branches/sound/importer/array.cc
===================================================================
--- orxonox/branches/sound/importer/array.cc	(revision 2964)
+++ orxonox/branches/sound/importer/array.cc	(revision 2964)
@@ -0,0 +1,139 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#include "array.h"
+
+/**
+   \brief creates a new Array
+*/
+Array::Array ()
+{
+  initializeArray ();
+}
+
+/**
+   \brief deletes an Array.
+   It does this by first deleting all the array-entries, and then delete the array[] itself
+*/
+Array::~Array()
+{
+  if (verbose >= 2)
+    printf("deleting array\n");
+  Entry* walker = firstEntry;
+  Entry* last;
+  while (walker != NULL)
+    {
+      last = walker;
+      walker = walker->next;
+      delete last;
+    }
+  if (finalized)
+    delete [] array;
+}
+
+/**
+   \brief initializes an Array
+   the Function does this by setting up a fistEntry, and setting the entryCount.
+*/
+void Array::initializeArray ()
+{
+  if (verbose >= 2)
+    printf ("crating new Array\n");
+  firstEntry = new Entry;
+  firstEntry->next =NULL;
+  currentEntry=firstEntry;
+  finalized = false;
+  entryCount = 0; //0 means one entry
+  return;
+}
+
+/**
+   \brief finalizes an array.
+   This Function creates the array, and makes it ready to be sent to the application.
+*/
+void Array::finalizeArray (void)
+{
+  if (verbose >= 3)
+    printf ("Finalizing array.\n");  
+  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
+  //  if ((array = new GLfloat [entryCount]) == NULL)
+    printf ("could not allocate %i data Blocks\n", entryCount);
+  Entry* walker = firstEntry;
+  for (int i=0; i<entryCount; i++)
+    {
+      array[i] = walker->value;
+      walker = walker->next;
+    }
+  finalized = true;
+
+  return;
+}
+
+/**
+   \brief adds a new Entry to the Array
+   \param entry Entry to add.
+*/
+void Array::addEntry (GLfloat entry)
+{
+  if (!finalized)
+    {
+      if (verbose >= 3)
+	printf ("adding new Entry to Array: %f\n", entry);
+      
+      currentEntry->value = entry;
+      currentEntry->next = new Entry;
+      currentEntry = currentEntry->next;
+      currentEntry->next = NULL;
+      ++entryCount;
+    }
+  else 
+    if (verbose >= 1)
+      printf ("adding failed, because list has been finalized\n");
+}
+
+/**
+   \brief Adds 3 entries at once (convenience)
+*/
+void Array::addEntry (GLfloat entry0, GLfloat entry1, GLfloat entry2)
+{
+  addEntry (entry0);
+  addEntry (entry1);
+  addEntry (entry2);
+}
+  
+/**
+   \brief Gives back the array !! MUST be executed AFTER finalize.
+   \returns The created array.
+*/
+GLfloat* Array::getArray ()
+{
+  return array;
+}
+
+/**
+   \returns The Count of entries in the Array
+*/
+int Array::getCount()
+{
+  return entryCount;
+}
+
+/**
+   \brief Simple debug info about the Array
+*/
+void Array::debug ()
+{
+  printf ("entryCount=%i, address=%p\n", entryCount, array);
+}
Index: orxonox/branches/sound/importer/array.h
===================================================================
--- orxonox/branches/sound/importer/array.h	(revision 2964)
+++ orxonox/branches/sound/importer/array.h	(revision 2964)
@@ -0,0 +1,49 @@
+/*!
+  \file array.h
+  \brief Contains the Array Class that handles float arrays.
+  this class creates a Array of a semi-Dynamic length.
+  beware, that after finalizing the array may not be resized again.
+*/
+
+#ifndef _ARRAY_H
+#define _ARRAY_H
+
+extern int verbose; //!< will be obsolete soon
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <fstream>
+
+
+//! Array Class that handles dynamic-float arrays.
+class Array
+{
+ public:
+  Array ();
+  ~Array();
+
+  void initializeArray ();
+  void finalizeArray (void);
+  void addEntry (GLfloat entry);
+  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
+  
+  GLfloat* getArray ();
+  int getCount();
+  void debug(void);
+ private:
+  struct Entry
+  {
+    GLfloat value;
+    Entry* next;
+  };
+
+  GLfloat* array;
+  int entryCount;
+  bool finalized;
+  Entry* firstEntry;
+  Entry* currentEntry;
+  
+  
+};
+
+#endif
Index: orxonox/branches/sound/importer/framework.cc
===================================================================
--- orxonox/branches/sound/importer/framework.cc	(revision 2964)
+++ orxonox/branches/sound/importer/framework.cc	(revision 2964)
@@ -0,0 +1,211 @@
+#include "framework.h"
+
+int verbose = 1;
+
+void DrawGLScene()
+{
+  currFrame = SDL_GetTicks();
+  dt = currFrame - lastFrame; 
+  if (dt == 0)
+    dist += (zoomTo-dist)/500;
+  else 
+    dist += (zoomTo-dist)/500 *(float)dt;
+
+  rotatorP += rotatorV *(float)dt;
+  
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+  glLoadIdentity(); // Reset the view
+  
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();	
+  gluPerspective(45.0f,500/375,0.1f,dist * 5.0f);
+    gluLookAt (0, dist , dist, 0,0,0, up.x,up.y,up.z);
+
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+  //  glRotatef (180, dir.x, dir.y, dir.z);
+  glMultMatrixf (*matQ);
+  obj->draw();
+
+  glPopMatrix();
+
+  SDL_GL_SwapBuffers(); // Swap the buffers
+  lastFrame = currFrame;
+}
+
+
+int main(int argc, char *argv[])
+{
+  Uint8* keys; // This variable will be used in the keyboard routine
+  int done=FALSE; // We aren't done yet, are we?
+
+  // Create a new OpenGL window with the title "Cone3D Basecode" at
+  // 640x480x32, fullscreen and check for errors along the way
+  if(wHandler.CreateGLWindow("Whandler Basecode", 500, 375, 32, FALSE) == FALSE)
+  {
+    // If an error is found, display a message, kill the GL and SDL screens (if they were created) and exit
+    printf("Could not initalize OpenGL :(\n\n");
+    wHandler.KillGLWindow();
+    return 0;
+  }
+  
+  printf ("%i, %i\n", wHandler.screen->w, wHandler.screen->h);
+  if (argc>=3)
+    obj = new Object (argv[1], atof(argv[2]));
+  else if (argc>=2)
+    obj = new Object(argv[1]);
+  else 
+    obj = new Object();
+  
+  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); 
+  rotAxis = Vector (0.0,1.0,0.0);
+  rotAngle = 0;
+
+  matQ[0][0] = matQ[1][1] = matQ[2][2] = matQ[3][3] = 1;
+  rotQ = Quaternion (rotAngle, rotAxis);
+  rotQlast = rotQ;
+  dir = Vector (0.0, 0.0, 1.0);
+  up = Vector (0.0, 1.0, 0.0);
+
+  glEnable(GL_LIGHTING);
+  glEnable(GL_DEPTH_TEST);
+
+  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
+  GLfloat light0Position[] = {10.0, 10.0, 10.0, 0.0};
+  GLfloat light1Position[] = {-10.0, -7.0, -6.0, 0.0};
+  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
+
+  glEnable(GL_LIGHT0);
+  glLightfv(GL_LIGHT0, GL_POSITION, light0Position);
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
+  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
+  
+  glEnable(GL_LIGHT1);
+  glLightfv(GL_LIGHT1, GL_POSITION, light1Position);
+  glLightfv(GL_LIGHT1, GL_DIFFUSE, whiteLight);
+  glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight);
+  
+  rotatorP = .0;
+  rotatorV = .0;
+  dist = 5.0;
+  zoomTo = dist;
+  // Build the font from a TGA image font.tga in the data directory
+  // Hide the mouse cursor
+    SDL_ShowCursor(2);
+    mouse1Down = false;
+
+  // This is the main loop for the entire program and it will run until done==TRUE
+  while(!done)
+  {
+    // Draw the scene
+    DrawGLScene();
+    // And poll for events
+    SDL_Event event;
+    while ( SDL_PollEvent(&event) ) {
+      switch (event.type) {
+      case SDL_MOUSEMOTION:
+	if (verbose >=3)
+	  printf("Mouse motion about %d,%d Pixels to (%d,%d).\n", 
+		 event.motion.xrel, event.motion.yrel,
+		 event.motion.x, event.motion.y);
+	// TRACKBALL
+	if (mouse1Down)
+	  {
+	    int mX = event.button.x;
+	    int mY = event.button.y;
+	    int wH = wHandler.screen->h;
+	    int wW = wHandler.screen->w;
+	    Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
+	    //	    printf ("tmpV: %f, %f, %f\n", tmpV.x, tmpV.y, tmpV.z);
+	    p2 = tmpV-M;
+	    rotAxis = p1.cross(p2);
+	    //  printf ("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z);
+
+	    // in case that there is no rotation-axis defined
+	    if (rotAxis.x != 0 || rotAxis.y != 0 || rotAxis.z != 0)
+	      {
+		rotAxis.normalize();
+		printf ("rotAxis: %f, %f, %f\n", rotAxis.x, rotAxis.y, rotAxis.z, rotAngle);
+				
+		rotAngle = angle_rad (p1, p2);
+		rotQ = Quaternion (rotAngle, rotAxis);
+		rotQ = rotQ * rotQlast;
+		rotQ.norm();
+		rotQ.matrix (matQ);
+		//	dir = rotQ.apply(dir);
+		//      dir.normalize();
+		//		printf ("rotAxis: %f, %f, %f, %f\n", dir.x, dir.y, dir.z, rotAngle);
+	      }
+	    rotQlast = rotQ;
+	    p1 = p2;
+
+	  }
+	break;
+      case SDL_MOUSEBUTTONDOWN:
+	if (event.button.button == 4)
+	  {
+	    printf("MouseWheel up\n");
+	    zoomTo *= .5;
+	  }
+	else if (event.button.button == 5)
+	  {
+	    printf("MouseWheel down\n");
+	    zoomTo *= 2.0;
+	  }
+	else if (event.button.button == 1)
+	  {
+	    mouse1Down = true;
+	    int mX = event.button.x;
+	    int mY = event.button.y;
+	    int wH = wHandler.screen->h;
+	    int wW = wHandler.screen->w;
+	    Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
+	    p1 = tmpV-M;
+
+	  }
+	else
+	  {
+	    printf("MouseButton %d pressed at (%d,%d).\n",
+		   event.button.button, event.button.x, event.button.y);
+	    rotatorV = ( (float)wHandler.screen->w/2 -event.button.x) / (float)wHandler.screen->w / 100.0;
+	  }
+	    
+	break;
+      case SDL_MOUSEBUTTONUP:
+	if (event.button.button == 4);
+	else if (event.button.button == 5);
+	else if (event.button.button == 1)
+	  mouse1Down =false;
+	else 
+	    {
+	printf("MouseButton %d released at (%d,%d).\n",
+	       event.button.button, event.button.x, event.button.y);
+	    }
+	break;
+	    
+        // If a quit event was recieved
+      case SDL_QUIT:
+	// then we're done and we'll end this program
+          done=TRUE;
+          break;
+      default:
+          break;
+      }
+
+
+    }
+
+    // Get the state of the keyboard keys
+    keys = SDL_GetKeyState(NULL);
+
+    // and check if ESCAPE has been pressed. If so then quit
+    if(keys[SDLK_ESCAPE]) done=TRUE;
+  }
+
+  // Kill the GL & SDL screens
+  delete obj;
+  wHandler.KillGLWindow();
+  // And quit
+  return 0;
+}
Index: orxonox/branches/sound/importer/framework.h
===================================================================
--- orxonox/branches/sound/importer/framework.h	(revision 2964)
+++ orxonox/branches/sound/importer/framework.h	(revision 2964)
@@ -0,0 +1,38 @@
+#ifndef _FRAMEWORK_H
+#define _FRAMEWORK_H
+ 
+#include "windowHandler.h" // Include the Whandler Basecode
+#include "object.h"
+#include "vector.h"
+
+float rotatorP;
+float rotatorV;
+
+float dist;
+float zoomTo;
+
+Uint32 lastFrame;
+Uint32 currFrame;
+Uint32 dt;
+
+
+Vector dir;
+Vector up;
+
+float matQ[4][4];
+
+Vector M;
+Vector p1;
+Vector p2;
+Vector rotAxis;
+float rotAngle;
+Quaternion rotQ;
+Quaternion rotQlast;
+
+bool mouse1Down;
+
+WindowHandler wHandler;  // Create an instance of the whandler basecode class
+Object* obj;
+
+
+#endif /* _FRAMEWORK_H */
Index: orxonox/branches/sound/importer/material.cc
===================================================================
--- orxonox/branches/sound/importer/material.cc	(revision 2964)
+++ orxonox/branches/sound/importer/material.cc	(revision 2964)
@@ -0,0 +1,293 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#include "material.h"
+
+/**
+   \brief creates a default Material with no Name
+   normally you call this to create a material List (for an obj-file) and then append with addMaterial()
+*/
+Material::Material()
+{
+  init();
+  
+  setName ("");
+}
+
+/**
+   \brief creates a Material.
+   \param mtlName Name of the Material to be added to the Material List
+*/
+Material::Material (char* mtlName)
+{
+  init();
+  
+  setName (mtlName);
+}
+
+/** 
+    \brief deletes a Material
+*/
+Material::~Material()
+{
+  if (verbose >= 2)
+    printf ("delete Material %s\n", name);
+  if (nextMat != NULL)
+    delete nextMat;
+}
+
+/**
+   \brief adds a new Material to the List.
+   this Function will append a new Material to the end of a Material List.
+   \param mtlName The name of the Material to be added.
+*/
+Material* Material::addMaterial(char* mtlName)
+{
+  if (verbose >=2)
+    printf ("adding Material %s\n", mtlName);
+  Material* newMat = new Material(mtlName);
+  Material* tmpMat = this;
+  while (tmpMat->nextMat != NULL)
+    {
+      tmpMat = tmpMat->nextMat;
+    }
+      tmpMat->nextMat = newMat;
+      return newMat;
+  
+}
+
+/**
+   \brief initializes a new Material with its default Values
+*/
+void Material::init(void)
+{
+  if (verbose >= 3)
+    printf ("initializing new Material\n");
+  nextMat = NULL;
+
+  setIllum(1);
+  setDiffuse(0,0,0);
+  setAmbient(0,0,0);
+  setSpecular(0,0,0);
+  setShininess(2.0);
+  setTransparency(0.0);
+  
+}
+
+/**
+   \brief Set the Name of the Material. (Important for searching)
+   \param mtlName the Name of the Material to be set.
+*/ 
+void Material::setName (char* mtlName)
+{
+  if (verbose >= 3)
+    printf("setting Material Name to %s", mtlName);
+  strcpy(name, mtlName);
+  //  printf ("adding new Material: %s, %p\n", this->getName(), this);
+
+}
+/**
+   \returns The Name of The Material
+*/
+char* Material::getName (void)
+{
+  return name;
+}
+
+/**
+   \brief Sets the Material Illumination Model. 
+   \brief illu illumination Model in int form
+*/
+void Material::setIllum (int illum)
+{
+  if (verbose >= 3)
+    printf("setting illumModel of Material %s to %i", name, illum);
+  illumModel = illum;
+  //  printf ("setting illumModel to: %i\n", illumModel);
+}
+/**
+   \brief Sets the Material Illumination Model. 
+   \brief illu illumination Model in char* form
+*/void Material::setIllum (char* illum)
+{
+  setIllum (atoi(illum));
+}
+
+/**
+   \brief Sets the Material Diffuse Color.
+   \param r Red Color Channel.
+   \param g Green Color Channel.
+   \param b Blue Color Channel.
+*/
+void Material::setDiffuse (float r, float g, float b)
+{
+  if (verbose >= 3)
+    printf ("setting Diffuse Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  diffuse[0] = r;
+  diffuse[1] = g;
+  diffuse[2] = b;  
+  diffuse[3] = 1.0;
+
+}
+/**
+   \brief Sets the Material Diffuse Color.
+   \param rgb The red, green, blue channel in char format (with spaces between them)
+*/
+void Material::setDiffuse (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setDiffuse (atof(r), atof(g), atof(b));
+}
+
+/**
+   \brief Sets the Material Ambient Color. 
+   \param r Red Color Channel.
+   \param g Green Color Channel.
+   \param b Blue Color Channel.
+*/
+void Material::setAmbient (float r, float g, float b)
+{
+  if (verbose >=3)
+    printf ("setting Ambient Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  ambient[0] = r;
+  ambient[1] = g;
+  ambient[2] = b;
+  ambient[3] = 1.0;
+}
+/**
+   \brief Sets the Material Ambient Color.
+   \param rgb The red, green, blue channel in char format (with spaces between them)
+*/
+void Material::setAmbient (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setAmbient (atof(r), atof(g), atof(b));
+}
+
+/**
+   \brief Sets the Material Specular Color. 
+   \param r Red Color Channel.
+   \param g Green Color Channel.
+   \param b Blue Color Channel.
+*/
+void Material::setSpecular (float r, float g, float b)
+{
+  if (verbose >= 3)
+    printf ("setting Specular Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  specular[0] = r;
+  specular[1] = g;
+  specular[2] = b;
+  specular[3] = 1.0;
+ }
+/**
+   \brief Sets the Material Specular Color.
+   \param rgb The red, green, blue channel in char format (with spaces between them)
+*/
+void Material::setSpecular (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setSpecular (atof(r), atof(g), atof(b));
+}
+
+/**
+   \brief Sets the Material Shininess.
+   \param shini stes the Shininess from float.
+*/
+void Material::setShininess (float shini)
+{
+  shininess = shini;
+}
+/**
+   \brief Sets the Material Shininess.
+   \param shini stes the Shininess from char*.
+*/
+void Material::setShininess (char* shini)
+{
+  setShininess (atof(shini));
+}
+
+/**
+   \brief Sets the Material Transparency.
+   \param trans stes the Transparency from int.
+*/
+void Material::setTransparency (float trans)
+{
+  if (verbose >= 3)
+    printf ("setting Transparency of Material %s to %f\n", name, trans);
+  transparency = trans;
+}
+/**
+   \brief Sets the Material Transparency.
+   \param trans stes the Transparency from char*.
+*/
+void Material::setTransparency (char* trans)
+{
+  char tr[20];
+  sscanf (trans, "%s", tr);
+  setTransparency (atof(tr));
+}
+
+/**
+   \brief Search for a Material called mtlName
+   \param mtlName the Name of the Material to search for
+   \returns Material named mtlName if it is found. NULL otherwise.
+*/
+Material* Material::search (char* mtlName)
+{
+  if (verbose >=3)
+    printf ("Searching for material %s", mtlName);
+  Material* searcher = this;
+  while (searcher != NULL)
+    {
+      if (verbose >= 3)
+	printf (".");
+      if (!strcmp (searcher->getName(), mtlName))
+	{
+	  if (verbose >= 3)
+	    printf ("found.\n");
+	  return searcher;
+	}
+      searcher = searcher->nextMat;
+    }
+  return NULL;
+}
+
+/**
+   \brief sets the material with which the following Faces will be painted
+*/
+bool Material::select (void)
+{
+  // setting diffuse color
+  //  glColor3f (diffuse[0], diffuse[1], diffuse[2]);
+  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse);
+
+  // setting ambient color
+  glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);
+
+  // setting up Sprecular
+  glMaterialfv(GL_FRONT, GL_SPECULAR, specular);
+
+  // setting up Shininess
+  glMaterialf(GL_FRONT, GL_SHININESS, shininess);
+  
+  // setting illumination Model 
+  if (illumModel == 1)
+    glShadeModel(GL_FLAT);
+  else if (illumModel >= 2)
+    glShadeModel(GL_SMOOTH);
+}
Index: orxonox/branches/sound/importer/material.h
===================================================================
--- orxonox/branches/sound/importer/material.h	(revision 2964)
+++ orxonox/branches/sound/importer/material.h	(revision 2964)
@@ -0,0 +1,59 @@
+/*!
+  \file material.h
+  \brief Contains the Material Class that handles Material for 3D-Objects.
+*/
+
+#ifndef _MATERIAL_H
+#define _MATERIAL_H
+
+extern int verbose; //!< will be obsolete soon.
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <stdlib.h>
+#include <fstream>
+
+//! Class to handle Materials.
+class Material
+{
+ public:
+  Material ();
+  Material (char* mtlName);
+  Material* addMaterial(char* mtlName);
+
+  void init(void);
+  ~Material ();
+
+
+  void setName (char* mtlName);
+  char* getName (void);
+  void setIllum (int illum);
+  void setIllum (char* illum);
+  void setDiffuse (float r, float g, float b);
+  void setDiffuse (char* rgb);
+  void setAmbient (float r, float g, float b);
+  void setAmbient (char* rgb);
+  void setSpecular (float r, float g, float b);
+  void setSpecular (char* rgb);
+  void setShininess (float shini);
+  void setShininess (char* shini);
+  void setTransparency (float trans);
+  void setTransparency (char* trans);
+
+  Material* search (char* mtlName);
+
+  bool select (void);
+
+  Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists.
+
+ private:
+  char name [50];
+  int illumModel;
+  float diffuse [4];
+  float ambient [4];
+  float specular [4];
+  float shininess;
+  float transparency;
+
+};
+#endif
Index: orxonox/branches/sound/importer/object.cc
===================================================================
--- orxonox/branches/sound/importer/object.cc	(revision 2964)
+++ orxonox/branches/sound/importer/object.cc	(revision 2964)
@@ -0,0 +1,718 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#include "object.h"
+
+/**
+   \brief Creates a 3D-Object, but does not load any 3D-models
+   pretty useless
+*/
+Object::Object ()
+{
+
+  initialize();
+
+  BoxObject();
+
+  finalize();
+}
+
+/**
+   \brief Crates a 3D-Object and loads in a File
+   \param fileName file to parse and load (must be a .obj file)
+*/
+Object::Object(char* fileName)
+{
+  initialize();
+
+  importFile (fileName);
+
+  finalize();
+}
+
+/**
+   \brief Crates a 3D-Object, loads in a File and scales it.
+   \param fileName file to parse and load (must be a .obj file)
+   \param scaling The factor that the object will be scaled with.
+*/
+
+Object::Object(char* fileName, float scaling)
+{
+  initialize();
+  scaleFactor = scaling;
+
+  importFile (fileName);
+
+  finalize();
+}
+
+/**
+   \brief deletes an Object
+*/
+Object::~Object()
+{
+  if (verbose >= 2)
+    printf ("Deleting display List.\n");
+  Group* walker = firstGroup;
+  while (walker != NULL)
+    {
+      glDeleteLists (walker->listNumber, 1);
+      Group* lastWalker = walker;
+      walker = walker->nextGroup;
+      delete lastWalker;
+    } 
+}
+
+/** 
+    \brief initializes the Object
+    This Function initializes all the needed arrays, Lists and clientStates
+*/
+bool Object::initialize (void)
+{
+  if (verbose >=3)
+    printf("new 3D-Object is being created\n"); 
+
+  // setting the start group;
+  firstGroup = new Group;
+  currentGroup = firstGroup;
+  groupCount = 0;
+  
+  initGroup (currentGroup);
+  mtlFileName = "";
+  scaleFactor = 1;
+  material = new Material();
+
+  glEnableClientState (GL_VERTEX_ARRAY);
+  //  glEnableClientState (GL_NORMAL_ARRAY);
+  //  glEnableClientState (GL_TEXTURE_COORD_ARRAY);
+
+
+  return true;
+}
+
+/**
+   \brief Imports a obj file and handles the the relative location
+   \param fileName The file to import
+*/
+bool Object::importFile (char* fileName)
+{
+  if (verbose >=3)
+    printf("preparing to read in file: %s\n", fileName);   
+  objFileName = fileName;
+  this->readFromObjFile (objFileName);
+  return true;
+}
+
+/**
+  \brief finalizes an Object.
+   This funcion is needed, to close the glList and all the other lists.
+*/
+bool Object::finalize(void)
+{
+  //  if (verbose >=3)
+    printf("finalizing the 3D-Object\n"); 
+  finalizeGroup (currentGroup);
+  if (material != NULL)
+    delete material;
+  return true;
+}
+
+/**
+   \brief Draws the Objects of all Groups.
+   It does this by just calling the Lists that must have been created earlier.
+*/
+void Object::draw (void)
+{
+  if (verbose >=2)
+    printf("drawing the 3D-Objects\n"); 
+  Group* walker = firstGroup;
+  while (walker != NULL)
+    {
+      if (verbose >= 3)
+	printf ("Drawing object %s\n", walker->name);
+      glCallList (walker->listNumber);
+      walker = walker->nextGroup;
+    }
+}
+
+/**
+   \brief Draws the Object number groupNumber
+   It does this by just calling the List that must have been created earlier.
+   \param groupNumber The number of the group that will be displayed.
+*/
+void Object::draw (int groupNumber)
+{
+  if (groupNumber >= groupCount)
+    {
+      if (verbose>=2)
+	printf ("You requested object number %i, but this File only contains of %i Objects.\n", groupNumber-1, groupCount);
+      return;
+    }
+  if (verbose >=2)
+    printf("drawing the requested 3D-Objects if found.\n"); 
+  Group* walker = firstGroup;
+  int counter = 0;
+  while (walker != NULL)
+    {
+      if (counter == groupNumber)
+	{
+	  if (verbose >= 2)
+	    printf ("Drawing object number %s named %s\n", counter, walker->name);
+	  glCallList (walker->listNumber);
+	  return;
+	}
+      ++counter;
+      walker = walker->nextGroup;
+    }
+  if (verbose >= 2)
+    printf("Object number %i in %s not Found.\n", groupNumber, objFileName);
+  return;
+
+}
+
+/**
+   \brief Draws the Object with a specific groupname
+   It does this by just calling the List that must have been created earlier.
+   \param groupName The name of the group that will be displayed.
+*/
+void Object::draw (char* groupName)
+{
+  if (verbose >=2)
+    printf("drawing the requested 3D-Objects if found.\n"); 
+  Group* walker = firstGroup;
+  while (walker != NULL)
+    {
+      if (!strcmp(walker->name, groupName))
+	{
+	  if (verbose >= 2)
+	    printf ("Drawing object %s\n", walker->name);
+	  glCallList (walker->listNumber);
+	  return;
+	}
+      walker = walker->nextGroup;
+    }
+  if (verbose >= 2)
+    printf("Object Named %s in %s not Found.\n", groupName, objFileName);
+  return;
+}
+
+/**
+   \returns Count of the Objects in this File
+*/
+int Object::getGroupCount (void)
+{
+  return groupCount;
+}
+
+/**
+   \brief initializes a new Group object
+*/
+bool Object::initGroup(Group* group)
+{
+  if (verbose >= 2)
+    printf("Adding new Group\n");
+  group->name = "";
+  group->faceMode = -1;
+  group->faceCount =0;  
+  if ((group->listNumber = glGenLists(1)) == 0 )
+    {
+      printf ("list could not be created for this Object\n");
+      return false;
+    }
+  
+  if (groupCount == 0)
+    {
+      group->firstVertex = 0;
+      group->firstNormal = 0;
+      group->firstNormal = 0;
+    }
+  else
+    {
+      group->firstVertex = currentGroup->firstVertex + currentGroup->vertices->getCount()/3;
+      group->firstNormal = currentGroup->firstNormal + currentGroup->normals->getCount()/3;
+      group->firstVertexTexture = currentGroup->firstVertexTexture + currentGroup->vTexture->getCount()/2;
+    }
+  if (verbose >=2)
+    printf ("Creating new Arrays, with starting points v:%i, vt:%i, vn:%i .\n", group->firstVertex, group->firstVertexTexture, group->firstNormal);
+  group->vertices = new Array();
+  group->normals = new Array();
+  group->vTexture = new Array();
+
+  glNewList (group->listNumber, GL_COMPILE);
+}
+
+/**
+   \brief finalizes a Group.
+   \param group the group to finalize.
+*/
+bool Object::finalizeGroup(Group* group)
+{
+  if (verbose >=2)
+    printf ("Finalize group %s.\n", group->name);
+  glEnd();
+  glEndList();
+}
+/**
+   \brief deletes the Arrays of the Group to save space.
+   \param group the group to delete the arrays from.
+*/
+bool Object::cleanupGroup(Group* group)
+{
+  if (verbose >=2)
+    printf ("cleaning up group %s.\n", group->name);
+  
+  delete group->vertices;
+  delete group->normals;
+  delete group->vTexture;
+}
+
+/**
+   \brief Reads in the .obj File and sets all the Values.
+   This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks
+   \param fileName the File that will be parsed (.obj-file)
+*/
+bool Object::readFromObjFile (char* fileName)
+{
+  OBJ_FILE = new ifstream(fileName);
+  if (!OBJ_FILE->is_open())
+    {
+      if (verbose >=1)
+	printf ("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName);
+      BoxObject();
+      return false;
+    }
+  objFileName = fileName;
+  char Buffer[10000];
+  while(!OBJ_FILE->eof())
+    {
+      OBJ_FILE->getline(Buffer, 10000);
+      if (verbose >=4)
+	printf ("Read input line: %s\n",Buffer);
+      
+
+      // case vertice
+      if (!strncmp(Buffer, "v ", 2))
+	{
+	  readVertex(Buffer+2);
+	}
+
+      // case face
+      else if (!strncmp(Buffer, "f ", 2))
+	{
+	  readFace (Buffer+2);
+	}
+      
+      else if (!strncmp(Buffer, "mtllib", 6))
+	{
+	  readMtlLib (Buffer+7);
+	}
+
+      else if (!strncmp(Buffer, "usemtl", 6))
+	{
+	  readUseMtl (Buffer+7);
+	}
+
+      // case VertexNormal
+      else if (!strncmp(Buffer, "vn ", 2))
+      {
+	readVertexNormal(Buffer+3);
+      }
+
+      // case VertexTextureCoordinate
+      else if (!strncmp(Buffer, "vt ", 2))
+      {
+	readVertexTexture(Buffer+3);
+      }
+      // case group
+      else if (!strncmp(Buffer, "g", 1))
+	{
+	  readGroup (Buffer+2);
+	}
+    }
+  OBJ_FILE->close();
+  return true;
+
+}
+
+/**
+   \brief parses a vertex-String
+   If a vertex line is found this function will inject it into the vertex-Array
+   \param vertexString The String that will be parsed.
+*/
+bool Object::readVertex (char* vertexString)
+{
+  readingVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (vertexString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >= 3)
+    printf ("reading in a vertex: %s %s %s\n", subbuffer1, subbuffer2, subbuffer3);
+  currentGroup->vertices->addEntry(atof(subbuffer1)*scaleFactor, atof(subbuffer2)*scaleFactor, atof(subbuffer3)*scaleFactor);
+  return true;
+}
+
+/**
+   \brief parses a face-string
+   If a face line is found this function will add it to the glList.
+   The function makes a difference between QUADS and TRIANGLES, and will if changed re-open, set and re-close the gl-processe.
+   \param faceString The String that will be parsed.
+*/
+bool Object::readFace (char* faceString)
+{
+  // finalize the Arrays;
+  if (readingVertices == true)
+    {
+      currentGroup->vertices->finalizeArray();
+      //      glVertexPointer(3, GL_FLOAT, 0, currentGroup->vertices->getArray());
+      currentGroup->normals->finalizeArray();
+      //      glNormalPointer(GL_FLOAT, 0, currentGroup->normals->getArray());
+      currentGroup->vTexture->finalizeArray();
+    }
+
+  readingVertices = false;
+  currentGroup->faceCount++;
+
+  int elemCount = 0;
+  
+  FaceElement* firstElem = new FaceElement;
+  FaceElement* tmpElem = firstElem;
+
+  
+  while(strcmp (faceString, "\0"))
+    {
+      if (elemCount>0)
+	  tmpElem = tmpElem->next = new FaceElement;
+      tmpElem->next = NULL;
+
+
+      sscanf (faceString, "%s", tmpElem->value);
+      faceString += strlen(tmpElem->value);
+      if (strcmp (faceString, "\0"))
+	faceString++;
+      elemCount++;
+
+
+    }
+  
+  
+  if (elemCount == 3)
+    {
+      if (currentGroup->faceMode != 3)
+	{
+	  if (currentGroup->faceMode != -1)
+	    glEnd();
+	  glBegin(GL_TRIANGLES);
+	}
+      
+      currentGroup->faceMode = 3;
+      if (verbose >=3)
+	printf ("found triag.\n");
+    }
+  
+  else if (elemCount == 4)
+    {
+      if (currentGroup->faceMode != 4)
+	{
+	  if (currentGroup->faceMode != -1)
+	    glEnd();
+	  glBegin(GL_QUADS);
+	}
+      currentGroup->faceMode = 4;
+      if (verbose >=3 )
+	printf ("found quad.\n");
+    }
+  
+  else if (elemCount > 4)
+    {
+      if (currentGroup->faceMode != -1)
+	glEnd();
+      glBegin(GL_POLYGON);
+      if (verbose >=3)
+	printf ("Polygon with %i faces found.", elemCount);
+      currentGroup->faceMode = elemCount;
+    }
+
+  tmpElem = firstElem;
+  FaceElement* delElem;
+  while (tmpElem != NULL)
+    {
+      //      printf ("%s\n", tmpElem->value);
+      addGLElement(tmpElem->value);
+      delElem = tmpElem;
+      tmpElem = tmpElem->next;
+      delete delElem;
+    }
+
+}
+
+/**
+   \brief Adds a Face-element (one vertex of a face) with all its information. 
+   It does this by searching:
+   1. The Vertex itself
+   2. The VertexNormale
+   3. The VertexTextureCoordinate
+   merging this information, the face will be drawn.
+
+*/
+bool Object::addGLElement (char* elementString)
+{
+  if (verbose >=3)
+    printf ("importing grafical Element to openGL\n");
+  char* vertex = elementString;
+
+  char* texture;
+  if ((texture = strstr (vertex, "/")) != NULL)
+    {
+      texture[0] = '\0';
+      texture ++;
+      if (verbose>=3)
+	printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
+      glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
+
+      char* normal;
+      if ((normal = strstr (texture, "/")) !=NULL)
+	{
+	  normal[0] = '\0';
+	  normal ++;
+	  //glArrayElement(atoi(vertex)-1);
+	  glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
+	}
+    }
+  if (verbose>=3)
+    printf ("includeing vertex #%i, and mapping it to group vertex #%i, vertexArray has %i entries.\n", atoi(vertex), (atoi(vertex)-1 - currentGroup->firstVertex)*3, currentGroup->vertices->getCount());
+  glVertex3fv(currentGroup->vertices->getArray() +(atoi(vertex)-1 - currentGroup->firstVertex)*3);
+
+}
+
+/**
+   \brief parses a vertexNormal-String
+   If a vertexNormal line is found this function will inject it into the vertexNormal-Array
+   \param normalString The String that will be parsed.
+*/
+bool Object::readVertexNormal (char* normalString)
+{
+  readingVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (normalString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >=3 )
+    printf("found vertex-Normal %s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
+  currentGroup->normals->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
+  return true;
+}
+
+/**
+   \brief parses a vertexTextureCoordinate-String
+   If a vertexTextureCoordinate line is found this function will inject it into the vertexTexture-Array
+   \param vTextureString The String that will be parsed.
+*/
+bool Object::readVertexTexture (char* vTextureString)
+{
+  readingVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  sscanf (vTextureString, "%s %s", subbuffer1, subbuffer2);
+  if (verbose >=3 )
+    printf("found vertex-Texture %s, %s\n", subbuffer1,subbuffer2);
+  currentGroup->vTexture->addEntry(atof(subbuffer1));
+  currentGroup->vTexture->addEntry(atof(subbuffer2));
+  return true;
+}
+
+/**
+   \brief parses a group String
+   This function initializes a new Group. 
+   With it you should be able to import .obj-files with more than one Objects inside. 
+   \param groupString the new Group to create
+*/
+bool Object::readGroup (char* groupString)
+{
+  // setting the group name if not default.
+  if (strcmp(currentGroup->name, "default"))
+    {
+      currentGroup->name = (char*) malloc ( strlen(groupString) * sizeof (char));
+      strcpy(currentGroup->name, groupString);
+    }
+  if (groupCount != 0 && currentGroup->faceCount>0)
+    {
+      Group* newGroup = new Group;
+      finalizeGroup(currentGroup);
+      currentGroup->nextGroup = newGroup;
+      initGroup(newGroup);
+      cleanupGroup(currentGroup); // deletes the arrays of the group; must be after initGroup.
+      currentGroup = newGroup; // must be after init see initGroup for more info
+    }
+
+  ++groupCount;
+
+}
+
+/** 
+    \brief Function to read in a mtl File.
+    this Function parses all Lines of an mtl File
+    \param mtlFile The .mtl file to read
+*/
+bool Object::readMtlLib (char* mtlFile)
+{
+  MTL_FILE = new ifstream (mtlFile);
+  if (!MTL_FILE->is_open())
+    {
+      if (verbose >= 1)
+	printf ("unable to open file: %s\n", mtlFile);
+      return false;
+    }
+  mtlFileName = mtlFile;
+  if (verbose >=2)
+    printf ("Opening mtlFile: %s\n", mtlFileName);
+  char Buffer[500];
+  Material* tmpMat = material;
+  while(!MTL_FILE->eof())
+    {
+      MTL_FILE->getline(Buffer, 500);
+      if (verbose >= 4)
+	printf("found line in mtlFile: %s\n", Buffer);
+      
+
+      // create new Material
+      if (!strncmp(Buffer, "newmtl ", 2))
+	{
+	  tmpMat = tmpMat->addMaterial(Buffer+7);
+	  //	  printf ("%s, %p\n", tmpMat->getName(), tmpMat);
+	}
+      // setting a illumMode
+      else if (!strncmp(Buffer, "illum", 5))
+	{
+	  tmpMat->setIllum(Buffer+6);
+
+	}
+      // setting Diffuse Color
+      else if (!strncmp(Buffer, "Kd", 2))
+	{
+	  tmpMat->setDiffuse(Buffer+3);
+	}
+      // setting Ambient Color
+      else if (!strncmp(Buffer, "Ka", 2))
+	{
+	  tmpMat->setAmbient(Buffer+3);
+	}
+      // setting Specular Color
+      else if (!strncmp(Buffer, "Ks", 2))
+	{
+	  tmpMat->setSpecular(Buffer+3);
+	}
+      // setting The Specular Shininess
+      else if (!strncmp(Buffer, "Ns", 2))
+	{
+	  tmpMat->setShininess(Buffer+3);
+	}
+      // setting up transparency
+      else if (!strncmp(Buffer, "d", 1))
+	{
+	  tmpMat->setTransparency(Buffer+2);
+	}
+      else if (!strncpy(Buffer, "Tf", 2))
+	{
+	  tmpMat->setTransparency(Buffer+3);
+	}
+
+    }
+  return true;
+}
+
+/**
+   \brief Function that selects a material, if changed in the obj file.
+   \param matString the Material that will be set.
+*/
+
+bool Object::readUseMtl (char* matString)
+{
+  if (!strcmp (mtlFileName, ""))
+    {
+      if (verbose >= 1)
+	printf ("Not using new defined material, because no mtlFile found yet\n");
+      return false;
+    }
+      
+  if (currentGroup->faceMode != -1)
+    glEnd();
+  currentGroup->faceMode = 0;
+  if (verbose >= 2)
+    printf ("using material %s for coming Faces.\n", matString);
+  material->search(matString)->select();
+}
+
+/**
+   \brief Includes a default object
+   This will inject a Cube, because this is the most basic object.
+*/
+void Object::BoxObject(void)
+{
+  readVertex ("-0.500000 -0.500000 0.500000");
+  readVertex ("0.500000 -0.500000 0.500000");
+  readVertex ("-0.500000 0.500000 0.500000");
+  readVertex ("0.500000 0.500000 0.500000");
+  readVertex ("-0.500000 0.500000 -0.500000");
+  readVertex ("0.500000 0.500000 -0.500000");
+  readVertex ("-0.500000 -0.500000 -0.500000");
+  readVertex ("0.500000 -0.500000 -0.500000");
+  readVertexTexture ("0.000000 0.000000");
+  readVertexTexture ("1.000000 0.000000");
+  readVertexTexture ("0.000000 1.000000");
+  readVertexTexture ("1.000000 1.000000");
+  readVertexTexture ("0.000000 2.000000");
+  readVertexTexture ("1.000000 2.000000");
+  readVertexTexture ("0.000000 3.000000");
+  readVertexTexture ("1.000000 3.000000");
+  readVertexTexture ("0.000000 4.000000");
+  readVertexTexture ("1.000000 4.000000");
+  readVertexTexture ("2.000000 0.000000");
+  readVertexTexture ("2.000000 1.000000");
+  readVertexTexture ("-1.000000 0.000000");
+  readVertexTexture ("-1.000000 1.000000");
+  
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+
+  readFace ("1/1/1 2/2/2 4/4/3 3/3/4");
+  readFace ("3/3/5 4/4/6 6/6/7 5/5/8");
+  readFace ("5/5/9 6/6/10 8/8/11 7/7/12");
+  readFace ("7/7/13 8/8/14 2/10/15 1/9/16");
+  readFace ("2/2/17 8/11/18 6/12/19 4/4/20");
+  readFace ("7/13/21 1/1/22 3/3/23 5/14/24");
+}
Index: orxonox/branches/sound/importer/object.h
===================================================================
--- orxonox/branches/sound/importer/object.h	(revision 2964)
+++ orxonox/branches/sound/importer/object.h	(revision 2964)
@@ -0,0 +1,103 @@
+/*!
+  \file object.h
+  \brief Contains the Object Class that handles 3D-Objects
+*/
+
+#ifndef _OBJECT_H
+#define _OBJECT_H
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#include "array.h"
+#include "material.h"
+#include <fstream>
+
+using namespace std;
+
+extern int verbose; //!< fill be removed and added again as a verbose-class
+
+
+struct FaceElement
+{
+  char value[20];
+  FaceElement* next;
+};
+
+//! Class that handles 3D-Objects. it can also read them in and display them.
+class Object
+{
+ public:
+  Object ();
+  Object (char* fileName);
+  Object(char* fileName, float scaling);
+  ~Object ();
+  
+  bool importFile (char* fileName);
+  bool initialize (void);
+  bool finalize(void);
+  void draw (void);
+  void draw (int groupNumber);
+  void draw (char* groupName);
+  int getGroupCount();
+
+ private:
+  //! Group to handle multiple Objects per obj-file
+  struct Group
+  {
+    char* name;
+
+    GLuint listNumber;
+    Array* vertices;
+    int verticesCount;
+    Array* colors;
+    Array* normals;
+    Array* vTexture;
+    int faceMode;
+    int faceCount;
+
+    int firstVertex;
+    int firstNormal;
+    int firstVertexTexture;
+
+    Group* nextGroup;
+  };
+  
+  Group* firstGroup; //!< the first of all groups.
+  Group* currentGroup; //!< the currentGroup. this is the one we will work with.
+  int groupCount;
+
+  bool readingVertices;
+
+  char* objFileName;
+  char* mtlFileName;
+
+  Material* material;
+  float scaleFactor;
+
+  ifstream* OBJ_FILE;
+  ifstream* MTL_FILE;
+
+  bool initGroup(Group* group);
+  bool finalizeGroup (Group* group);
+  bool cleanupGroup(Group* group);
+
+
+  ///// readin ///
+  bool readFromObjFile (char* fileName);
+  
+  bool readVertex (char* vertexString);
+  bool readFace (char* faceString);
+  bool readVT (char* vtString);
+  bool readVertexNormal (char* normalString);
+  bool readVertexTexture (char* vTextureString);
+  bool readGroup (char* groupString);
+  bool readMtlLib (char* matFile);
+  bool readUseMtl (char* mtlString);
+
+  bool addGLElement (char* elementString);
+
+  void BoxObject (void);
+};
+
+#endif
Index: orxonox/branches/sound/importer/toDo
===================================================================
--- orxonox/branches/sound/importer/toDo	(revision 2964)
+++ orxonox/branches/sound/importer/toDo	(revision 2964)
@@ -0,0 +1,6 @@
+toDO list for orxonox/importer:
+
+groupName is set on the wrong place, if set on the right programm will kill itself.
+
+ray03.obj from nomenes gives back a free, that has no reference.
+
Index: orxonox/branches/sound/importer/vector.cc
===================================================================
--- orxonox/branches/sound/importer/vector.cc	(revision 2964)
+++ orxonox/branches/sound/importer/vector.cc	(revision 2964)
@@ -0,0 +1,844 @@
+
+
+/* 
+   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 
+   co-programmer: Patrick Boenzli : Vector::scale()
+                                    Vector::abs()
+   
+   Quaternion code borrowed from an Gamasutra article by Nick Bobick and Ken Shoemake
+*/
+
+
+#include "vector.h"
+
+
+using namespace std;
+
+/**
+   \brief add two vectors
+   \param v: the other vector
+   \return the sum of both vectors
+*/
+Vector Vector::operator+ (const Vector& v) const
+{
+  Vector r;
+
+  r.x = x + v.x;
+  r.y = y + v.y;
+  r.z = z + v.z;
+  
+  return r;
+}
+
+/**
+   \brief subtract a vector from another
+   \param v: the other vector
+   \return the difference between the vectors
+*/
+Vector Vector::operator- (const Vector& v) const
+{
+  Vector r;
+  
+  r.x = x - v.x;
+  r.y = y - v.y;
+  r.z = z - v.z;
+  
+  return r;
+}
+
+/**
+   \brief calculate the dot product of two vectors
+   \param v: the other vector
+   \return the dot product of the vectors
+*/
+float Vector::operator* (const Vector& v) const
+{
+  return x*v.x+y*v.y+z*v.z;
+}
+
+/**
+   \brief multiply a vector with a float
+   \param f: the factor
+   \return the vector multipied by f
+*/
+Vector Vector::operator* (float f) const
+{  
+  Vector r;
+  
+  r.x = x * f;
+  r.y = y * f;
+  r.z = z * f;
+  
+  return r;
+}
+
+/**
+   \brief divide a vector with a float
+   \param f: the divisor
+   \return the vector divided by f   
+*/
+Vector Vector::operator/ (float f) const
+{
+  Vector r;
+  
+  if( f == 0.0)
+  {
+    // Prevent divide by zero
+    return Vector (0,0,0);
+  }
+  
+  r.x = x / f;
+  r.y = y / f;
+  r.z = z / f;
+  
+  return r;
+}
+
+/**
+   \brief calculate the dot product of two vectors
+   \param v: the other vector
+   \return the dot product of the vectors
+*/
+float Vector::dot (const Vector& v) const
+{
+  return x*v.x+y*v.y+z*v.z;
+}
+
+/**
+  \brief calculate the cross product of two vectors
+  \param v: the other vector
+	\return the cross product of the vectors
+*/
+Vector Vector::cross (const Vector& v) const
+{
+  Vector r;
+  
+  r.x = y * v.z - z * v.y;
+  r.y = z * v.x - x * v.z;
+  r.z = x * v.y - y * v.x;
+  
+  return r;
+}
+  
+/**
+   \brief normalizes the vector to lenght 1.0
+*/
+void Vector::normalize ()
+{
+  float l = len();
+  
+  if( l == 0.0)
+  {
+    // Prevent divide by zero
+    return;
+  }
+  
+  x = x / l;
+  y = y / l;
+  z = z / l;
+}
+
+
+/**
+   \bref returns the voctor normalized to length 1.0
+*/
+
+Vector* Vector::getNormalized()
+{
+  float l = len();
+  if(l != 1.0)
+    {
+      return this;
+    }
+  else if(l == 0.0)
+    {
+      return 0;
+    }
+  
+  Vector *normalizedVector = new Vector(x / l, y /l, z / l);
+  return normalizedVector;
+}
+
+
+void Vector::scale(const Vector& v)
+{
+  x *= v.x;
+  y *= v.y;
+  z *= v.z;
+}
+
+ 
+/**
+   \brief calculates the lenght of the vector
+   \return the lenght of the vector
+*/
+float Vector::len () const
+{
+  return sqrt (x*x+y*y+z*z);
+}
+
+
+
+Vector Vector::abs() 
+{
+  Vector v(fabs(x), fabs(y), fabs(z));
+  return v;
+}
+
+
+/**
+   \brief calculate the angle between two vectors in radiances
+   \param v1: a vector
+   \param v2: another vector
+   \return the angle between the vectors in radians
+*/
+float angle_rad (const Vector& v1, const Vector& v2)
+{
+  return acos( v1 * v2 / (v1.len() * v2.len()));
+}
+
+
+/**
+   \brief calculate the angle between two vectors in degrees
+   \param v1: a vector
+   \param v2: another vector
+   \return the angle between the vectors in degrees
+*/
+float angle_deg (const Vector& v1, const Vector& v2)
+{
+  float f;
+  f = acos( v1 * v2 / (v1.len() * v2.len()));
+  return f * 180 / PI;
+}
+
+/**
+	\brief creates a multiplicational identity Quaternion
+*/
+Quaternion::Quaternion ()
+{
+	w = 1;
+	v = Vector(0,0,0);
+}
+
+/**
+	\brief turns a rotation along an axis into a Quaternion
+	\param angle: the amount of radians to rotate
+	\param axis: the axis to rotate around
+*/
+Quaternion::Quaternion (float angle, const Vector& axis)
+{
+	w = cos(angle/2);
+	v = axis * sin(angle/2);
+}
+
+/**
+   \brief calculates a look_at rotation
+   \param dir: the direction you want to look
+   \param up: specify what direction up should be
+   
+   Mathematically this determines the rotation a (0,0,1)-Vector has to undergo to point
+   the same way as dir. If you want to use this with cameras, you'll have to reverse the
+   dir Vector (Vector(0,0,0) - your viewing direction) or you'll point the wrong way. You
+   can use this for meshes as well (then you do not have to reverse the vector), but keep 
+   in mind that if you do that, the model's front has to point in +z direction, and left 
+   and right should be -x or +x respectively or the mesh wont rotate correctly.
+*/
+Quaternion::Quaternion (const Vector& dir, const Vector& up)
+{
+  Vector z = dir;
+  z.normalize(); 
+  Vector x = up.cross(z);
+  x.normalize(); 
+  Vector y = z.cross(x);
+  
+  float m[4][4];
+  m[0][0] = x.x;
+  m[0][1] = x.y;
+  m[0][2] = x.z;
+  m[0][3] = 0;
+  m[1][0] = y.x;
+  m[1][1] = y.y;
+  m[1][2] = y.z;
+  m[1][3] = 0;
+  m[2][0] = z.x;
+  m[2][1] = z.y;
+  m[2][2] = z.z;
+  m[2][3] = 0;
+  m[3][0] = 0;
+  m[3][1] = 0;
+  m[3][2] = 0;
+  m[3][3] = 1;
+  
+  *this = Quaternion (m);
+}
+
+/**
+	\brief calculates a rotation from euler angles
+	\param roll: the roll in radians
+	\param pitch: the pitch in radians
+	\param yaw: the yaw in radians
+	
+	I DO HONESTLY NOT EXACTLY KNOW WHICH ANGLE REPRESENTS WHICH ROTATION. And I do not know 
+	in what order they are applied,	I just copy-pasted the code.
+*/
+Quaternion::Quaternion (float roll, float pitch, float yaw)
+{
+	float cr, cp, cy, sr, sp, sy, cpcy, spsy;
+	
+	// calculate trig identities
+	cr = cos(roll/2);
+	cp = cos(pitch/2);
+	cy = cos(yaw/2);
+	
+	sr = sin(roll/2);
+	sp = sin(pitch/2);
+	sy = sin(yaw/2);
+	
+	cpcy = cp * cy;
+	spsy = sp * sy;
+	
+	w = cr * cpcy + sr * spsy;
+	v.x = sr * cpcy - cr * spsy;
+	v.y = cr * sp * cy + sr * cp * sy;
+	v.z = cr * cp * sy - sr * sp * cy;
+}
+
+/**
+	\brief rotates one Quaternion by another
+	\param q: another Quaternion to rotate this by
+	\return a quaternion that represents the first one rotated by the second one (WARUNING: this operation is not commutative! e.g. (A*B) != (B*A))
+*/
+Quaternion Quaternion::operator*(const Quaternion& q) const
+{
+	float A, B, C, D, E, F, G, H;
+	Quaternion r;
+	
+	A = (w   + v.x)*(q.w   + q.v.x);
+	B = (v.z - v.y)*(q.v.y - q.v.z);
+	C = (w   - v.x)*(q.v.y + q.v.z); 
+	D = (v.y + v.z)*(q.w   - q.v.x);
+	E = (v.x + v.z)*(q.v.x + q.v.y);
+	F = (v.x - v.z)*(q.v.x - q.v.y);
+	G = (w   + v.y)*(q.w   - q.v.z);
+	H = (w   - v.y)*(q.w   + q.v.z);
+	
+	r.w = B +  (-E - F + G + H)/2;
+	r.v.x = A - (E + F + G + H)/2; 
+	r.v.y = C + (E - F + G - H)/2; 
+	r.v.z = D + (E - F - G + H)/2;
+	
+	return r;
+}
+
+/**
+	\brief add two Quaternions
+	\param q: another Quaternion
+	\return the sum of both Quaternions
+*/
+Quaternion Quaternion::operator+(const Quaternion& q) const
+{
+	Quaternion r(*this);
+	r.w = r.w + q.w;
+	r.v = r.v + q.v;
+	return r;
+}
+
+/**
+	\brief subtract two Quaternions
+	\param q: another Quaternion
+	\return the difference of both Quaternions
+*/
+Quaternion Quaternion::operator- (const Quaternion& q) const
+{
+	Quaternion r(*this);
+	r.w = r.w - q.w;
+	r.v = r.v - q.v;
+	return r;
+}
+
+/**
+	\brief rotate a Vector by a Quaternion
+	\param v: the Vector
+	\return a new Vector representing v rotated by the Quaternion
+*/
+Vector Quaternion::apply (Vector& v) const
+{
+	Quaternion q;
+	q.v = v;
+	q.w = 0;
+	q = *this * q * conjugate();
+	return q.v;
+}
+
+/**
+	\brief multiply a Quaternion with a real value
+	\param f: a real value
+	\return a new Quaternion containing the product
+*/
+Quaternion Quaternion::operator*(const float& f) const
+{
+	Quaternion r(*this);
+	r.w = r.w*f;
+	r.v = r.v*f;
+	return r;
+}
+
+/**
+	\brief divide a Quaternion by a real value
+	\param f: a real value
+	\return a new Quaternion containing the quotient
+*/
+Quaternion Quaternion::operator/(const float& f) const
+{
+	if( f == 0) return Quaternion();
+	Quaternion r(*this);
+	r.w = r.w/f;
+	r.v = r.v/f;
+	return r;
+}
+
+/**
+	\brief calculate the conjugate value of the Quaternion
+	\return the conjugate Quaternion
+*/
+Quaternion Quaternion::conjugate() const
+{
+	Quaternion r(*this);
+	r.v = Vector() - r.v;
+	return r;
+}
+
+/**
+	\brief calculate the norm of the Quaternion
+	\return the norm of The Quaternion
+*/
+float Quaternion::norm() const
+{
+	return w*w + v.x*v.x + v.y*v.y + v.z*v.z;
+}
+
+/**
+	\brief calculate the inverse value of the Quaternion
+	\return the inverse Quaternion
+	
+	Note that this is equal to conjugate() if the Quaternion's norm is 1
+*/
+Quaternion Quaternion::inverse() const
+{
+	float n = norm();
+	if (n != 0)
+	{
+		return conjugate() / norm();
+	}
+	else return Quaternion();
+}
+
+/**
+	\brief convert the Quaternion to a 4x4 rotational glMatrix
+	\param m: a buffer to store the Matrix in
+*/
+void Quaternion::matrix (float m[4][4]) const
+{
+  float wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2; 
+  
+  // calculate coefficients
+  x2 = v.x + v.x;
+  y2 = v.y + v.y; 
+  z2 = v.z + v.z;
+  xx = v.x * x2; xy = v.x * y2; xz = v.x * z2;
+  yy = v.y * y2; yz = v.y * z2; zz = v.z * z2;
+  wx = w * x2; wy = w * y2; wz = w * z2;
+  
+  m[0][0] = 1.0 - (yy + zz); m[1][0] = xy - wz;
+  m[2][0] = xz + wy; m[3][0] = 0.0;
+	
+  m[0][1] = xy + wz; m[1][1] = 1.0 - (xx + zz);
+  m[2][1] = yz - wx; m[3][1] = 0.0;
+  
+  m[0][2] = xz - wy; m[1][2] = yz + wx;
+  m[2][2] = 1.0 - (xx + yy); m[3][2] = 0.0;
+  
+  m[0][3] = 0; m[1][3] = 0;
+  m[2][3] = 0; m[3][3] = 1;
+}
+
+
+void Quaternion::quatSlerp(const Quaternion* from, const Quaternion* to, float t, Quaternion* res)
+{
+  float tol[4];
+  double omega, cosom, sinom, scale0, scale1;
+  DELTA = 0.2;
+
+  cosom = from->v.x * to->v.x + from->v.y * to->v.y + from->v.z * to->v.z + from->w * to->w;
+
+  if( cosom < 0.0 ) 
+    { 
+      cosom = -cosom; 
+      tol[0] = -to->v.x;
+      tol[1] = -to->v.y;
+      tol[2] = -to->v.z;
+      tol[3] = -to->w;
+    }
+  else
+    {
+      tol[0] = to->v.x;
+      tol[1] = to->v.y;
+      tol[2] = to->v.z;
+      tol[3] = to->w;
+    }
+  
+  //if( (1.0 - cosom) > DELTA )
+  //{
+      omega = acos(cosom);
+      sinom = sin(omega);
+      scale0 = sin((1.0 - t) * omega) / sinom;
+      scale1 = sin(t * omega) / sinom;
+      //}
+      /*
+  else
+    {
+      scale0 = 1.0 - t;
+      scale1 = t;
+    }
+      */
+  res->v.x = scale0 * from->v.x + scale1 * tol[0];
+  res->v.y = scale0 * from->v.y + scale1 * tol[1];
+  res->v.z = scale0 * from->v.z + scale1 * tol[2];
+  res->w = scale0 * from->w + scale1 * tol[3];
+}
+
+
+/**
+   \brief convert a rotational 4x4 glMatrix into a Quaternion
+   \param m: a 4x4 matrix in glMatrix order
+*/
+Quaternion::Quaternion (float m[4][4])
+{
+	
+  float  tr, s, q[4];
+  int    i, j, k;
+
+  int nxt[3] = {1, 2, 0};
+
+  tr = m[0][0] + m[1][1] + m[2][2];
+
+  	// check the diagonal
+  if (tr > 0.0) 
+  {
+    s = sqrt (tr + 1.0);
+    w = s / 2.0;
+    s = 0.5 / s;
+    v.x = (m[1][2] - m[2][1]) * s;
+    v.y = (m[2][0] - m[0][2]) * s;
+    v.z = (m[0][1] - m[1][0]) * s;
+	} 
+	else 
+	{
+ 		// diagonal is negative
+  	i = 0;
+  	if (m[1][1] > m[0][0]) i = 1;
+    if (m[2][2] > m[i][i]) i = 2;
+    j = nxt[i];
+    k = nxt[j];
+
+    s = sqrt ((m[i][i] - (m[j][j] + m[k][k])) + 1.0);
+      
+    q[i] = s * 0.5;
+            
+    if (s != 0.0) s = 0.5 / s;
+	
+	  q[3] = (m[j][k] - m[k][j]) * s;
+    q[j] = (m[i][j] + m[j][i]) * s;
+    q[k] = (m[i][k] + m[k][i]) * s;
+
+  	v.x = q[0];
+  	v.y = q[1];
+  	v.z = q[2];
+  	w = q[3];
+  }
+}
+
+/**
+   \brief create a rotation from a vector
+   \param v: a vector
+*/
+Rotation::Rotation (const Vector& v)
+{
+  Vector x = Vector( 1, 0, 0);
+  Vector axis = x.cross( v);
+  axis.normalize();
+  float angle = angle_rad( x, v);
+  float ca = cos(angle);
+  float sa = sin(angle);
+  m[0] = 1.0f+(1.0f-ca)*(axis.x*axis.x-1.0f);
+  m[1] = -axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[2] = axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[3] = axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[4] = 1.0f+(1.0f-ca)*(axis.y*axis.y-1.0f);
+  m[5] = -axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[6] = -axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[7] = axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[8] = 1.0f+(1.0f-ca)*(axis.z*axis.z-1.0f);
+}
+
+/**
+   \brief creates a rotation from an axis and an angle (radians!)
+   \param axis: the rotational axis
+   \param angle: the angle in radians
+*/
+Rotation::Rotation (const Vector& axis, float angle)
+{
+  float ca, sa;
+  ca = cos(angle);
+  sa = sin(angle);
+  m[0] = 1.0f+(1.0f-ca)*(axis.x*axis.x-1.0f);
+  m[1] = -axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[2] = axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[3] = axis.z*sa+(1.0f-ca)*axis.x*axis.y;
+  m[4] = 1.0f+(1.0f-ca)*(axis.y*axis.y-1.0f);
+  m[5] = -axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[6] = -axis.y*sa+(1.0f-ca)*axis.x*axis.z;
+  m[7] = axis.x*sa+(1.0f-ca)*axis.y*axis.z;
+  m[8] = 1.0f+(1.0f-ca)*(axis.z*axis.z-1.0f);
+}
+
+/**
+   \brief creates a rotation from euler angles (pitch/yaw/roll)
+   \param pitch: rotation around z (in radians)
+   \param yaw: rotation around y (in radians)
+   \param roll: rotation around x (in radians)
+*/
+Rotation::Rotation ( float pitch, float yaw, float roll)
+{
+  float cy, sy, cr, sr, cp, sp;
+  cy = cos(yaw);
+  sy = sin(yaw);
+  cr = cos(roll);
+  sr = sin(roll);
+  cp = cos(pitch);
+  sp = sin(pitch);
+  m[0] = cy*cr;
+  m[1] = -cy*sr;
+  m[2] = sy;
+  m[3] = cp*sr+sp*sy*cr;
+  m[4] = cp*cr-sp*sr*sy;
+  m[5] = -sp*cy;
+  m[6] = sp*sr-cp*sy*cr;
+  m[7] = sp*cr+cp*sy*sr;
+  m[8] = cp*cy;
+}
+
+/**
+   \brief creates a nullrotation (an identity rotation)
+*/
+Rotation::Rotation ()
+{
+  m[0] = 1.0f;
+  m[1] = 0.0f;
+  m[2] = 0.0f;
+  m[3] = 0.0f;
+  m[4] = 1.0f;
+  m[5] = 0.0f;
+  m[6] = 0.0f;
+  m[7] = 0.0f;
+  m[8] = 1.0f;
+}
+
+/**
+   \brief fills the specified buffer with a 4x4 glmatrix
+   \param buffer: Pointer to an array of 16 floats
+   
+   Use this to get the rotation in a gl-compatible format
+*/
+void Rotation::glmatrix (float* buffer)
+{
+	buffer[0] = m[0];
+	buffer[1] = m[3];
+	buffer[2] = m[6];
+	buffer[3] = m[0];
+	buffer[4] = m[1];
+	buffer[5] = m[4];
+	buffer[6] = m[7];
+	buffer[7] = m[0];
+	buffer[8] = m[2];
+	buffer[9] = m[5];
+	buffer[10] = m[8];
+	buffer[11] = m[0];
+	buffer[12] = m[0];
+	buffer[13] = m[0];
+	buffer[14] = m[0];
+	buffer[15] = m[1];
+}
+
+/**
+   \brief multiplies two rotational matrices
+   \param r: another Rotation
+   \return the matrix product of the Rotations
+   
+   Use this to rotate one rotation by another
+*/
+Rotation Rotation::operator* (const Rotation& r)
+{
+	Rotation p;
+	
+	p.m[0] = m[0]*r.m[0] + m[1]*r.m[3] + m[2]*r.m[6];
+	p.m[1] = m[0]*r.m[1] + m[1]*r.m[4] + m[2]*r.m[7];
+	p.m[2] = m[0]*r.m[2] + m[1]*r.m[5] + m[2]*r.m[8];
+	
+	p.m[3] = m[3]*r.m[0] + m[4]*r.m[3] + m[5]*r.m[6];
+	p.m[4] = m[3]*r.m[1] + m[4]*r.m[4] + m[5]*r.m[7];
+	p.m[5] = m[3]*r.m[2] + m[4]*r.m[5] + m[5]*r.m[8];
+
+	p.m[6] = m[6]*r.m[0] + m[7]*r.m[3] + m[8]*r.m[6];
+	p.m[7] = m[6]*r.m[1] + m[7]*r.m[4] + m[8]*r.m[7];
+	p.m[8] = m[6]*r.m[2] + m[7]*r.m[5] + m[8]*r.m[8];
+	
+	return p;
+}
+
+
+/**
+   \brief rotates the vector by the given rotation
+   \param v: a vector
+   \param r: a rotation
+   \return the rotated vector
+*/
+Vector rotate_vector( const Vector& v, const Rotation& r)
+{
+  Vector t;
+  
+  t.x = v.x * r.m[0] + v.y * r.m[1] + v.z * r.m[2];
+  t.y = v.x * r.m[3] + v.y * r.m[4] + v.z * r.m[5];
+  t.z = v.x * r.m[6] + v.y * r.m[7] + v.z * r.m[8];
+
+  return t;
+}
+
+/**
+   \brief calculate the distance between two lines
+   \param l: the other line
+   \return the distance between the lines
+*/
+float Line::distance (const Line& l) const
+{
+  float q, d;
+  Vector n = a.cross(l.a);
+  q = n.dot(r-l.r);
+  d = n.len();
+  if( d == 0.0) return 0.0;
+  return q/d;
+}
+
+/**
+   \brief calculate the distance between a line and a point
+   \param v: the point
+   \return the distance between the Line and the point
+*/
+float Line::distance_point (const Vector& v) const
+{
+  Vector d = v-r;
+  Vector u = a * d.dot( a);
+  return (d - u).len();
+}
+
+/**
+   \brief calculate the two points of minimal distance of two lines
+   \param l: the other line
+   \return a Vector[2] (!has to be deleted after use!) containing the two points of minimal distance
+*/
+Vector* Line::footpoints (const Line& l) const
+{
+  Vector* fp = new Vector[2];
+  Plane p = Plane (r + a.cross(l.a), r, r + a);
+  fp[1] = p.intersect_line (l);
+  p = Plane (fp[1], l.a);
+  fp[0] = p.intersect_line (*this);
+  return fp;
+}
+
+/**
+  \brief calculate the length of a line
+  \return the lenght of the line 
+*/
+float Line::len() const
+{
+  return a.len();
+}
+
+/**
+   \brief rotate the line by given rotation
+   \param rot: a rotation
+*/
+void Line::rotate (const Rotation& rot)
+{
+  Vector t = a + r;
+  t = rotate_vector( t, rot);
+  r = rotate_vector( r, rot),
+  a = t - r;
+}
+
+/**
+   \brief create a plane from three points
+   \param a: first point
+   \param b: second point
+   \param c: third point
+*/
+Plane::Plane (Vector a, Vector b, Vector c)
+{
+  n = (a-b).cross(c-b);
+  k = -(n.x*b.x+n.y*b.y+n.z*b.z);
+}
+
+/**
+   \brief create a plane from anchor point and normal
+   \param n: normal vector
+   \param p: anchor point
+*/
+Plane::Plane (Vector norm, Vector p)
+{
+  n = norm;
+  k = -(n.x*p.x+n.y*p.y+n.z*p.z);
+}
+
+/**
+   \brief returns the intersection point between the plane and a line
+   \param l: a line
+*/
+Vector Plane::intersect_line (const Line& l) const
+{
+  if (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z == 0.0) return Vector(0,0,0);
+  float t = (n.x*l.r.x+n.y*l.r.y+n.z*l.r.z+k) / (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z);
+  return l.r + (l.a * t);
+}
+
+/**
+   \brief returns the distance between the plane and a point
+   \param p: a Point
+   \return the distance between the plane and the point (can be negative)
+*/
+float Plane::distance_point (const Vector& p) const
+{
+  float l = n.len();
+  if( l == 0.0) return 0.0;
+  return (n.dot(p) + k) / n.len();
+}
+
+/**
+   \brief returns the side a point is located relative to a Plane
+   \param p: a Point
+   \return 0 if the point is contained within the Plane, positive(negative) if the point is in the positive(negative) semi-space of the Plane
+*/
+float Plane::locate_point (const Vector& p) const
+{
+  return (n.dot(p) + k);
+}
Index: orxonox/branches/sound/importer/vector.h
===================================================================
--- orxonox/branches/sound/importer/vector.h	(revision 2964)
+++ orxonox/branches/sound/importer/vector.h	(revision 2964)
@@ -0,0 +1,151 @@
+/*! 
+    \file vector.h
+    \brief A basic 3D math framework
+    
+    Contains classes to handle vectors, lines, rotations and planes
+*/ 
+
+#ifndef VECTOR_H
+#define VECTOR_H
+
+#include <math.h>
+#define PI 3.14159265359f
+
+//! 3D Vector
+/**
+	Class to handle 3D Vectors
+*/
+class Vector {
+
+  public:
+ 
+  float x, y, z;
+
+  Vector (float x, float y, float z) : x(x), y(y), z(z) {}  //!< assignment constructor
+  Vector () : x(0), y(0), z(0) {}
+  ~Vector () {}
+
+  Vector operator+ (const Vector& v) const;
+  Vector operator- (const Vector& v) const;
+  float operator* (const Vector& v) const;
+  Vector operator* (float f) const;
+  Vector operator/ (float f) const;
+  float dot (const Vector& v) const;
+  Vector cross (const Vector& v) const;
+  void scale(const Vector& v);
+  float len() const;
+  void normalize();
+  Vector* getNormalized();
+  Vector abs();
+};
+
+float angle_deg (const Vector& v1, const Vector& v2);
+float angle_rad (const Vector& v1, const Vector& v2);
+
+//! Quaternion
+/**
+	Class to handle 3-dimensional rotation efficiently
+*/
+class Quaternion
+{
+ public:
+	Vector v;	//!< Imaginary Vector
+	float w; //!< Real part of the number
+
+ 	Quaternion ();
+ 	Quaternion (float m[4][4]);
+ 	Quaternion (float angle, const Vector& axis);
+ 	Quaternion (const Vector& dir, const Vector& up);
+ 	Quaternion (float roll, float pitch, float yaw);
+ 	
+ 	Quaternion operator/ (const float& f) const;
+ 	Quaternion operator* (const float& f) const;
+ 	Quaternion operator* (const Quaternion& q) const;
+	Quaternion operator+ (const Quaternion& q) const;
+	Quaternion operator- (const Quaternion& q) const;
+	Quaternion conjugate () const;
+	Quaternion inverse () const;
+ 	Vector apply (Vector& f) const;
+	float norm () const;
+	void matrix (float m[4][4]) const;
+	void quatSlerp(const Quaternion* from, const Quaternion* to, const float t, Quaternion* res);
+
+ private:
+	float DELTA;
+
+};
+
+//! 3D rotation (OBSOLETE)
+/**
+  Class to handle 3-dimensional rotations.
+  Can create a rotation from several inputs, currently stores rotation using a 3x3 Matrix
+*/
+class Rotation {
+  public:
+  
+  float m[9]; //!< 3x3 Rotation Matrix
+  
+  Rotation ( const Vector& v);
+  Rotation ( const Vector& axis, float angle);
+  Rotation ( float pitch, float yaw, float roll);
+  Rotation ();
+  ~Rotation () {}
+  
+  Rotation operator* (const Rotation& r);
+  
+  void glmatrix (float* buffer);
+};
+
+//!< Apply a rotation to a vector
+Vector rotate_vector( const Vector& v, const Rotation& r);
+
+//! 3D line
+/**
+  Class to store Lines in 3-dimensional space
+
+  Supports line-to-line distance measurements and rotation
+*/
+class Line
+{
+  public:
+  
+  Vector r;   //!< Offset
+  Vector a;   //!< Direction
+  
+  Line ( Vector r, Vector a) : r(r), a(a) {}  //!< assignment constructor
+  Line () : r(Vector(0,0,0)), a(Vector (1,1,1)) {}
+  ~Line () {}
+  
+  float distance (const Line& l) const;
+  float distance_point (const Vector& v) const;
+  Vector* footpoints (const Line& l) const;
+  float len () const;
+  
+  void rotate(const Rotation& rot);
+};
+
+//! 3D plane
+/**
+  Class to handle planes in 3-dimensional space
+  
+  Critical for polygon-based collision detection
+*/
+class Plane
+{
+  public:
+  
+  Vector n;   //!< Normal vector
+  float k;    //!< Offset constant
+  
+  Plane (Vector a, Vector b, Vector c);
+  Plane (Vector norm, Vector p);
+  Plane (Vector n, float k) : n(n), k(k) {} //!< assignment constructor
+  Plane () : n(Vector(1,1,1)), k(0) {}
+  ~Plane () {}
+  
+  Vector intersect_line (const Line& l) const;
+  float distance_point (const Vector& p) const;
+  float locate_point (const Vector& p) const;
+};
+
+#endif
Index: orxonox/branches/sound/importer/windowHandler.cc
===================================================================
--- orxonox/branches/sound/importer/windowHandler.cc	(revision 2964)
+++ orxonox/branches/sound/importer/windowHandler.cc	(revision 2964)
@@ -0,0 +1,81 @@
+
+
+#include "windowHandler.h"
+#include <stdio.h>
+void WindowHandler::ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
+{
+	if (height==0)	// Prevent A Divide By Zero By
+	{
+		height=1;// Making Height Equal One
+	}
+
+	glViewport(0,0,width,height); // Reset The Current Viewport
+
+	
+	glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
+	glLoadIdentity();	
+
+
+	// Calculate The Aspect Ratio Of The Window
+	gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);
+	gluLookAt (0,0,15, 0,0,0, 0,1,0);
+
+	glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
+	glLoadIdentity(); // Reset The Modelview Matrix
+
+}
+
+
+int WindowHandler::InitGL(GLvoid)										// All Setup For OpenGL Goes Here
+{
+	glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
+	glShadeModel(GL_SMOOTH); // Enable Smooth Shading
+	glClearColor(0.00f, 0.00f, 0.00f, 0.0f); // Black Background
+	glClearDepth(1.0f);  // Depth Buffer Setup
+	glEnable(GL_DEPTH_TEST); // Enables Depth Testing
+	glDepthFunc(GL_LEQUAL);	// The Type Of Depth Testing To Do
+	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);  // Really Nice Perspective Calculations
+
+    return TRUE;
+}
+
+
+GLvoid WindowHandler::KillGLWindow(GLvoid) // Properly Kill The Window
+{
+	SDL_Quit();
+}
+
+
+BOOL WindowHandler::CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag)
+{
+	Uint32 flags;
+	int size;
+
+	/* Initialize SDL */
+	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
+		fprintf(stderr, "Couldn't init SDL: %s\n", SDL_GetError());
+		return FALSE;
+	}
+
+	flags = SDL_OPENGL;
+	if ( fullscreenflag ) {
+		flags |= SDL_FULLSCREEN;
+	}
+	SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 1 );
+	if ( (screen = SDL_SetVideoMode(width, height, 0, flags)) == NULL ) {
+		return FALSE;
+	}
+	SDL_GL_GetAttribute( SDL_GL_STENCIL_SIZE, &size);
+
+	ReSizeGLScene(width, height); // Set Up Our Perspective GL Screen
+
+	if (!InitGL()) // Initialize Our Newly Created GL Window
+	{
+	  KillGLWindow();  // Reset The Display
+	  return FALSE;
+	}
+
+	return TRUE;
+}
+
+
Index: orxonox/branches/sound/importer/windowHandler.h
===================================================================
--- orxonox/branches/sound/importer/windowHandler.h	(revision 2964)
+++ orxonox/branches/sound/importer/windowHandler.h	(revision 2964)
@@ -0,0 +1,38 @@
+#ifndef _WINDOWHANDLER_H
+#define _WINDOWHANDLER_H
+
+extern int verbose;
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <SDL/SDL.h>
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+#ifdef __WIN32__
+#include <windows.h>
+#endif /* __WIN32__ */
+
+#define TRUE 1
+#define FALSE 0
+#define BOOL int
+
+class WindowHandler
+{
+  public:
+    WindowHandler() { };
+    ~WindowHandler() { };
+    GLvoid KillGLWindow(GLvoid);
+    BOOL CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag);
+    SDL_Surface* screen;
+  private:
+    int InitGL(GLvoid);
+    void ReSizeGLScene(GLsizei width, GLsizei height);  
+};
+
+
+#endif
Index: orxonox/branches/sound/src/Makefile
===================================================================
--- orxonox/branches/sound/src/Makefile	(revision 2963)
+++ orxonox/branches/sound/src/Makefile	(revision 2964)
@@ -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.
 # src/Makefile.  Generated from Makefile.in by configure.
 
-# 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,
@@ -15,4 +15,7 @@
 
 
+
+SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+
 srcdir = .
 top_srcdir = ..
@@ -22,7 +25,6 @@
 pkgincludedir = $(includedir)/orxonox
 top_builddir = ..
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /usr/bin/install -c
+INSTALL = /bin/install -c
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -36,11 +38,63 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-ACLOCAL = ${SHELL} /root/orxonox/branches/sound/missing --run aclocal-1.7
+bin_PROGRAMS = orxonox$(EXEEXT) sound$(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) game_loader.$(OBJEXT) \
+	campaign.$(OBJEXT) story_entity.$(OBJEXT)
+orxonox_OBJECTS = $(am_orxonox_OBJECTS)
+orxonox_LDADD = $(LDADD)
+am_sound_OBJECTS = sound_test.$(OBJEXT) sound_control.$(OBJEXT)
+sound_OBJECTS = $(am_sound_OBJECTS)
+sound_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+DEP_FILES = ./$(DEPDIR)/base_entity.Po \
+	./$(DEPDIR)/camera.Po ./$(DEPDIR)/campaign.Po \
+	./$(DEPDIR)/collision.Po \
+	./$(DEPDIR)/command_node.Po \
+	./$(DEPDIR)/data_tank.Po \
+	./$(DEPDIR)/game_loader.Po \
+	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
+	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
+	./$(DEPDIR)/sound_control.Po \
+	./$(DEPDIR)/sound_test.Po \
+	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
+	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
+	./$(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) $(sound_SOURCES)
+DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run aclocal-1.8
 AMDEP_FALSE = #
 AMDEP_TRUE = 
-AMTAR = ${SHELL} /root/orxonox/branches/sound/missing --run tar
-AUTOCONF = ${SHELL} /root/orxonox/branches/sound/missing --run autoconf
-AUTOHEADER = ${SHELL} /root/orxonox/branches/sound/missing --run autoheader
-AUTOMAKE = ${SHELL} /root/orxonox/branches/sound/missing --run automake-1.7
+AMTAR = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run tar
+AUTOCONF = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run automake-1.8
 AWK = gawk
 CC = gcc
@@ -66,7 +120,7 @@
 LDFLAGS = 
 LIBOBJS = 
-LIBS = -lm  -lGL -lGLU -lSDL_mixer -lSDL -lpthread -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
+LIBS = -lm  -lGL -lGLU -lSDL -lSDL_mixer -lpthread -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
 LTLIBOBJS = 
-MAKEINFO = ${SHELL} /root/orxonox/branches/sound/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run makeinfo
 MSBITFIELDS = 
 OBJEXT = o
@@ -83,5 +137,5 @@
 VERSION = 0.1-pre-alpha
 ac_ct_CC = gcc
-ac_ct_CXX = g++
+ac_ct_CXX = 
 ac_ct_STRIP = 
 am__fastdepCC_FALSE = #
@@ -99,9 +153,10 @@
 includedir = ${prefix}/include
 infodir = ${prefix}/info
-install_sh = /root/orxonox/branches/sound/install-sh
+install_sh = /home/bensch/svn/orxonox/branches/sound/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localstatedir = ${prefix}/var
 mandir = ${prefix}/man
+mkdir_p = mkdir -p -- .
 oldincludedir = /usr/include
 prefix = /usr/local
@@ -113,76 +168,43 @@
 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 sound
 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 game_loader.cc campaign.cc story_entity.cc
-
 sound_SOURCES = sound_test.cc sound_control.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
-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) sound$(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) game_loader.$(OBJEXT) campaign.$(OBJEXT) \
-	story_entity.$(OBJEXT)
-orxonox_OBJECTS = $(am_orxonox_OBJECTS)
-orxonox_LDADD = $(LDADD)
-orxonox_DEPENDENCIES =
-orxonox_LDFLAGS =
-am_sound_OBJECTS = sound_test.$(OBJEXT) sound_control.$(OBJEXT)
-sound_OBJECTS = $(am_sound_OBJECTS)
-sound_LDADD = $(LDADD)
-sound_DEPENDENCIES =
-sound_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-DEP_FILES = ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
-	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
-	./$(DEPDIR)/command_node.Po \
-	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/game_loader.Po \
-	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
-	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
-	./$(DEPDIR)/sound_control.Po \
-	./$(DEPDIR)/sound_test.Po \
-	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
-	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
-	./$(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) $(sound_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in INSTALL \
-	Makefile.am
-SOURCES = $(orxonox_SOURCES) $(sound_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)$$//'`; \
@@ -190,6 +212,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
@@ -199,6 +221,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
 
@@ -213,5 +235,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -238,33 +260,19 @@
 
 .cc.o:
-	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-	fi
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 #	source='$<' object='$@' libtool=no \
 #	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
 #	$(CXXDEPMODE) $(depcomp) \
-#	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+#	$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
-	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-	fi
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 #	source='$<' object='$@' libtool=no \
 #	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
 #	$(CXXDEPMODE) $(depcomp) \
-#	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+#	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 uninstall-info-am:
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -276,4 +284,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -287,8 +296,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) \
@@ -313,8 +323,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)
@@ -330,5 +336,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -348,7 +354,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
@@ -389,4 +396,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -424,9 +433,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/sound/src/Makefile.in
===================================================================
--- orxonox/branches/sound/src/Makefile.in	(revision 2963)
+++ orxonox/branches/sound/src/Makefile.in	(revision 2964)
@@ -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) $(sound_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,56 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+bin_PROGRAMS = orxonox$(EXEEXT) sound$(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) game_loader.$(OBJEXT) \
+	campaign.$(OBJEXT) story_entity.$(OBJEXT)
+orxonox_OBJECTS = $(am_orxonox_OBJECTS)
+orxonox_LDADD = $(LDADD)
+am_sound_OBJECTS = sound_test.$(OBJEXT) sound_control.$(OBJEXT)
+sound_OBJECTS = $(am_sound_OBJECTS)
+sound_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base_entity.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/camera.Po ./$(DEPDIR)/campaign.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/collision.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/game_loader.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/sound_control.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/sound_test.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/story_entity.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) $(sound_SOURCES)
+DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -104,4 +158,5 @@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
@@ -113,76 +168,43 @@
 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 sound
 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 game_loader.cc campaign.cc story_entity.cc
-
 sound_SOURCES = sound_test.cc sound_control.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
-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) sound$(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) game_loader.$(OBJEXT) campaign.$(OBJEXT) \
-	story_entity.$(OBJEXT)
-orxonox_OBJECTS = $(am_orxonox_OBJECTS)
-orxonox_LDADD = $(LDADD)
-orxonox_DEPENDENCIES =
-orxonox_LDFLAGS =
-am_sound_OBJECTS = sound_test.$(OBJEXT) sound_control.$(OBJEXT)
-sound_OBJECTS = $(am_sound_OBJECTS)
-sound_LDADD = $(LDADD)
-sound_DEPENDENCIES =
-sound_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/game_loader.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/sound_control.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/sound_test.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/story_entity.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) $(sound_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in INSTALL \
-	Makefile.am
-SOURCES = $(orxonox_SOURCES) $(sound_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)$$//'`; \
@@ -190,6 +212,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
@@ -199,6 +221,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
 
@@ -213,5 +235,5 @@
 
 mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
+	-rm -f *.$(OBJEXT)
 
 distclean-compile:
@@ -238,33 +260,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)
@@ -276,4 +284,5 @@
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
@@ -287,8 +296,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) \
@@ -313,8 +323,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)
@@ -330,5 +336,5 @@
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
@@ -348,7 +354,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
@@ -389,4 +396,6 @@
 dvi-am:
 
+html: html-am
+
 info: info-am
 
@@ -424,9 +433,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/sound/src/array.cc
===================================================================
--- orxonox/branches/sound/src/array.cc	(revision 2964)
+++ orxonox/branches/sound/src/array.cc	(revision 2964)
@@ -0,0 +1,139 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#include "array.h"
+
+/**
+   \brief creates a new Array
+*/
+Array::Array ()
+{
+  initializeArray ();
+}
+
+/**
+   \brief deletes an Array.
+   It does this by first deleting all the array-entries, and then delete the array[] itself
+*/
+Array::~Array()
+{
+  if (verbose >= 2)
+    printf("deleting array\n");
+  Entry* walker = firstEntry;
+  Entry* last;
+  while (walker != NULL)
+    {
+      last = walker;
+      walker = walker->next;
+      delete last;
+    }
+  if (finalized)
+    delete [] array;
+}
+
+/**
+   \brief initializes an Array
+   the Function does this by setting up a fistEntry, and setting the entryCount.
+*/
+void Array::initializeArray ()
+{
+  if (verbose >= 2)
+    printf ("crating new Array\n");
+  firstEntry = new Entry;
+  firstEntry->next =NULL;
+  currentEntry=firstEntry;
+  finalized = false;
+  entryCount = 0; //0 means one entry
+  return;
+}
+
+/**
+   \brief finalizes an array.
+   This Function creates the array, and makes it ready to be sent to the application.
+*/
+void Array::finalizeArray (void)
+{
+  if (verbose >= 3)
+    printf ("Finalizing array.\n");  
+  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
+  //  if ((array = new GLfloat [entryCount]) == NULL)
+    printf ("could not allocate %i data Blocks\n", entryCount);
+  Entry* walker = firstEntry;
+  for (int i=0; i<entryCount; i++)
+    {
+      array[i] = walker->value;
+      walker = walker->next;
+    }
+  finalized = true;
+
+  return;
+}
+
+/**
+   \brief adds a new Entry to the Array
+   \param entry Entry to add.
+*/
+void Array::addEntry (GLfloat entry)
+{
+  if (!finalized)
+    {
+      if (verbose >= 3)
+	printf ("adding new Entry to Array: %f\n", entry);
+      
+      currentEntry->value = entry;
+      currentEntry->next = new Entry;
+      currentEntry = currentEntry->next;
+      currentEntry->next = NULL;
+      ++entryCount;
+    }
+  else 
+    if (verbose >= 1)
+      printf ("adding failed, because list has been finalized\n");
+}
+
+/**
+   \brief Adds 3 entries at once (convenience)
+*/
+void Array::addEntry (GLfloat entry0, GLfloat entry1, GLfloat entry2)
+{
+  addEntry (entry0);
+  addEntry (entry1);
+  addEntry (entry2);
+}
+  
+/**
+   \brief Gives back the array !! MUST be executed AFTER finalize.
+   \returns The created array.
+*/
+GLfloat* Array::getArray ()
+{
+  return array;
+}
+
+/**
+   \returns The Count of entries in the Array
+*/
+int Array::getCount()
+{
+  return entryCount;
+}
+
+/**
+   \brief Simple debug info about the Array
+*/
+void Array::debug ()
+{
+  printf ("entryCount=%i, address=%p\n", entryCount, array);
+}
Index: orxonox/branches/sound/src/array.h
===================================================================
--- orxonox/branches/sound/src/array.h	(revision 2964)
+++ orxonox/branches/sound/src/array.h	(revision 2964)
@@ -0,0 +1,49 @@
+/*!
+  \file array.h
+  \brief Contains the Array Class that handles float arrays.
+  this class creates a Array of a semi-Dynamic length.
+  beware, that after finalizing the array may not be resized again.
+*/
+
+#ifndef _ARRAY_H
+#define _ARRAY_H
+
+extern int verbose; //!< will be obsolete soon
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <fstream>
+
+
+//! Array Class that handles dynamic-float arrays.
+class Array
+{
+ public:
+  Array ();
+  ~Array();
+
+  void initializeArray ();
+  void finalizeArray (void);
+  void addEntry (GLfloat entry);
+  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
+  
+  GLfloat* getArray ();
+  int getCount();
+  void debug(void);
+ private:
+  struct Entry
+  {
+    GLfloat value;
+    Entry* next;
+  };
+
+  GLfloat* array;
+  int entryCount;
+  bool finalized;
+  Entry* firstEntry;
+  Entry* currentEntry;
+  
+  
+};
+
+#endif
Index: orxonox/branches/sound/src/material.cc
===================================================================
--- orxonox/branches/sound/src/material.cc	(revision 2964)
+++ orxonox/branches/sound/src/material.cc	(revision 2964)
@@ -0,0 +1,293 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#include "material.h"
+
+/**
+   \brief creates a default Material with no Name
+   normally you call this to create a material List (for an obj-file) and then append with addMaterial()
+*/
+Material::Material()
+{
+  init();
+  
+  setName ("");
+}
+
+/**
+   \brief creates a Material.
+   \param mtlName Name of the Material to be added to the Material List
+*/
+Material::Material (char* mtlName)
+{
+  init();
+  
+  setName (mtlName);
+}
+
+/** 
+    \brief deletes a Material
+*/
+Material::~Material()
+{
+  if (verbose >= 2)
+    printf ("delete Material %s\n", name);
+  if (nextMat != NULL)
+    delete nextMat;
+}
+
+/**
+   \brief adds a new Material to the List.
+   this Function will append a new Material to the end of a Material List.
+   \param mtlName The name of the Material to be added.
+*/
+Material* Material::addMaterial(char* mtlName)
+{
+  if (verbose >=2)
+    printf ("adding Material %s\n", mtlName);
+  Material* newMat = new Material(mtlName);
+  Material* tmpMat = this;
+  while (tmpMat->nextMat != NULL)
+    {
+      tmpMat = tmpMat->nextMat;
+    }
+      tmpMat->nextMat = newMat;
+      return newMat;
+  
+}
+
+/**
+   \brief initializes a new Material with its default Values
+*/
+void Material::init(void)
+{
+  if (verbose >= 3)
+    printf ("initializing new Material\n");
+  nextMat = NULL;
+
+  setIllum(1);
+  setDiffuse(0,0,0);
+  setAmbient(0,0,0);
+  setSpecular(0,0,0);
+  setShininess(2.0);
+  setTransparency(0.0);
+  
+}
+
+/**
+   \brief Set the Name of the Material. (Important for searching)
+   \param mtlName the Name of the Material to be set.
+*/ 
+void Material::setName (char* mtlName)
+{
+  if (verbose >= 3)
+    printf("setting Material Name to %s", mtlName);
+  strcpy(name, mtlName);
+  //  printf ("adding new Material: %s, %p\n", this->getName(), this);
+
+}
+/**
+   \returns The Name of The Material
+*/
+char* Material::getName (void)
+{
+  return name;
+}
+
+/**
+   \brief Sets the Material Illumination Model. 
+   \brief illu illumination Model in int form
+*/
+void Material::setIllum (int illum)
+{
+  if (verbose >= 3)
+    printf("setting illumModel of Material %s to %i", name, illum);
+  illumModel = illum;
+  //  printf ("setting illumModel to: %i\n", illumModel);
+}
+/**
+   \brief Sets the Material Illumination Model. 
+   \brief illu illumination Model in char* form
+*/void Material::setIllum (char* illum)
+{
+  setIllum (atoi(illum));
+}
+
+/**
+   \brief Sets the Material Diffuse Color.
+   \param r Red Color Channel.
+   \param g Green Color Channel.
+   \param b Blue Color Channel.
+*/
+void Material::setDiffuse (float r, float g, float b)
+{
+  if (verbose >= 3)
+    printf ("setting Diffuse Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  diffuse[0] = r;
+  diffuse[1] = g;
+  diffuse[2] = b;  
+  diffuse[3] = 1.0;
+
+}
+/**
+   \brief Sets the Material Diffuse Color.
+   \param rgb The red, green, blue channel in char format (with spaces between them)
+*/
+void Material::setDiffuse (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setDiffuse (atof(r), atof(g), atof(b));
+}
+
+/**
+   \brief Sets the Material Ambient Color. 
+   \param r Red Color Channel.
+   \param g Green Color Channel.
+   \param b Blue Color Channel.
+*/
+void Material::setAmbient (float r, float g, float b)
+{
+  if (verbose >=3)
+    printf ("setting Ambient Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  ambient[0] = r;
+  ambient[1] = g;
+  ambient[2] = b;
+  ambient[3] = 1.0;
+}
+/**
+   \brief Sets the Material Ambient Color.
+   \param rgb The red, green, blue channel in char format (with spaces between them)
+*/
+void Material::setAmbient (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setAmbient (atof(r), atof(g), atof(b));
+}
+
+/**
+   \brief Sets the Material Specular Color. 
+   \param r Red Color Channel.
+   \param g Green Color Channel.
+   \param b Blue Color Channel.
+*/
+void Material::setSpecular (float r, float g, float b)
+{
+  if (verbose >= 3)
+    printf ("setting Specular Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  specular[0] = r;
+  specular[1] = g;
+  specular[2] = b;
+  specular[3] = 1.0;
+ }
+/**
+   \brief Sets the Material Specular Color.
+   \param rgb The red, green, blue channel in char format (with spaces between them)
+*/
+void Material::setSpecular (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setSpecular (atof(r), atof(g), atof(b));
+}
+
+/**
+   \brief Sets the Material Shininess.
+   \param shini stes the Shininess from float.
+*/
+void Material::setShininess (float shini)
+{
+  shininess = shini;
+}
+/**
+   \brief Sets the Material Shininess.
+   \param shini stes the Shininess from char*.
+*/
+void Material::setShininess (char* shini)
+{
+  setShininess (atof(shini));
+}
+
+/**
+   \brief Sets the Material Transparency.
+   \param trans stes the Transparency from int.
+*/
+void Material::setTransparency (float trans)
+{
+  if (verbose >= 3)
+    printf ("setting Transparency of Material %s to %f\n", name, trans);
+  transparency = trans;
+}
+/**
+   \brief Sets the Material Transparency.
+   \param trans stes the Transparency from char*.
+*/
+void Material::setTransparency (char* trans)
+{
+  char tr[20];
+  sscanf (trans, "%s", tr);
+  setTransparency (atof(tr));
+}
+
+/**
+   \brief Search for a Material called mtlName
+   \param mtlName the Name of the Material to search for
+   \returns Material named mtlName if it is found. NULL otherwise.
+*/
+Material* Material::search (char* mtlName)
+{
+  if (verbose >=3)
+    printf ("Searching for material %s", mtlName);
+  Material* searcher = this;
+  while (searcher != NULL)
+    {
+      if (verbose >= 3)
+	printf (".");
+      if (!strcmp (searcher->getName(), mtlName))
+	{
+	  if (verbose >= 3)
+	    printf ("found.\n");
+	  return searcher;
+	}
+      searcher = searcher->nextMat;
+    }
+  return NULL;
+}
+
+/**
+   \brief sets the material with which the following Faces will be painted
+*/
+bool Material::select (void)
+{
+  // setting diffuse color
+  //  glColor3f (diffuse[0], diffuse[1], diffuse[2]);
+  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse);
+
+  // setting ambient color
+  glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);
+
+  // setting up Sprecular
+  glMaterialfv(GL_FRONT, GL_SPECULAR, specular);
+
+  // setting up Shininess
+  glMaterialf(GL_FRONT, GL_SHININESS, shininess);
+  
+  // setting illumination Model 
+  if (illumModel == 1)
+    glShadeModel(GL_FLAT);
+  else if (illumModel >= 2)
+    glShadeModel(GL_SMOOTH);
+}
Index: orxonox/branches/sound/src/material.h
===================================================================
--- orxonox/branches/sound/src/material.h	(revision 2964)
+++ orxonox/branches/sound/src/material.h	(revision 2964)
@@ -0,0 +1,59 @@
+/*!
+  \file material.h
+  \brief Contains the Material Class that handles Material for 3D-Objects.
+*/
+
+#ifndef _MATERIAL_H
+#define _MATERIAL_H
+
+extern int verbose; //!< will be obsolete soon.
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <stdlib.h>
+#include <fstream>
+
+//! Class to handle Materials.
+class Material
+{
+ public:
+  Material ();
+  Material (char* mtlName);
+  Material* addMaterial(char* mtlName);
+
+  void init(void);
+  ~Material ();
+
+
+  void setName (char* mtlName);
+  char* getName (void);
+  void setIllum (int illum);
+  void setIllum (char* illum);
+  void setDiffuse (float r, float g, float b);
+  void setDiffuse (char* rgb);
+  void setAmbient (float r, float g, float b);
+  void setAmbient (char* rgb);
+  void setSpecular (float r, float g, float b);
+  void setSpecular (char* rgb);
+  void setShininess (float shini);
+  void setShininess (char* shini);
+  void setTransparency (float trans);
+  void setTransparency (char* trans);
+
+  Material* search (char* mtlName);
+
+  bool select (void);
+
+  Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists.
+
+ private:
+  char name [50];
+  int illumModel;
+  float diffuse [4];
+  float ambient [4];
+  float specular [4];
+  float shininess;
+  float transparency;
+
+};
+#endif
Index: orxonox/branches/sound/src/object.cc
===================================================================
--- orxonox/branches/sound/src/object.cc	(revision 2964)
+++ orxonox/branches/sound/src/object.cc	(revision 2964)
@@ -0,0 +1,717 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+int verbose = 0;
+
+#include "object.h"
+
+/**
+   \brief Creates a 3D-Object, but does not load any 3D-models
+   pretty useless
+*/
+Object::Object ()
+{
+
+  initialize();
+
+  BoxObject();
+
+  finalize();
+}
+
+/**
+   \brief Crates a 3D-Object and loads in a File
+   \param fileName file to parse and load (must be a .obj file)
+*/
+Object::Object(char* fileName)
+{
+  initialize();
+
+  importFile (fileName);
+
+  finalize();
+}
+
+/**
+   \brief Crates a 3D-Object, loads in a File and scales it.
+   \param fileName file to parse and load (must be a .obj file)
+   \param scaling The factor that the object will be scaled with.
+*/
+
+Object::Object(char* fileName, float scaling)
+{
+  initialize();
+  scaleFactor = scaling;
+
+  importFile (fileName);
+
+  finalize();
+}
+
+/**
+   \brief deletes an Object
+*/
+Object::~Object()
+{
+  if (verbose >= 2)
+    printf ("Deleting display List.\n");
+  Group* walker = firstGroup;
+  while (walker != NULL)
+    {
+      glDeleteLists (walker->listNumber, 1);
+      Group* lastWalker = walker;
+      walker = walker->nextGroup;
+      delete lastWalker;
+    } 
+}
+
+/** 
+    \brief initializes the Object
+    This Function initializes all the needed arrays, Lists and clientStates
+*/
+bool Object::initialize (void)
+{
+  if (verbose >=3)
+    printf("new 3D-Object is being created\n"); 
+
+  // setting the start group;
+  firstGroup = new Group;
+  currentGroup = firstGroup;
+  groupCount = 0;
+  
+  initGroup (currentGroup);
+  mtlFileName = "";
+  scaleFactor = 1;
+  material = new Material();
+
+  glEnableClientState (GL_VERTEX_ARRAY);
+  //  glEnableClientState (GL_NORMAL_ARRAY);
+  //  glEnableClientState (GL_TEXTURE_COORD_ARRAY);
+
+
+  return true;
+}
+
+/**
+   \brief Imports a obj file and handles the the relative location
+   \param fileName The file to import
+*/
+bool Object::importFile (char* fileName)
+{
+  if (verbose >=3)
+    printf("preparing to read in file: %s\n", fileName);   
+  objFileName = fileName;
+  this->readFromObjFile (objFileName);
+  return true;
+}
+
+/**
+  \brief finalizes an Object.
+   This funcion is needed, to close the glList and all the other lists.
+*/
+bool Object::finalize(void)
+{
+  //  if (verbose >=3)
+    printf("finalizing the 3D-Object\n"); 
+  finalizeGroup (currentGroup);
+  if (material != NULL)
+    delete material;
+  return true;
+}
+
+/**
+   \brief Draws the Objects of all Groups.
+   It does this by just calling the Lists that must have been created earlier.
+*/
+void Object::draw (void)
+{
+  if (verbose >=2)
+    printf("drawing the 3D-Objects\n"); 
+  Group* walker = firstGroup;
+  while (walker != NULL)
+    {
+      if (verbose >= 3)
+	printf ("Drawing object %s\n", walker->name);
+      glCallList (walker->listNumber);
+      walker = walker->nextGroup;
+    }
+}
+
+/**
+   \brief Draws the Object number groupNumber
+   It does this by just calling the List that must have been created earlier.
+   \param groupNumber The number of the group that will be displayed.
+*/
+void Object::draw (int groupNumber)
+{
+  if (groupNumber >= groupCount)
+    {
+      if (verbose>=2)
+	printf ("You requested object number %i, but this File only contains of %i Objects.\n", groupNumber-1, groupCount);
+      return;
+    }
+  if (verbose >=2)
+    printf("drawing the requested 3D-Objects if found.\n"); 
+  Group* walker = firstGroup;
+  int counter = 0;
+  while (walker != NULL)
+    {
+      if (counter == groupNumber)
+	{
+	  if (verbose >= 2)
+	    printf ("Drawing object number %s named %s\n", counter, walker->name);
+	  glCallList (walker->listNumber);
+	  return;
+	}
+      ++counter;
+      walker = walker->nextGroup;
+    }
+  if (verbose >= 2)
+    printf("Object number %i in %s not Found.\n", groupNumber, objFileName);
+  return;
+
+}
+
+/**
+   \brief Draws the Object with a specific groupname
+   It does this by just calling the List that must have been created earlier.
+   \param groupName The name of the group that will be displayed.
+*/
+void Object::draw (char* groupName)
+{
+  if (verbose >=2)
+    printf("drawing the requested 3D-Objects if found.\n"); 
+  Group* walker = firstGroup;
+  while (walker != NULL)
+    {
+      if (!strcmp(walker->name, groupName))
+	{
+	  if (verbose >= 2)
+	    printf ("Drawing object %s\n", walker->name);
+	  glCallList (walker->listNumber);
+	  return;
+	}
+      walker = walker->nextGroup;
+    }
+  if (verbose >= 2)
+    printf("Object Named %s in %s not Found.\n", groupName, objFileName);
+  return;
+}
+
+/**
+   \returns Count of the Objects in this File
+*/
+int Object::getGroupCount (void)
+{
+  return groupCount;
+}
+
+/**
+   \brief initializes a new Group object
+*/
+bool Object::initGroup(Group* group)
+{
+  if (verbose >= 2)
+    printf("Adding new Group\n");
+  group->name = "";
+  group->faceMode = -1;
+  group->faceCount =0;  
+  if ((group->listNumber = glGenLists(1)) == 0 )
+    {
+      printf ("list could not be created for this Object\n");
+      return false;
+    }
+  
+  if (groupCount == 0)
+    {
+      group->firstVertex = 0;
+      group->firstNormal = 0;
+      group->firstNormal = 0;
+    }
+  else
+    {
+      group->firstVertex = currentGroup->firstVertex + currentGroup->vertices->getCount()/3;
+      group->firstNormal = currentGroup->firstNormal + currentGroup->normals->getCount()/3;
+      group->firstVertexTexture = currentGroup->firstVertexTexture + currentGroup->vTexture->getCount()/2;
+    }
+  if (verbose >=2)
+    printf ("Creating new Arrays, with starting points v:%i, vt:%i, vn:%i .\n", group->firstVertex, group->firstVertexTexture, group->firstNormal);
+  group->vertices = new Array();
+  group->normals = new Array();
+  group->vTexture = new Array();
+
+  glNewList (group->listNumber, GL_COMPILE);
+}
+
+/**
+   \brief finalizes a Group.
+   \param group the group to finalize.
+*/
+bool Object::finalizeGroup(Group* group)
+{
+  if (verbose >=2)
+    printf ("Finalize group %s.\n", group->name);
+  glEnd();
+  glEndList();
+}
+/**
+   \brief deletes the Arrays of the Group to save space.
+   \param group the group to delete the arrays from.
+*/
+bool Object::cleanupGroup(Group* group)
+{
+  if (verbose >=2)
+    printf ("cleaning up group %s.\n", group->name);
+  
+  delete group->vertices;
+  delete group->normals;
+  delete group->vTexture;
+}
+
+/**
+   \brief Reads in the .obj File and sets all the Values.
+   This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks
+   \param fileName the File that will be parsed (.obj-file)
+*/
+bool Object::readFromObjFile (char* fileName)
+{
+  OBJ_FILE = new ifstream(fileName);
+  if (!OBJ_FILE->is_open())
+    {
+      if (verbose >=1)
+	printf ("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName);
+      BoxObject();
+      return false;
+    }
+  objFileName = fileName;
+  char Buffer[10000];
+  while(!OBJ_FILE->eof())
+    {
+      OBJ_FILE->getline(Buffer, 10000);
+      if (verbose >=4)
+	printf ("Read input line: %s\n",Buffer);
+      
+
+      // case vertice
+      if (!strncmp(Buffer, "v ", 2))
+	{
+	  readVertex(Buffer+2);
+	}
+
+      // case face
+      else if (!strncmp(Buffer, "f ", 2))
+	{
+	  readFace (Buffer+2);
+	}
+      
+      else if (!strncmp(Buffer, "mtllib", 6))
+	{
+	  readMtlLib (Buffer+7);
+	}
+
+      else if (!strncmp(Buffer, "usemtl", 6))
+	{
+	  readUseMtl (Buffer+7);
+	}
+
+      // case VertexNormal
+      else if (!strncmp(Buffer, "vn ", 2))
+      {
+	readVertexNormal(Buffer+3);
+      }
+
+      // case VertexTextureCoordinate
+      else if (!strncmp(Buffer, "vt ", 2))
+      {
+	readVertexTexture(Buffer+3);
+      }
+      // case group
+      else if (!strncmp(Buffer, "g", 1))
+	{
+	  readGroup (Buffer+2);
+	}
+    }
+  OBJ_FILE->close();
+  return true;
+
+}
+
+/**
+   \brief parses a vertex-String
+   If a vertex line is found this function will inject it into the vertex-Array
+   \param vertexString The String that will be parsed.
+*/
+bool Object::readVertex (char* vertexString)
+{
+  readingVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (vertexString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >= 3)
+    printf ("reading in a vertex: %s %s %s\n", subbuffer1, subbuffer2, subbuffer3);
+  currentGroup->vertices->addEntry(atof(subbuffer1)*scaleFactor, atof(subbuffer2)*scaleFactor, atof(subbuffer3)*scaleFactor);
+  return true;
+}
+
+/**
+   \brief parses a face-string
+   If a face line is found this function will add it to the glList.
+   The function makes a difference between QUADS and TRIANGLES, and will if changed re-open, set and re-close the gl-processe.
+   \param faceString The String that will be parsed.
+*/
+bool Object::readFace (char* faceString)
+{
+  // finalize the Arrays;
+  if (readingVertices == true)
+    {
+      currentGroup->vertices->finalizeArray();
+      //      glVertexPointer(3, GL_FLOAT, 0, currentGroup->vertices->getArray());
+      currentGroup->normals->finalizeArray();
+      //      glNormalPointer(GL_FLOAT, 0, currentGroup->normals->getArray());
+      currentGroup->vTexture->finalizeArray();
+    }
+
+  readingVertices = false;
+  currentGroup->faceCount++;
+
+  int elemCount = 0;
+  
+  FaceElement* firstElem = new FaceElement;
+  FaceElement* tmpElem = firstElem;
+
+  
+  while(strcmp (faceString, "\0"))
+    {
+      if (elemCount>0)
+	  tmpElem = tmpElem->next = new FaceElement;
+      tmpElem->next = NULL;
+
+
+      sscanf (faceString, "%s", tmpElem->value);
+      faceString += strlen(tmpElem->value);
+      if (strcmp (faceString, "\0"))
+	faceString++;
+      elemCount++;
+
+
+    }
+  
+  
+  if (elemCount == 3)
+    {
+      if (currentGroup->faceMode != 3)
+	{
+	  if (currentGroup->faceMode != -1)
+	    glEnd();
+	  glBegin(GL_TRIANGLES);
+	}
+      
+      currentGroup->faceMode = 3;
+      if (verbose >=3)
+	printf ("found triag.\n");
+    }
+  
+  else if (elemCount == 4)
+    {
+      if (currentGroup->faceMode != 4)
+	{
+	  if (currentGroup->faceMode != -1)
+	    glEnd();
+	  glBegin(GL_QUADS);
+	}
+      currentGroup->faceMode = 4;
+      if (verbose >=3 )
+	printf ("found quad.\n");
+    }
+  
+  else if (elemCount > 4)
+    {
+      if (currentGroup->faceMode != -1)
+	glEnd();
+      glBegin(GL_POLYGON);
+      if (verbose >=3)
+	printf ("Polygon with %i faces found.", elemCount);
+      currentGroup->faceMode = elemCount;
+    }
+
+  tmpElem = firstElem;
+  while (tmpElem != NULL)
+    {
+      //      printf ("%s\n", tmpElem->value);
+      addGLElement(tmpElem->value);
+      tmpElem = tmpElem->next;
+    }
+
+}
+
+/**
+   \brief Adds a Face-element (one vertex of a face) with all its information. 
+   It does this by searching:
+   1. The Vertex itself
+   2. The VertexNormale
+   3. The VertexTextureCoordinate
+   merging this information, the face will be drawn.
+
+*/
+bool Object::addGLElement (char* elementString)
+{
+  if (verbose >=3)
+    printf ("importing grafical Element to openGL\n");
+  char* vertex = elementString;
+
+  char* texture;
+  if ((texture = strstr (vertex, "/")) != NULL)
+    {
+      texture[0] = '\0';
+      texture ++;
+      if (verbose>=3)
+	printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
+      glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
+
+      char* normal;
+      if ((normal = strstr (texture, "/")) !=NULL)
+	{
+	  normal[0] = '\0';
+	  normal ++;
+	  //glArrayElement(atoi(vertex)-1);
+	  glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
+	}
+    }
+  if (verbose>=3)
+    printf ("includeing vertex #%i, and mapping it to group vertex #%i, vertexArray has %i entries.\n", atoi(vertex), (atoi(vertex)-1 - currentGroup->firstVertex)*3, currentGroup->vertices->getCount());
+  glVertex3fv(currentGroup->vertices->getArray() +(atoi(vertex)-1 - currentGroup->firstVertex)*3);
+
+}
+
+/**
+   \brief parses a vertexNormal-String
+   If a vertexNormal line is found this function will inject it into the vertexNormal-Array
+   \param normalString The String that will be parsed.
+*/
+bool Object::readVertexNormal (char* normalString)
+{
+  readingVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (normalString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >=3 )
+    printf("found vertex-Normal %s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
+  currentGroup->normals->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
+  return true;
+}
+
+/**
+   \brief parses a vertexTextureCoordinate-String
+   If a vertexTextureCoordinate line is found this function will inject it into the vertexTexture-Array
+   \param vTextureString The String that will be parsed.
+*/
+bool Object::readVertexTexture (char* vTextureString)
+{
+  readingVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  sscanf (vTextureString, "%s %s", subbuffer1, subbuffer2);
+  if (verbose >=3 )
+    printf("found vertex-Texture %s, %s\n", subbuffer1,subbuffer2);
+  currentGroup->vTexture->addEntry(atof(subbuffer1));
+  currentGroup->vTexture->addEntry(atof(subbuffer2));
+  return true;
+}
+
+/**
+   \brief parses a group String
+   This function initializes a new Group. 
+   With it you should be able to import .obj-files with more than one Objects inside. 
+   \param groupString the new Group to create
+*/
+bool Object::readGroup (char* groupString)
+{
+  // setting the group name if not default.
+  if (strcmp(currentGroup->name, "default"))
+    {
+      currentGroup->name = (char*) malloc ( strlen(groupString) * sizeof (char));
+      strcpy(currentGroup->name, groupString);
+    }
+  if (groupCount != 0 && currentGroup->faceCount>0)
+    {
+      Group* newGroup = new Group;
+      finalizeGroup(currentGroup);
+      currentGroup->nextGroup = newGroup;
+      initGroup(newGroup);
+      cleanupGroup(currentGroup); // deletes the arrays of the group; must be after initGroup.
+      currentGroup = newGroup; // must be after init see initGroup for more info
+    }
+
+  ++groupCount;
+
+}
+
+/** 
+    \brief Function to read in a mtl File.
+    this Function parses all Lines of an mtl File
+    \param mtlFile The .mtl file to read
+*/
+bool Object::readMtlLib (char* mtlFile)
+{
+  MTL_FILE = new ifstream (mtlFile);
+  if (!MTL_FILE->is_open())
+    {
+      if (verbose >= 1)
+	printf ("unable to open file: %s\n", mtlFile);
+      return false;
+    }
+  mtlFileName = mtlFile;
+  if (verbose >=2)
+    printf ("Opening mtlFile: %s\n", mtlFileName);
+  char Buffer[500];
+  Material* tmpMat = material;
+  while(!MTL_FILE->eof())
+    {
+      MTL_FILE->getline(Buffer, 500);
+      if (verbose >= 4)
+	printf("found line in mtlFile: %s\n", Buffer);
+      
+
+      // create new Material
+      if (!strncmp(Buffer, "newmtl ", 2))
+	{
+	  tmpMat = tmpMat->addMaterial(Buffer+7);
+	  //	  printf ("%s, %p\n", tmpMat->getName(), tmpMat);
+	}
+      // setting a illumMode
+      else if (!strncmp(Buffer, "illum", 5))
+	{
+	  tmpMat->setIllum(Buffer+6);
+
+	}
+      // setting Diffuse Color
+      else if (!strncmp(Buffer, "Kd", 2))
+	{
+	  tmpMat->setDiffuse(Buffer+3);
+	}
+      // setting Ambient Color
+      else if (!strncmp(Buffer, "Ka", 2))
+	{
+	  tmpMat->setAmbient(Buffer+3);
+	}
+      // setting Specular Color
+      else if (!strncmp(Buffer, "Ks", 2))
+	{
+	  tmpMat->setSpecular(Buffer+3);
+	}
+      // setting The Specular Shininess
+      else if (!strncmp(Buffer, "Ns", 2))
+	{
+	  tmpMat->setShininess(Buffer+3);
+	}
+      // setting up transparency
+      else if (!strncmp(Buffer, "d", 1))
+	{
+	  tmpMat->setTransparency(Buffer+2);
+	}
+      else if (!strncpy(Buffer, "Tf", 2))
+	{
+	  tmpMat->setTransparency(Buffer+3);
+	}
+
+    }
+  return true;
+}
+
+/**
+   \brief Function that selects a material, if changed in the obj file.
+   \param matString the Material that will be set.
+*/
+
+bool Object::readUseMtl (char* matString)
+{
+  if (!strcmp (mtlFileName, ""))
+    {
+      if (verbose >= 1)
+	printf ("Not using new defined material, because no mtlFile found yet\n");
+      return false;
+    }
+      
+  if (currentGroup->faceMode != -1)
+    glEnd();
+  currentGroup->faceMode = 0;
+  if (verbose >= 2)
+    printf ("using material %s for coming Faces.\n", matString);
+  material->search(matString)->select();
+}
+
+/**
+   \brief Includes a default object
+   This will inject a Cube, because this is the most basic object.
+*/
+void Object::BoxObject(void)
+{
+  readVertex ("-0.500000 -0.500000 0.500000");
+  readVertex ("0.500000 -0.500000 0.500000");
+  readVertex ("-0.500000 0.500000 0.500000");
+  readVertex ("0.500000 0.500000 0.500000");
+  readVertex ("-0.500000 0.500000 -0.500000");
+  readVertex ("0.500000 0.500000 -0.500000");
+  readVertex ("-0.500000 -0.500000 -0.500000");
+  readVertex ("0.500000 -0.500000 -0.500000");
+  readVertexTexture ("0.000000 0.000000");
+  readVertexTexture ("1.000000 0.000000");
+  readVertexTexture ("0.000000 1.000000");
+  readVertexTexture ("1.000000 1.000000");
+  readVertexTexture ("0.000000 2.000000");
+  readVertexTexture ("1.000000 2.000000");
+  readVertexTexture ("0.000000 3.000000");
+  readVertexTexture ("1.000000 3.000000");
+  readVertexTexture ("0.000000 4.000000");
+  readVertexTexture ("1.000000 4.000000");
+  readVertexTexture ("2.000000 0.000000");
+  readVertexTexture ("2.000000 1.000000");
+  readVertexTexture ("-1.000000 0.000000");
+  readVertexTexture ("-1.000000 1.000000");
+  
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 0.000000 1.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 1.000000 0.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 0.000000 -1.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("0.000000 -1.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+  readVertexNormal ("-1.000000 0.000000 0.000000");
+
+  readFace ("1/1/1 2/2/2 4/4/3 3/3/4");
+  readFace ("3/3/5 4/4/6 6/6/7 5/5/8");
+  readFace ("5/5/9 6/6/10 8/8/11 7/7/12");
+  readFace ("7/7/13 8/8/14 2/10/15 1/9/16");
+  readFace ("2/2/17 8/11/18 6/12/19 4/4/20");
+  readFace ("7/13/21 1/1/22 3/3/23 5/14/24");
+}
Index: orxonox/branches/sound/src/object.h
===================================================================
--- orxonox/branches/sound/src/object.h	(revision 2964)
+++ orxonox/branches/sound/src/object.h	(revision 2964)
@@ -0,0 +1,103 @@
+/*!
+  \file object.h
+  \brief Contains the Object Class that handles 3D-Objects
+*/
+
+#ifndef _OBJECT_H
+#define _OBJECT_H
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#include "array.h"
+#include "material.h"
+#include <fstream>
+
+using namespace std;
+
+extern int verbose; //!< fill be removed and added again as a verbose-class
+
+
+struct FaceElement
+{
+  char value[20];
+  FaceElement* next;
+};
+
+//! Class that handles 3D-Objects. it can also read them in and display them.
+class Object
+{
+ public:
+  Object ();
+  Object (char* fileName);
+  Object(char* fileName, float scaling);
+  ~Object ();
+  
+  bool importFile (char* fileName);
+  bool initialize (void);
+  bool finalize(void);
+  void draw (void);
+  void draw (int groupNumber);
+  void draw (char* groupName);
+  int getGroupCount();
+
+ private:
+  //! Group to handle multiple Objects per obj-file
+  struct Group
+  {
+    char* name;
+
+    GLuint listNumber;
+    Array* vertices;
+    int verticesCount;
+    Array* colors;
+    Array* normals;
+    Array* vTexture;
+    int faceMode;
+    int faceCount;
+
+    int firstVertex;
+    int firstNormal;
+    int firstVertexTexture;
+
+    Group* nextGroup;
+  };
+  
+  Group* firstGroup; //!< the first of all groups.
+  Group* currentGroup; //!< the currentGroup. this is the one we will work with.
+  int groupCount;
+
+  bool readingVertices;
+
+  char* objFileName;
+  char* mtlFileName;
+
+  Material* material;
+  float scaleFactor;
+
+  ifstream* OBJ_FILE;
+  ifstream* MTL_FILE;
+
+  bool initGroup(Group* group);
+  bool finalizeGroup (Group* group);
+  bool cleanupGroup(Group* group);
+
+
+  ///// readin ///
+  bool readFromObjFile (char* fileName);
+  
+  bool readVertex (char* vertexString);
+  bool readFace (char* faceString);
+  bool readVT (char* vtString);
+  bool readVertexNormal (char* normalString);
+  bool readVertexTexture (char* vTextureString);
+  bool readGroup (char* groupString);
+  bool readMtlLib (char* matFile);
+  bool readUseMtl (char* mtlString);
+
+  bool addGLElement (char* elementString);
+
+  void BoxObject (void);
+};
+
+#endif
