Index: /orxonox/trunk/config.h.in
===================================================================
--- /orxonox/trunk/config.h.in	(revision 3862)
+++ /orxonox/trunk/config.h.in	(revision 3863)
@@ -28,7 +28,4 @@
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the <jpeglib.h> header file. */
-#undef HAVE_JPEGLIB_H
-
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
@@ -46,7 +43,4 @@
 /* Define to 1 if you have the <OpenGL/gl.h> header file. */
 #undef HAVE_OPENGL_GL_H
-
-/* Define to 1 if you have the <png.h> header file. */
-#undef HAVE_PNG_H
 
 /* Define to 1 if you have the <pthread.h> header file. */
Index: /orxonox/trunk/configure
===================================================================
--- /orxonox/trunk/configure	(revision 3862)
+++ /orxonox/trunk/configure	(revision 3863)
@@ -871,4 +871,5 @@
   --enable-sub-projects   also builds the subProjects while make from srcdir
   --enable-profile        builds orxonox with profiling support
+  --enable-efence         builds orxonox with efence support
   --enable-documentation  also builds the sDocumentation while make from
                           srcdir
@@ -881,5 +882,4 @@
   --without-pthread       Prevents pthread from being loaded
   --without-curl          Prevents libcURL from being loaded
-  --without-sdl-image     Prevents SDL_image from being loaded
 
 Some influential environment variables:
@@ -3986,23 +3986,4 @@
 
 #-------------------#
-# SDL_image-disable #
-#-------------------#
-def_sdl_image=yes
-echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&5
-echo $ECHO_N "checking if SDL_image should be enabled... $ECHO_C" >&6
-
-# Check whether --with-sdl_image or --without-sdl_image was given.
-if test "${with_sdl_image+set}" = set; then
-  withval="$with_sdl_image"
-  def_sdl_image=no
-fi;
-if test x$def_sdl_image = xyes; then
-  echo "yes"
-fi
-if test x$def_sdl_image = xno; then
-  echo "no"
-fi
-
-#-------------------#
 # SubProject-enable #
 #-------------------#
@@ -4044,18 +4025,26 @@
 fi;
 if test x$def_profiling = xyes; then
-
-
-if test x$def_sub_projects = xyes; then
-  SUB_PROJECTS_TRUE=
-  SUB_PROJECTS_FALSE='#'
-else
-  SUB_PROJECTS_TRUE='#'
-  SUB_PROJECTS_FALSE=
-fi
-
   echo "yes"
   CXXFLAGS="$CXXFLAGS -pg"
 fi
 if test x$def_profiling = xno; then
+  echo "no"
+fi
+
+#----------------#
+# efence Enabled #
+#----------------#
+def_efence=no
+echo "$as_me:$LINENO: checking if efence should be enabled" >&5
+echo $ECHO_N "checking if efence should be enabled... $ECHO_C" >&6
+# Check whether --enable-efence or --disable-efence was given.
+if test "${enable_efence+set}" = set; then
+  enableval="$enable_efence"
+  def_efence=yes
+fi;
+if test x$def_efence = xyes; then
+  echo "yes"
+fi
+if test x$def_efence = xno; then
   echo "no"
 fi
@@ -6417,5 +6406,4 @@
 # SDL_Image #
 #-----------#
-if test x$def_sdl_image = xyes; then
 # checking for SDL_image-headers
 
@@ -6566,13 +6554,11 @@
 
 else
-  echo "sdl_image not found. falling back to other options"; def_sdl_image=no
+  echo "sdl_image header not found."; def_sdl_image=no; exit -1
 fi
 
 done
 
-fi
-if test x$def_sdl_image = xyes; then
 # checking for SDL_image-lib
-  echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
+echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
 echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6
 if test "${ac_cv_lib_SDL_image_main+set}" = set; then
@@ -6636,22 +6622,92 @@
 fi
 
-     if test x$FOUND_SDL_image = xyes ; then
-       LIBS="$LIBS -lSDL_image"
-     else
-        echo "------------------"
-        echo "SDL_image library not found."
-	echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
-        echo "------------------"
-        exit -1
-     fi
-fi
-
-## case no SDL-image:
-if test x$def_sdl_image = xno; then
+   if test x$FOUND_SDL_image = xyes ; then
+     LIBS="$LIBS -lSDL_image"
+   else
+      echo "------------------"
+      echo "SDL_image library not found."
+      echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
+      echo "------------------"
+      exit -1
+   fi
+
+#-----#
+# GTK #
+#-----#
+if test x$def_gtk = xyes; then
+
+	#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
+	echo "$as_me:$LINENO: checking for gtk2.0" >&5
+echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
+	if `pkg-config --exists gtk+-2.0`; then
+  		echo "yes"
+  		have_gtk2=yes
+		GTK2_LIBS=`pkg-config --libs gtk+-2.0`
+		GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GTK2 1
+_ACEOF
+
+	else
+		echo "no"
+	fi
+
+fi
+
+
+
+
+if test x$have_gtk2 = xyes; then
+  HAVE_GTK2_TRUE=
+  HAVE_GTK2_FALSE='#'
+else
+  HAVE_GTK2_TRUE='#'
+  HAVE_GTK2_FALSE=
+fi
+
+
 #---------#
-# libjpeg #
+# gThread #
 #---------#
-
-for ac_header in jpeglib.h
+if test x$def_gthread = xyes; then
+
+	echo "$as_me:$LINENO: checking for gthread" >&5
+echo $ECHO_N "checking for gthread... $ECHO_C" >&6
+	if `pkg-config --exists gthread-2.0`; then
+  		echo "yes"
+  		have_gthread=yes
+		GTHREAD_LIBS=`pkg-config --libs gthread-2.0`
+		GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GTHREAD 1
+_ACEOF
+
+	else
+		echo "no"
+	fi
+
+fi
+
+
+
+
+if test x$have_gthread = xyes; then
+  HAVE_GTHREAD_TRUE=
+  HAVE_GTHREAD_FALSE='#'
+else
+  HAVE_GTHREAD_TRUE='#'
+  HAVE_GTHREAD_FALSE=
+fi
+
+
+#---------#
+# libcURL #
+#---------#
+if test x$def_curl = xyes; then
+
+
+for ac_header in curl/curl.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -6797,21 +6853,18 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- jpegHeader="yes"
-else
-  jpegHeader="no"
+ curlHeader="yes"
+else
+  curlHeader="no"
 fi
 
 done
 
