Index: orxonox/trunk/configure.ac
===================================================================
--- orxonox/trunk/configure.ac	(revision 3790)
+++ 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':
