Index: orxonox/trunk/src/lib/event/event_def.h
===================================================================
--- orxonox/trunk/src/lib/event/event_def.h	(revision 4661)
+++ orxonox/trunk/src/lib/event/event_def.h	(revision 4662)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file event_def.h
     \brief some central definitions
@@ -8,5 +8,9 @@
 #define _EVENT_DEF_H
 
+#ifdef HAVE_SDL_H
 #include "SDL_keysym.h"
+#else
+#include "SDL/SDL_keysym.h"
+#endif
 #include "stdincl.h"
 
Index: orxonox/trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 4661)
+++ orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 4662)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -21,5 +21,9 @@
 #include "graphics_engine.h"
 
+#ifdef HAVE_SDL_IMAGE_H
 #include <SDL_image.h>
+#else
+#include <SDL/SDL_image.h>
+#endif
 
 /**
@@ -32,9 +36,9 @@
   if (imageName)
     this->loadImage(imageName);
-}  
+}
 
 /**
    \brief Destructor of a Texture
-   
+
    Frees Data, and deletes the textures from GL
 */
@@ -62,34 +66,34 @@
       Uint32 saved_flags;
       Uint8  saved_alpha;
-      
+
       w = surface->w;
       h = surface->h;
-      
+
       image = SDL_CreateRGBSurface(SDL_SWSURFACE,
-				   w, h,
-				   32,
+                                   w, h,
+                                   32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-				   0x000000FF, 
-				   0x0000FF00, 
-				   0x00FF0000, 
-				   0xFF000000
+                                   0x000000FF,
+                                   0x0000FF00,
+                                   0x00FF0000,
+                                   0xFF000000
 #else
-				   0xFF000000,
-				   0x00FF0000, 
-				   0x0000FF00, 
-				   0x000000FF
+                                   0xFF000000,
+                                   0x00FF0000,
+                                   0x0000FF00,
+                                   0x000000FF
 #endif
-				   );
+                                   );
       if ( image == NULL ) {
-	return 0;
+        return 0;
       }
-      
+
       /* Save the alpha blending attributes */
       saved_flags = surface->flags&(SDL_SRCALPHA|SDL_RLEACCELOK);
       saved_alpha = surface->format->alpha;
       if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
-	SDL_SetAlpha(surface, 0, 0);
+        SDL_SetAlpha(surface, 0, 0);
       }
-      
+
       /* Copy the surface into the GL texture image */
       area.x = 0;
@@ -98,11 +102,11 @@
       area.h = surface->h;
       SDL_BlitSurface(surface, &area, image, &area);
-      
+
       /* Restore the alpha blending attributes */
       if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
-	SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha);
-	this->bAlpha = true;
+        SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha);
+        this->bAlpha = true;
       }
-      
+
       /* Create an OpenGL texture for the image */
       glGenTextures(1, &texture);
@@ -112,22 +116,22 @@
       // build the Texture
       glTexImage2D(GL_TEXTURE_2D,
-		   0,
-		   GL_RGBA,
-		   w, h,
-		   0,
-		   GL_RGBA,
-		   GL_UNSIGNED_BYTE,
-		   image->pixels);
+                   0,
+                   GL_RGBA,
+                   w, h,
+                   0,
+                   GL_RGBA,
+                   GL_UNSIGNED_BYTE,
+                   image->pixels);
       // build the MipMaps
       gluBuild2DMipmaps(GL_TEXTURE_2D,
-			GL_RGBA,
-			w,
-			h,
-			GL_RGBA,
-			GL_UNSIGNED_BYTE,
-			image->pixels);
-      
+                        GL_RGBA,
+                        w,
+                        h,
+                        GL_RGBA,
+                        GL_UNSIGNED_BYTE,
+                        image->pixels);
+
       SDL_FreeSurface(image); /* No longer needed */
-      
+
       return texture;
     }
@@ -143,31 +147,31 @@
     {
       if (imageName)
-	{
-	  SDL_Surface* tmpSurf;
-	  if (this->texture)
-	    glDeleteTextures(1, &this->texture);
-	  // load the new Image to memory
-	  tmpSurf = IMG_Load(imageName);
-	  if(!tmpSurf)
-	    {
-	      PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
-	      return false;
-	    }
+        {
+          SDL_Surface* tmpSurf;
+          if (this->texture)
+            glDeleteTextures(1, &this->texture);
+          // load the new Image to memory
+          tmpSurf = IMG_Load(imageName);
+          if(!tmpSurf)
+            {
+              PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
+              return false;
+            }
 
-	  GLubyte* pixels = (GLubyte*)tmpSurf->pixels;
+          GLubyte* pixels = (GLubyte*)tmpSurf->pixels;
 
-	  PRINTF(3)("loading Image %s\n", imageName);
-	  if (tmpSurf)
-	    this->texture = loadTexToGL(tmpSurf);
+          PRINTF(3)("loading Image %s\n", imageName);
+          if (tmpSurf)
+            this->texture = loadTexToGL(tmpSurf);
 
-	  
-	  SDL_FreeSurface(tmpSurf);
-	  return true;
-	}
+
+          SDL_FreeSurface(tmpSurf);
+          return true;
+        }
       else
-	{
-	  PRINTF(2)("Image not Found: %s\n", imageName);
-	  return false;
-	}
+        {
+          PRINTF(2)("Image not Found: %s\n", imageName);
+          return false;
+        }
     }
 }
Index: orxonox/trunk/src/lib/graphics/text_engine.h
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4661)
+++ orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4662)
@@ -19,5 +19,10 @@
 
 #include "glincl.h"
+
+#ifdef HAVE_SDL_IMAGE_H
 #include "SDL_ttf.h"
+#else
+#include "SDL/SDL_ttf.h"
+#endif
 
 #include "vector.h"