- if test x$jpegHeader = xno; then
-	echo " not including jpeg."
- else
-  echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
-echo $ECHO_N "checking for main in -ljpeg... $ECHO_C" >&6
-if test "${ac_cv_lib_jpeg_main+set}" = set; then
+ echo "$as_me:$LINENO: checking for main in -lcurl" >&5
+echo $ECHO_N "checking for main in -lcurl... $ECHO_C" >&6
+if test "${ac_cv_lib_curl_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg  $LIBS"
+LIBS="-lcurl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -6852,10 +6905,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_jpeg_main=yes
+  ac_cv_lib_curl_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_jpeg_main=no
+ac_cv_lib_curl_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -6863,26 +6916,44 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
-echo "${ECHO_T}$ac_cv_lib_jpeg_main" >&6
-if test $ac_cv_lib_jpeg_main = yes; then
-  FOUND_jpeg=yes
-fi
-
-    if test x$FOUND_jpeg = xyes ; then
-      LIBS="$LIBS -ljpeg"
-    else
-	 echo "------------------"
-	 echo "jpeg library not found."
-	 echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
-	 echo "------------------"
-	 exit -1
-    fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_curl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_curl_main" >&6
+if test $ac_cv_lib_curl_main = yes; then
+  FOUND_curl=yes
+fi
+
+ if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
+  have_curl=yes
+  CURL_LIBS=`curl-config --libs`
+  CURLCFLAGS=`curl-config --cflags`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CURL 1
+_ACEOF
+
+ else
+  have_curl=no
  fi
 
-#--------#
-# libpng #
-#--------#
-
-for ac_header in png.h
+fi
+
+
+
+
+if test x$have_curl = xyes; then
+  HAVE_CURL_TRUE=
+  HAVE_CURL_FALSE='#'
+else
+  HAVE_CURL_TRUE='#'
+  HAVE_CURL_FALSE=
+fi
+
+
+#---------#
+# pthread #
+#---------#
+if test x$def_pthread = xyes ; then
+ if test x$have_gthread = xyes ; then
+
+for ac_header in pthread.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -7028,21 +7099,18 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- pngHeader="yes"
-else
-  pngHeader="no"
+ pthreadHeader="yes"
+else
+  pthreadHeader="no"
 fi
 
 done
 
- if test x$pngHeader = xno; then
-	echo " not including png."
- else
-  echo "$as_me:$LINENO: checking for main in -lpng" >&5
-echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6
-if test "${ac_cv_lib_png_main+set}" = set; then
+  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="-lpng  $LIBS"
+LIBS="-lpthread  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -7083,10 +7151,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_png_main=yes
+  ac_cv_lib_pthread_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_png_main=no
+ac_cv_lib_pthread_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -7094,100 +7162,330 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5
-echo "${ECHO_T}$ac_cv_lib_png_main" >&6
-if test $ac_cv_lib_png_main = yes; then
-  FOUND_png=yes
-fi
-
-    if test x$FOUND_png = xyes ; then
-      LIBS="$LIBS -lpng"
-    else
-	 echo "------------------"
-	 echo "png library not found."
-	 echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
-	 echo "------------------"
-	 exit -1
-    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 x$FOUND_pthread = xyes ; then
+      LIBS="$LIBS -lpthread"
+   fi
  fi
 fi
 
-#-----#
-# GTK #
-#-----#
-if test x$def_gtk = xyes; then
-
-	#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
-	echo "$as_me:$LINENO: checking for gtk2.0" >&5
-echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
-	if `pkg-config --exists gtk+-2.0`; then
-  		echo "yes"
-  		have_gtk2=yes
-		GTK2_LIBS=`pkg-config --libs gtk+-2.0`
-		GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GTK2 1
-_ACEOF
-
-	else
-		echo "no"
-	fi
-
-fi
-
-
-
-
-if test x$have_gtk2 = xyes; then
-  HAVE_GTK2_TRUE=
-  HAVE_GTK2_FALSE='#'
-else
-  HAVE_GTK2_TRUE='#'
-  HAVE_GTK2_FALSE=
-fi
-
-
-#---------#
-# gThread #
-#---------#
-if test x$def_gthread = xyes; then
-
-	echo "$as_me:$LINENO: checking for gthread" >&5
-echo $ECHO_N "checking for gthread... $ECHO_C" >&6
-	if `pkg-config --exists gthread-2.0`; then
-  		echo "yes"
-  		have_gthread=yes
-		GTHREAD_LIBS=`pkg-config --libs gthread-2.0`
-		GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GTHREAD 1
-_ACEOF
-
-	else
-		echo "no"
-	fi
-
-fi
-
-
-
-
-if test x$have_gthread = xyes; then
-  HAVE_GTHREAD_TRUE=
-  HAVE_GTHREAD_FALSE='#'
-else
-  HAVE_GTHREAD_TRUE='#'
-  HAVE_GTHREAD_FALSE=
-fi
-
-
-#---------#
-# libcURL #
-#---------#
-if test x$def_curl = xyes; then
-
-
-for ac_header in curl/curl.h
+
+#--------#
+# efence #
+#--------#
+if test x$def_efence = xyes ; then
+  echo "$as_me:$LINENO: checking for main in -lefence" >&5
+echo $ECHO_N "checking for main in -lefence... $ECHO_C" >&6
+if test "${ac_cv_lib_efence_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lefence  $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_efence_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_efence_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_efence_main" >&5
+echo "${ECHO_T}$ac_cv_lib_efence_main" >&6
+if test $ac_cv_lib_efence_main = yes; then
+  FOUND_efence=yes
+fi
+
+   if test x$FOUND_efence = xyes ; then
+      LIBS="$LIBS -lefence"
+   fi
+
+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
+
+
+
+# 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`
@@ -7333,19 +7631,17 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- curlHeader="yes"
-else
-  curlHeader="no"
+
 fi
 
 done
 
- echo "$as_me:$LINENO: checking for main in -lcurl" >&5
-echo $ECHO_N "checking for main in -lcurl... $ECHO_C" >&6
-if test "${ac_cv_lib_curl_main+set}" = set; then
+
+# 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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcurl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7354,16 +7650,47 @@
 /* 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 ()
 {
-main ();
+ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
   ;
   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
+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
@@ -7379,5 +7706,5 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
@@ -7385,55 +7712,92 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_curl_main=yes
+  ac_cv_header_stdbool_h=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_curl_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_curl_main" >&5
-echo "${ECHO_T}$ac_cv_lib_curl_main" >&6
-if test $ac_cv_lib_curl_main = yes; then
-  FOUND_curl=yes
-fi
-
- if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
-  have_curl=yes
-  CURL_LIBS=`curl-config --libs`
-  CURLCFLAGS=`curl-config --cflags`
+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_CURL 1
-_ACEOF
-
- else
-  have_curl=no
- fi
-
-fi
-
-
-
-
-if test x$have_curl = xyes; then
-  HAVE_CURL_TRUE=
-  HAVE_CURL_FALSE='#'
-else
-  HAVE_CURL_TRUE='#'
-  HAVE_CURL_FALSE=
-fi
-
-
-#---------#
-# pthread #
-#---------#
-if test x$def_pthread = xyes ; then
- if test x$have_gthread = xyes ; then
-
-for ac_header in pthread.h
+#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`
@@ -7579,776 +7943,4 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- pthreadHeader="yes"
-else
-  pthreadHeader="no"
-fi
-
-done
-
-  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 x$FOUND_pthread = xyes ; then
-      LIBS="$LIBS -lpthread"
-   fi
- fi
-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
-
-
-
-# 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 at 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 at 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
@@ -8656,11 +8248,4 @@
 Usually this means the macro was only invoked conditionally." >&5
 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${SUB_PROJECTS_TRUE}" && test -z "${SUB_PROJECTS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"SUB_PROJECTS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"SUB_PROJECTS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
Index: /orxonox/trunk/configure.ac
===================================================================
--- /orxonox/trunk/configure.ac	(revision 3862)
+++ /orxonox/trunk/configure.ac	(revision 3863)
@@ -142,19 +142,4 @@
 
 #-------------------#
-# SDL_image-disable #
-#-------------------#
-def_sdl_image=yes
-AC_MSG_CHECKING([if SDL_image should be enabled])
-AC_ARG_WITH([sdl_image], 
-	AC_HELP_STRING(	[--without-sdl-image], 
-	[Prevents SDL_image from being loaded]), [def_sdl_image=no]) 
-if test x$def_sdl_image = xyes; then 
-  echo "yes"
-fi 
-if test x$def_sdl_image = xno; then 
-  echo "no"
-fi
-
-#-------------------#
 # SubProject-enable #
 #-------------------#
@@ -181,9 +166,23 @@
 	[builds orxonox with profiling support]), [def_profiling=yes]) 
 if test x$def_profiling = xyes; then
-AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)
   echo "yes"
   CXXFLAGS="$CXXFLAGS -pg"
 fi 
 if test x$def_profiling = xno; then
+  echo "no"
+fi
+
+#----------------#
+# efence Enabled #
+#----------------#
+def_efence=no
+AC_MSG_CHECKING([if efence should be enabled])
+AC_ARG_ENABLE([efence], 
+	AC_HELP_STRING(	[--enable-efence], 
+	[builds orxonox with efence support]), [def_efence=yes]) 
+if test x$def_efence = xyes; then
+  echo "yes"
+fi 
+if test x$def_efence = xno; then
   echo "no"
 fi
@@ -444,65 +443,18 @@
 # SDL_Image #
 #-----------#
-if test x$def_sdl_image = xyes; then
 # checking for SDL_image-headers
-  AC_CHECK_HEADERS([SDL_image.h] ,,
-      [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
-fi
-if test x$def_sdl_image = xyes; then
+AC_CHECK_HEADERS([SDL_image.h] ,,
+    [echo "sdl_image header not found."; def_sdl_image=no; exit -1])
 # checking for SDL_image-lib
-  AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
-     if test x$FOUND_SDL_image = xyes ; then
-       LIBS="$LIBS -lSDL_image"
-     else
-        echo "------------------"
-        echo "SDL_image library not found."
-	echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
-        echo "------------------"
-        exit -1
-     fi   
-fi
-
-## case no SDL-image:
-if test x$def_sdl_image = xno; then
-#---------#
-# libjpeg #
-#---------#
- AC_CHECK_HEADERS([jpeglib.h], [jpegHeader="yes"],
-        [jpegHeader="no"])
- if test x$jpegHeader = xno; then
-	echo " not including jpeg."
- else
-  AC_CHECK_LIB([jpeg], [main], [FOUND_jpeg=yes])
-    if test x$FOUND_jpeg = xyes ; then
-      LIBS="$LIBS -ljpeg"
-    else
-	 echo "------------------"
-	 echo "jpeg library not found."
-	 echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
-	 echo "------------------"
-	 exit -1
-    fi   
- fi
-
-#--------#
-# libpng #
-#--------#
- AC_CHECK_HEADERS([png.h], [pngHeader="yes"],
-        [pngHeader="no"])
- if test x$pngHeader = xno; then
-	echo " not including png."
- else
-  AC_CHECK_LIB([png], [main], FOUND_png=yes)
-    if test x$FOUND_png = xyes ; then
-      LIBS="$LIBS -lpng"
-    else
-	 echo "------------------"
-	 echo "png library not found."
-	 echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
-	 echo "------------------"
-	 exit -1
-    fi
- fi   
-fi
+AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
+   if test x$FOUND_SDL_image = xyes ; then
+     LIBS="$LIBS -lSDL_image"
+   else
+      echo "------------------"
+      echo "SDL_image library not found."
+      echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
+      echo "------------------"
+      exit -1
+   fi
 
 #-----#
@@ -583,4 +535,15 @@
 fi
 
+
+#--------#
+# efence #
+#--------#
+if test x$def_efence = xyes ; then
+  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes])
+   if test x$FOUND_efence = xyes ; then
+      LIBS="$LIBS -lefence"
+   fi
+  
+fi
 
 # FIXME: Replace `main' with a function in `-lm':
Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 3862)
+++ /orxonox/trunk/src/Makefile.am	(revision 3863)
@@ -113,4 +113,5 @@
 		 defs/glincl.h \
 		 defs/comincl.h \
+		 defs/confincl.h \
 		 defs/error.h \
 		 defs/debug.h \
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 3862)
+++ /orxonox/trunk/src/Makefile.in	(revision 3863)
@@ -326,4 +326,5 @@
 		 defs/glincl.h \
 		 defs/comincl.h \
+		 defs/confincl.h \
 		 defs/error.h \
 		 defs/debug.h \
Index: /orxonox/trunk/src/animation.cc
===================================================================
--- /orxonox/trunk/src/animation.cc	(revision 3862)
+++ /orxonox/trunk/src/animation.cc	(revision 3863)
@@ -14,4 +14,5 @@
 */
 
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM
 
 #include "animation.h"
@@ -84,4 +85,7 @@
       this->replay();
       break;
+    case ANIM_INF_REWIND:
+      this->stop();
+      break;
     case ANIM_INF_DELETE: // this will possibly never be made
       this->bDelete = true;
Index: /orxonox/trunk/src/animation.h
===================================================================
--- /orxonox/trunk/src/animation.h	(revision 3862)
+++ /orxonox/trunk/src/animation.h	(revision 3863)
@@ -9,8 +9,23 @@
 #include "list.h"
 #include "base_object.h"
+#include "confincl.h"  // must be here to determin the DEBUG-level
 
 // FORWARD DEFINITION
 
 //! An enumerator of Functions to describe the flow of the Animation
+/**
+   \todo check with Patrick it of
+
+   description in speed to the next keyframe:
+   ANIM_CONSTANT: 0, infinity.
+   ANIM_LINEAR: equal
+   ANIM_SINE: fast, slow, fast
+   ANIM_COSINE: slow, fast, slow
+   ANIM_EXP: fast, slow
+   ANIM_NEG_EXP: slow fast
+   ANIM_RANDOM: eratic
+   
+   deprecated QUADRATIC
+*/
 typedef enum ANIM_FUNCTION {ANIM_CONSTANT,
 			    ANIM_LINEAR,
@@ -25,17 +40,12 @@
 /**
    ANIM_INF_CONSTANT stays at the end of the animation
-   ANIM_INF_REWIND loops back to the beginning and replays the animation
+   ANIM_INF_REPLAY loops back to the beginning and replays the animation
+   ANIM_INF_REWIND loops back to the beginning and then stops the animation
+   ANIM_INF_DELETE deletes the animation. !! THIS IS DANGEROUS !! only do this with non-class variables
 */
 typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT,
 			    ANIM_INF_REPLAY,
+			    ANIM_INF_REWIND,
 			    ANIM_INF_DELETE};//, ANIM_INF_LINEAR, ANIM_INF_PINGPONG;
-
-//! A Struct for Keyframes that simply hold a float
-typedef struct KeyFrameF
-{
-  float duration;             //!< duration of this keyframe
-  float value;                //!< value of this keyframe
-  ANIM_FUNCTION animFunc;     //!< with whitch function to iterate to the next KeyFrameF
-};
 
 //! A Superclass for describing an animation (all animations will be derived from this one)
Index: /orxonox/trunk/src/animation3d.cc
===================================================================
--- /orxonox/trunk/src/animation3d.cc	(revision 3862)
+++ /orxonox/trunk/src/animation3d.cc	(revision 3863)
@@ -17,4 +17,5 @@
 */
 
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM
 
 #include "animation3d.h"
Index: /orxonox/trunk/src/animation3d.h
===================================================================
--- /orxonox/trunk/src/animation3d.h	(revision 3862)
+++ /orxonox/trunk/src/animation3d.h	(revision 3863)
@@ -2,4 +2,5 @@
     \file animation3d.h
 */
+
 
 #include "animation.h"
Index: /orxonox/trunk/src/defs/confincl.h
===================================================================
--- /orxonox/trunk/src/defs/confincl.h	(revision 3863)
+++ /orxonox/trunk/src/defs/confincl.h	(revision 3863)
@@ -0,0 +1,13 @@
+/*!
+  \file confincl.h
+  \brief includes the configure-headers, if config should be loaded
+*/
+
+#ifndef _CONFINCL_H
+#define _CONFINCL_H
+
+#if HAVE_CONFIG_H 
+#include <config.h> 
+#endif
+
+#endif /*_CONFINCL_H */
Index: /orxonox/trunk/src/defs/debug.h
===================================================================
--- /orxonox/trunk/src/defs/debug.h	(revision 3862)
+++ /orxonox/trunk/src/defs/debug.h	(revision 3863)
@@ -19,5 +19,5 @@
 
     There are two main modes HARD and SOFT. HARD is precessed during compileTime where SOFT is for runtime.
-    \li HARD: One can choose between different modes. see: // DEFINE_MODULES \\
+    \li HARD: One can choose between different modes. see: // DEFINE_MODULES 
     \li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT
 */ 
@@ -26,7 +26,5 @@
 #define _DEBUG_H
 
-#if HAVE_CONFIG_H 
-#include <config.h> 
-#endif
+#include "confincl.h"
 
 #include <stdio.h>
@@ -56,5 +54,5 @@
 #define HARD_DEBUG_LEVEL DEBUG
 #else /* DEBUG_SPECIAL_MODULE */
-// DEFINE MODULES \\
+// DEFINE MODULES
 #define DEBUG_MODULE_ORXONOX            0
 #define DEBUG_MODULE_WORLD              1
Index: /orxonox/trunk/src/defs/stdincl.h
===================================================================
--- /orxonox/trunk/src/defs/stdincl.h	(revision 3862)
+++ /orxonox/trunk/src/defs/stdincl.h	(revision 3863)
@@ -11,8 +11,5 @@
 typedef unsigned char byte;
 
-// this includes the information from configure/makefiles
-#if HAVE_CONFIG_H 
-#include <config.h> 
-#endif
+#include "confincl.h"
 
 #ifdef __WIN32__
Index: /orxonox/trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 3862)
+++ /orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 3863)
@@ -12,9 +12,5 @@
    main-programmer: Benjamin Grauer
    co-programmer: ...
-
-   TGA-code: borrowed from nehe-Tutorials
-
 */
-
 
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
@@ -66,5 +62,5 @@
    \param b The second value
 */
-inline void Texture::swap (unsigned char &a, unsigned char &b)
+void Texture::swap (unsigned char &a, unsigned char &b)
 {
   unsigned char temp;
@@ -98,5 +94,8 @@
 }
 
-#ifdef HAVE_SDL_IMAGE_H
+/**
+   \brief loads an Image from a file to a Texture
+   \param imageName The image to load
+*/
 bool Texture::loadImage(const char* imageName)
 {
@@ -138,5 +137,5 @@
 	  this->loadTexToGL (this->pImage);
 	  SDL_FreeSurface(map);
-	  this->pImage->data = NULL;
+	  pImage->data = NULL;
 	}
       else
@@ -147,691 +146,2 @@
     }
 }
-
-
-#else /* HAVE_SDL_IMAGE_H */
-/**
-   \brief Makes the Programm ready to Read-in a texture-File
-   1. Checks what type of Image should be imported
-   \todo Checks where to find the Image
-*/
-bool Texture::loadImage(const char* imageName)
-{
-  if (GraphicsEngine::texturesEnabled)
-    {
-      if (imageName)
-	{
-	  if (!strncmp(imageName+strlen(imageName)-4, ".bmp", 4))
-	    {
-	      PRINTF(4)("Requested bmp-image. Trying to Import.\n");
-	      return this->loadBMP(imageName);
-	    }
-	  
-	  else if (!strncmp(imageName+strlen(imageName)-4, ".jpg", 4) || !strncmp(imageName+strlen(imageName)-5, ".jpg", 5))
-	    {
-	      PRINTF(4)("Requested jpeg-image. Trying to Import\n");
-	      return this->loadJPG(imageName);
-	    }
-	  else if (!strncmp(imageName+strlen(imageName)-4, ".tga", 4))
-	    {
-	      PRINTF(4)("Requested tga-image. Trying to Import\n");
-	      return this->loadTGA(imageName);
-	    }
-	  else if (!strncmp(imageName+strlen(imageName)-4, ".png", 4))
-	    {
-	      PRINTF(4)("Requested png-image. Trying to Import\n");
-	      return this->loadPNG(imageName);
-	    }
-	  else
-	    {
-	      PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imageName);
-	      return false;
-	    }
-	}
-      else
-	{
-	  PRINTF(2)("Image not Found: %s\n", imageName);
-	  return false;
-	}
-    }
-}
-/**
-   \brief reads in a Windows BMP-file, and imports it to openGL.
-   \param bmpName The name of the Image to load.
-*/
-bool Texture::loadBMP (char* bmpName)
-{
-  FILE *file;
-  unsigned long size;                 // size of the image in bytes.
-  unsigned long i;                    // standard counter.
-  unsigned short int planes;          // number of planes in image (must be 1) 
-  unsigned short int bpp;             // number of bits per pixel (must be 24)
-  GLuint temp;                          // temporary color storage for bgr-rgb conversion.
-
-  // make sure the file is there.
-  if ((file = fopen(bmpName, "rb"))==NULL)
-    {
-      PRINTF(2)("File Not Found : %s\n",bmpName);
-      return false;
-    }
-  // seek through the bmp header, up to the width/height:
-  fseek(file, 18, SEEK_CUR);
-  
-  // read the width
-  if ((i = fread(&pImage->width, 4, 1, file)) != 1) 
-    {
-      PRINTF(2)("Error reading width from %s.\n", bmpName);
-      return false;
-    }
-  // read the height 
-  if ((i = fread(&pImage->height, 4, 1, file)) != 1) 
-    {
-      PRINTF(2)("Error reading height from %s.\n", bmpName);
-      return false;
-    }
-  
-  // calculate the size (assuming 24 bits or 3 bytes per pixel).
-  size = pImage->width * pImage->height * 3;
-  
-  // read the planes
-  if ((fread(&planes, 2, 1, file)) != 1) 
-    {
-      PRINTF(2)("Error reading planes from %s.\n", bmpName);
-      return false;
-    }
-  if (planes != 1) 
-    {
-      PRINTF(1)("Planes from %s is not 1: %u\n", bmpName, planes);
-      return false;
-    }
-  
-  // read the bpp
-  if ((i = fread(&bpp, 2, 1, file)) != 1) 
-    {
-      PRINTF(2)("Error reading bpp from %s.\n", bmpName);
-      return false;
-    }
-  if (bpp != 24) 
-    {
-      PRINTF(2)("Bpp from %s is not 24: %u\n", bmpName, bpp);
-      return false;
-    }
-  
-  // seek past the rest of the bitmap header.
-  fseek(file, 24, SEEK_CUR);
-  
-  // read the data. 
-  pImage->data = (GLubyte *) malloc(size);
-  if (pImage->data == NULL) 
-    {
-      PRINTF(2)("Error allocating memory for color-corrected image data");
-      return false;	
-    }
-  
-  if ((i = fread(pImage->data, size, 1, file)) != 1) 
-    {
-      PRINTF(2)("Error reading image data from %s.\n", bmpName);
-      return false;
-    }
-  fclose(file);
-
-  // reverse all of the colors. (bgr -> rgb)
-  for (i=0;i<size;i+=3) 
-    { 
-      temp = pImage->data[i];
-      pImage->data[i] = pImage->data[i+2];
-      pImage->data[i+2] = temp;
-    }
-  this->loadTexToGL (pImage);
-  
-
-  if (pImage)
-    {
-      if (pImage->data)
-	{
-	  free(pImage->data);
-	}
-      
-      free(pImage);
-    }
-  return true;
-
-}
-
-/**
-   \brief reads in a jpg-file
-   \param jpgName the Name of the Image to load
-*/
-bool Texture::loadJPG (char* jpgName)
-{
-#ifdef HAVE_JPEGLIB_H
-  struct jpeg_decompress_struct cinfo;
-  Image *pImage = NULL;
-  FILE *pFile;
-  
-  // Open a file pointer to the jpeg file and check if it was found and opened 
-  if((pFile = fopen(jpgName, "rb")) == NULL) 
-    {
-      // Display an error message saying the file was not found, then return NULL
-      PRINTF(2)("Unable to load JPG File %s.\n", jpgName);
-      return false;
-    }
-  
-  // Create an error handler
-  jpeg_error_mgr jerr;
-  
-  // Have our compression info object point to the error handler address
-  cinfo.err = jpeg_std_error(&jerr);
-  
-  // Initialize the decompression object
-  jpeg_create_decompress(&cinfo);
-  
-  // Specify the data source (Our file pointer)	
-  jpeg_stdio_src(&cinfo, pFile);
-  
-  // Allocate the structure that will hold our eventual jpeg data (must free it!)
-  pImage = (Image*)malloc(sizeof(Image));
-  
-  // DECOFING
-  // Read in the header of the jpeg file
-  jpeg_read_header(&cinfo, TRUE);
-  
-  // Start to decompress the jpeg file with our compression info
-  jpeg_start_decompress(&cinfo);
-  
-  // Get the image dimensions and row span to read in the pixel data
-  pImage->rowSpan = cinfo.image_width * cinfo.num_components;
-  pImage->width   = cinfo.image_width;
-  pImage->height   = cinfo.image_height;
-  
-  // Allocate memory for the pixel buffer
-  pImage->data = new unsigned char[pImage->rowSpan * pImage->height];
-  
-  // Here we use the library's state variable cinfo.output_scanline as the
-  // loop counter, so that we don't have to keep track ourselves.
-  
-  // Create an array of row pointers
-  unsigned char** rowPtr = new unsigned char*[pImage->height];
-  for (int i = 0; i < pImage->height; i++)
-    rowPtr[i] = &(pImage->data[i*pImage->rowSpan]);
-  
-  // Now comes the juice of our work, here we extract all the pixel data
-  int rowsRead = 0;
-  while (cinfo.output_scanline < cinfo.output_height) 
-    {
-      // Read in the current row of pixels and increase the rowsRead count
-      rowsRead += jpeg_read_scanlines(&cinfo, &rowPtr[rowsRead], cinfo.output_height - rowsRead);
-    }
-  
-  // Delete the temporary row pointers
-  delete [] rowPtr;
-  
-  // Finish decompressing the data
-  jpeg_finish_decompress(&cinfo);//  decodeJPG(&cinfo, pImage);
-  
-  // This releases all the stored memory for reading and decoding the jpeg
-  jpeg_destroy_decompress(&cinfo);
-  
-  // Close the file pointer that opened the file
-  fclose(pFile);
-  
-
-  if(pImage == NULL)
-    exit(0);
-  
-  this->loadTexToGL (pImage);
-  if (pImage)
-    {
-      if (pImage->data)
-	{
-	  free(pImage->data);
-	}
-      
-      free(pImage);
-    }
-  return true;
-#else /* HAVE_JPEGLIB_H */
-  PRINTF(1)("sorry, but you did not compile with jpeg-support.\nEither install SDL_image or jpeglib, and recompile to see the image\n");
-  return false;
-#endif /* HAVE_JPEGLIB_H */
-
-}
-
-/**
-   \brief reads in a tga-file
-   \param tgaName the Name of the Image to load
-*/
-bool Texture::loadTGA(const char * tgaName)
-{
-  typedef struct
-  {
-    GLubyte Header[12];
-  } TGAHeader;
-  TGAHeader tgaHeader;			
-  
-  GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0};	// Uncompressed TGA Header 
-  GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0};	// Compressed TGA Header 
-  FILE * fTGA;
-  fTGA = fopen(tgaName, "rb");
-
-  if(fTGA == NULL)
-    {
-      PRINTF(2)("Error could not open texture file: %s\n", tgaName);
-      return false;
-    }
-  
-  if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0)
-    {
-      PRINTF(2)("Error could not read file header of %s\n", tgaName);
-      if(fTGA != NULL)
-	{
-	  fclose(fTGA);
-	}
-      return false;
-    }
-  
-  if(memcmp(uTGAcompare, &tgaHeader, sizeof(TGAHeader)) == 0)
-    {
-      loadUncompressedTGA(tgaName, fTGA);
-      if (fTGA)
-	fclose (fTGA);
-    }
-  else if(memcmp(cTGAcompare, &tgaHeader, sizeof(TGAHeader)) == 0)
-    {
-      loadCompressedTGA(tgaName, fTGA);
-	if (fTGA)
-	  fclose (fTGA);
-    }
-  else
-    {
-      PRINTF(2)("Error TGA file be type 2 or type 10\n");
-      if (fTGA)
-	fclose(fTGA);
-      return false;
-    }
-  return true;
-}
-
-/**
-   \brief reads in an uncompressed tga-file
-   \param filename the Name of the Image to load
-   \param fTGA a Pointer to a File, that should be read
-*/
-bool Texture::loadUncompressedTGA(const char * filename, FILE * fTGA)
-{
-  GLubyte header[6];      // First 6 Useful Bytes From The Header 
-  GLuint  bytesPerPixel;  // Holds Number Of Bytes Per Pixel Used In The TGA File 
-  GLuint  imageSize;	  // Used To Store The Image Size When Setting Aside Ram 
-  GLuint  temp;		  // Temporary Variable
-  GLuint  type;
-  GLuint  Height;	  // Height of Image 
-  GLuint  Width;	  // Width of Image 
-  GLuint  Bpp;		  // Bits Per Pixel 
-
-  GLuint cswap;
-  if(fread(header, sizeof(header), 1, fTGA) == 0)
-    {
-      PRINTF(2)("Error could not read info header\n");
-      return false;
-    }
-  
-  Width = pImage->width  = header[1] * 256 + header[0];
-  Height =  pImage->height = header[3] * 256 + header[2];
-  Bpp = pImage->bpp = header[4];
-  // Make sure all information is valid
-  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
-    {
-      PRINTF(2)("Error invalid texture information\n");
-      return false;
-    }
-  
-  if(pImage->bpp == 24)	
-    {
-      pImage->type = GL_RGB;
-    }
-  else
-    {
-      pImage->type = GL_RGBA;
-    }
-  
-  bytesPerPixel	= (Bpp / 8);
-  imageSize = (bytesPerPixel * Width * Height);
-  pImage->data = (GLubyte*) malloc(imageSize);
-  
-  if(pImage->data == NULL)
-    {
-      PRINTF(2)("Error could not allocate memory for image\n");
-      return false;
-    }
-  
-  if(fread(pImage->data, 1, imageSize, fTGA) != imageSize)
-    {
-      PRINTF(2)("Error could not read image data\n");
-      if(pImage->data != NULL)
-	{
-	  free(pImage->data);
-	}
-      return false;
-    }
-  
-  for(cswap = 0; cswap < (int)imageSize; cswap += bytesPerPixel)
-    {
-      pImage->data[cswap] ^= pImage->data[cswap+2] ^=
-	pImage->data[cswap] ^= pImage->data[cswap+2];
-    }
-  
-  this->loadTexToGL (pImage);
-
-  return true;
-}
-
-/**
-   \brief reads in a compressed tga-file
-   \param filename the Name of the Image to load
-   \param fTGA a Pointer to a File, that should be read
-*/
-bool Texture::loadCompressedTGA(const char * filename, FILE * fTGA)
-{
-  GLubyte header[6];      // First 6 Useful Bytes From The Header 
-  GLuint  bytesPerPixel;  // Holds Number Of Bytes Per Pixel Used In The TGA File 
-  GLuint  imageSize;	  // Used To Store The Image Size When Setting Aside Ram 
-  GLuint  temp;		  // Temporary Variable
-  GLuint  type;
-  GLuint  Height;	  // Height of Image 
-  GLuint  Width;	  // Width of Image 
-  GLuint  Bpp;		  // Bits Per Pixel 
-
-  if(fread(header, sizeof(header), 1, fTGA) == 0)
-    {
-      PRINTF(2)("Error could not read info header\n");
-      return false;
-    }
-  
-  Width = pImage->width  = header[1] * 256 + header[0];
-  Height = pImage->height = header[3] * 256 + header[2];
-  Bpp = pImage->bpp	= header[4];
-
-  GLuint pixelcount	= Height * Width;
-  GLuint currentpixel	= 0;
-  GLuint currentbyte	= 0;
-  GLubyte * colorbuffer = (GLubyte *)malloc(bytesPerPixel);
-
-  //Make sure all pImage info is ok 
-  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
-    {
-      PRINTF(2)("Error Invalid pImage information\n");
-      return false;
-    }
-  
-  bytesPerPixel	= (Bpp / 8);
-  imageSize		= (bytesPerPixel * Width * Height);
-  pImage->data	= (GLubyte*) malloc(imageSize);
-  
-  if(pImage->data == NULL)
-    {
-      PRINTF(2)("Error could not allocate memory for image\n");
-      return false;
-    }
-  
-  do
-    {
-      GLubyte chunkheader = 0;
-      
-      if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0)
-	{
-	  PRINTF(2)("Error could not read RLE header\n");
-	  if(pImage->data != NULL)
-	    {
-	      free(pImage->data);
-	    }
-	  return false;
-	}
-      // If the ehader is < 128, it means the that is the number of RAW color packets minus 1 
-      if(chunkheader < 128)
-	{
-	  short counter;
-	  chunkheader++;
-	  // Read RAW color values
-	  for(counter = 0; counter < chunkheader; counter++)
-	    { 
-	      // Try to read 1 pixel 
-	      if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel)
-		{
-		  PRINTF(2)("Error could not read image data\n");
-		  if(colorbuffer != NULL)
-		    {
-		      free(colorbuffer);
-		    }
-		  
-		  if(pImage->data != NULL)
-		    {
-		      free(pImage->data);
-		    }
-		  
-		  return false;	
-		}
-	      // write to memory 
-	      // Flip R and B vcolor values around in the process 
-	      pImage->data[currentbyte	  ] = colorbuffer[2];				    
-	      pImage->data[currentbyte + 1] = colorbuffer[1];
-	      pImage->data[currentbyte + 2] = colorbuffer[0];
-	      
-	      if(bytesPerPixel == 4) // if its a 32 bpp image 
-		{
-		  pImage->data[currentbyte + 3] = colorbuffer[3];// copy the 4th byte 
-		}
-	      
-	      currentbyte += bytesPerPixel;
-	      currentpixel++;
-
-	      // Make sure we haven't read too many pixels 
-	      if(currentpixel > pixelcount)	
-		{
-		  PRINTF(2)("Error too many pixels read\n");
-		  if(colorbuffer != NULL)
-		    {
-		      free(colorbuffer);
-		    }
-		  
-		  if(pImage->data != NULL)
-		    {
-		      free(pImage->data);
-		    }
-		  
-		  return false;
-		}
-	    }
-	}
-      // chunkheader > 128 RLE data, next color  reapeated chunkheader - 127 times
-      else
-	{
-	  short counter;
-	  chunkheader -= 127;	// Subteact 127 to get rid of the ID bit 
-	  if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values 
-	    {
-	      PRINTF(2)("Error could not read from file");
-	      if(colorbuffer != NULL)
-		{
-		  free(colorbuffer);
-		}
-	      
-	      if(pImage->data != NULL)
-		{
-		  free(pImage->data);
-		}
-	      
-	      return false;
-	    }
-	  
-	  for(counter = 0; counter < chunkheader; counter++) //copy the color into the image data as many times as dictated
-	    {							
-	      // switch R and B bytes areound while copying
-	      pImage->data[currentbyte	  ] = colorbuffer[2];
-	      pImage->data[currentbyte + 1] = colorbuffer[1];
-	      pImage->data[currentbyte + 2] = colorbuffer[0];
-	      
-	      if(bytesPerPixel == 4)
-		{
-		  pImage->data[currentbyte + 3] = colorbuffer[3];
-		}
-	      
-	      currentbyte += bytesPerPixel;
-	      currentpixel++;
-	      
-	      if(currentpixel > pixelcount)
-		{
-		  PRINTF(2)("Error too many pixels read\n");
-		  if(colorbuffer != NULL)
-		    {
-		      free(colorbuffer);
-		    }
-		  
-		  if(pImage->data != NULL)
-		    {
-		      free(pImage->data);
-		    }
-		  
-		  return false;
-		}
-	    }
-	}
-    }
-  
-  while(currentpixel < pixelcount);	// Loop while there are still pixels left
-
-  this->loadTexToGL (pImage);
-
-  return true;
-}
-
-
-/**
-   \brief reads in a png-file
-   \param pngName the Name of the Image to load
-*/
-bool Texture::loadPNG(const char* pngName)
-{
-#ifdef HAVE_PNG_H
-
-  FILE *PNG_file = fopen(pngName, "rb");
-  if (PNG_file == NULL)
-    {
-      return 0;
-    }
-  
-  GLubyte PNG_header[8];
-  
-  fread(PNG_header, 1, 8, PNG_file);
-  if (png_sig_cmp(PNG_header, 0, 8) != 0)
-    {
-      PRINTF(2)("Not Recognized as a pngFile\n");
-      fclose (PNG_file);
-      return 0;
-    }
-  
-  png_structp PNG_reader = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-  if (PNG_reader == NULL)
-    {
-      fclose(PNG_file);
-      return 0;
-    }
-  
-  png_infop PNG_info = png_create_info_struct(PNG_reader);
-  if (PNG_info == NULL)
-    {
-      png_destroy_read_struct(&PNG_reader, NULL, NULL);
-      fclose(PNG_file);
-      return 0;
-    }
-  
-  png_infop PNG_end_info = png_create_info_struct(PNG_reader);
-  if (PNG_end_info == NULL)
-    {
-      png_destroy_read_struct(&PNG_reader, &PNG_info, NULL);
-      fclose(PNG_file);
-      return 0;
-    }
-  
-  if (setjmp(png_jmpbuf(PNG_reader)))
-    {
-      png_destroy_read_struct(&PNG_reader, &PNG_info, &PNG_end_info);
-      fclose(PNG_file);
-      return (0);
-    }
-  
-  png_init_io(PNG_reader, PNG_file);
-  png_set_sig_bytes(PNG_reader, 8);
-  
-  png_read_info(PNG_reader, PNG_info);
-  
-  pImage->width = png_get_image_width(PNG_reader, PNG_info);
-  pImage->height = png_get_image_height(PNG_reader, PNG_info);
-  
-  png_uint_32 bit_depth, color_type;
-  bit_depth = png_get_bit_depth(PNG_reader, PNG_info);
-  color_type = png_get_color_type(PNG_reader, PNG_info);
-  
-  if (color_type == PNG_COLOR_TYPE_PALETTE)
-    {
-      png_set_palette_to_rgb(PNG_reader);
-    }
-  
-  if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-    {
-      png_set_gray_1_2_4_to_8(PNG_reader);
-    }
-  
-  if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-    {
-      png_set_gray_to_rgb(PNG_reader);
-    }
-  
-  if (png_get_valid(PNG_reader, PNG_info, PNG_INFO_tRNS))
-    {
-      png_set_tRNS_to_alpha(PNG_reader);
-    }
-  else
-    {
-      png_set_filler(PNG_reader, 0xff, PNG_FILLER_AFTER);
-    }
-  
-  if (bit_depth == 16)
-    {
-      png_set_strip_16(PNG_reader);
-    }
-  
-  png_read_update_info(PNG_reader, PNG_info);
-  
-  pImage->data = (png_byte*)malloc(4 * pImage->width * pImage->height);
-  png_byte** PNG_rows = (png_byte**)malloc(pImage->height * sizeof(png_byte*));
-  
-  unsigned int row;
-  for (row = 0; row < pImage->height; ++row)
-    {
-      PNG_rows[pImage->height - 1 - row] = pImage->data + (row * 4 * pImage->width);
-    }
-  
-  png_read_image(PNG_reader, PNG_rows);
-  
-  free(PNG_rows);
-  
-  png_destroy_read_struct(&PNG_reader, &PNG_info, &PNG_end_info);
-  fclose(PNG_file);
-  
-  /*  if (!ST_is_power_of_two(pImage->width) || !ST_is_power_of_two(pImage->height))
-    {
-      free(pImage->data);
-      return 0;
-    }
-  */
-  this->loadTexToGL (pImage);  
-  
-  free(pImage->data);
-  
-  return true;
-#else /* HAVE_PNG_H */
-  PRINTF(1)("sorry, but you did not compile with png-support.\nEither install SDL_image or libpng, and recompile to see the image\n");
-  return false;
-#endif /* HAVE_PNG_H */
-
-}
-#endif /* HAVE_SDL_IMAGE_H */
Index: /orxonox/trunk/src/lib/graphics/importer/texture.h
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/texture.h	(revision 3862)
+++ /orxonox/trunk/src/lib/graphics/importer/texture.h	(revision 3863)
@@ -14,17 +14,5 @@
 #include "debug.h"
 
-#ifdef HAVE_SDL_IMAGE_H
 #include <SDL_image.h>
-#else
-// IMAGE LIBS //
-#ifdef HAVE_JPEGLIB_H
-extern "C"{         // This has to be done, because not a c++ lib
-#include <jpeglib.h>
-}
-#endif /* HAVE_JPEGLIB_H */
-#ifdef HAVE_PNG_H
-#include <png.h>
-#endif /* HAVE_PNG_H */
-#endif /* HAVE_SDL_IMAGE_H */
 
 //! A Class, that reads in Textures from different fileformats.
@@ -47,5 +35,5 @@
   SDL_Surface* map; //!< The map SDL initializes for this element.
   char* searchTextureInPaths(const char* texName) const;
-  inline void swap(unsigned char &a, unsigned char &b);
+  void swap(unsigned char &a, unsigned char &b);
  public:
   Texture(void);
@@ -57,20 +45,5 @@
 
   bool loadImage(const char* imageName);
-#ifndef HAVE_SDL_IMAGE_H
+};
 
-  bool loadBMP (char* bmpName);
-
-  bool loadJPG (char* jpgName);
-
-  /// TGA ///
-
-  bool loadTGA(const char * tgaName);
-  bool loadUncompressedTGA(const char * filename, FILE * fTGA);
-  bool loadCompressedTGA(const char * filename, FILE * fTGA);
-
-  bool loadPNG(const char* pngName);
-#endif
-
-
-};
 #endif /* _TEXTURE_H */
Index: /orxonox/trunk/src/t_animation.h
===================================================================
--- /orxonox/trunk/src/t_animation.h	(revision 3862)
+++ /orxonox/trunk/src/t_animation.h	(revision 3863)
@@ -21,7 +21,17 @@
 #define _T_ANIMATION_H
 
+
 #include "animation.h"
 
 #define DELTA_X 0.05  //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta
+
+//! A Struct for Keyframes that simply hold a float
+typedef struct KeyFrameF
+{
+  float duration;             //!< duration of this keyframe
+  float value;                //!< value of this keyframe
+  ANIM_FUNCTION animFunc;     //!< with whitch function to iterate to the next KeyFrameF
+};
+
 
 //! A Class to handle some animation for single floated values.
