Index: orxonox/trunk/configure
===================================================================
--- orxonox/trunk/configure	(revision 3423)
+++ orxonox/trunk/configure	(revision 3424)
@@ -867,5 +867,5 @@
   --enable-debug          compiles in debug mode. Lots of debug info about the
                           game.
-  --enable-sub-projects   also builds the subProjects by default
+  --enable-sub-projects   also builds the subProjects while make from srcdir
 
 Optional Packages:
@@ -1339,5 +1339,5 @@
 
 
-# Detect the canonical host and target build environment.
+## Detect the canonical host and target build environment.
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -1447,5 +1447,4 @@
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-
 
 am__api_version="1.8"
@@ -1854,6 +1853,7 @@
 
 
-
-# Checks for programs.
+#########################
+## Checks for programs ##
+#########################
 ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -3842,6 +3842,11 @@
 
 
-### CHECKING  OPTIONAT ARGUMENTS
-## DEBUG-statement
+##################################
+## CHECKING  OPTIONAL ARGUMENTS ##
+##################################
+
+#-----------------#
+# DEBUG-statement #
+#-----------------#
 DEBUG=no
 echo "$as_me:$LINENO: checking if DEBUG-mode should be enabled" >&5
@@ -3853,14 +3858,14 @@
 fi;
 
-if test "$DEBUG" = "no"; then
+if test x$DEBUG = xno; then
 	echo "no"
-	echo " -> Setting debuglevel to 1. Like this you can still see errors."
-	DEBUG=1
-elif test "$DEBUG" = yes; then
+	echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
+	DEBUG=3
+elif test x$DEBUG = xyes; then
 	echo "yes"
-	echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
-	DEBUG=3
-else
-	echo "yes set to $DEBUG"
+	echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!."
+	DEBUG=4
+else
+	echo "yes: setting debuglevel to to $DEBUG"
 fi
 
@@ -3872,5 +3877,7 @@
 
 
-## GTK-disabled
+#--------------#
+# GTK-disabled #
+#--------------#
 echo "$as_me:$LINENO: checking if gtk should be enabled" >&5
 echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6
@@ -3883,12 +3890,14 @@
   def_gtk=yes
 fi;
-if test "$def_gtk" = yes; then
+if test x$def_gtk = xyes; then
   echo "yes"
 fi
-if test "$def_gtk" = no; then
+if test x$def_gtk = xno; then
   echo "no"
 fi
 
-## gThread-disabled
+#------------------#
+# gThread-disabled #
+#------------------#
 echo "$as_me:$LINENO: checking if gThread should be enabled" >&5
 echo $ECHO_N "checking if gThread should be enabled... $ECHO_C" >&6
@@ -3901,12 +3910,14 @@
   def_gthread=yes
 fi;
-if test "$def_gthread" = yes; then
+if test x$def_gthread = xyes; then
   echo "yes"
 fi
-if test "$def_gthread" = no; then
+if test x$def_gthread = xno; then
   echo "no"
 fi
 
-## pthread-disabled
+#------------------#
+# pthread-disabled #
+#------------------#
 echo "$as_me:$LINENO: checking if pthread should be enabled" >&5
 echo $ECHO_N "checking if pthread should be enabled... $ECHO_C" >&6
@@ -3919,12 +3930,14 @@
   def_pthread=yes
 fi;
-if test "$def_pthread" = yes; then
+if test x$def_pthread = xyes; then
   echo "yes"
 fi
-if test "$def_pthread" = no; then
+if test x$def_pthread = xno; then
   echo "no"
 fi
 
-## libCurl disabled?
+#------------------#
+# libCurl-disabled #
+#------------------#
 echo "$as_me:$LINENO: checking if libcURL should be enabled" >&5
 echo $ECHO_N "checking if libcURL should be enabled... $ECHO_C" >&6
@@ -3937,12 +3950,14 @@
   def_curl=yes
 fi;
-if test "$def_curl" = yes; then
+if test x$def_curl = xyes; then
   echo "yes"
 fi
-if test "$def_curl" = no; then
+if test x$def_curl = xno; then
   echo "no"
 fi
 
-### SDL_image-disable
+#-------------------#
+# SDL_image-disable #
+#-------------------#
 def_sdl_image=yes
 echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&5
@@ -3954,14 +3969,14 @@
   def_sdl_image=no
 fi;
-if test "$def_sdl_image" = yes; then
+if test x$def_sdl_image = xyes; then
   echo "yes"
 fi
-if test "$def_sdl_image" = no; then
+if test x$def_sdl_image = xno; then
   echo "no"
 fi
-
-
-### SubProject-enable
-def_sdl_image=yes
+#-------------------#
+# SubProject-enable #
+#-------------------#
+def_sub_projects=no
 echo "$as_me:$LINENO: checking if the SubProjects should be built" >&5
 echo $ECHO_N "checking if the SubProjects should be built... $ECHO_C" >&6
@@ -3971,8 +3986,8 @@
   def_sub_projects=yes
 fi;
-if test "$def_sub_projects" = yes; then
+if test x$def_sub_projects = xyes; then
   echo "yes"
 fi
-if test "$def_sub_projects" = no; then
+if test x$def_sub_projects = xno; then
   echo "no"
 fi
@@ -3988,6 +4003,12 @@
 
 
-## PROGRAMM CHECKING
-# checking for Doxygen
+#######################
+## PROGRAMM CHECKING ##
+## 3. party Programs ##
+#######################
+
+#----------------------#
+# checking for Doxygen #
+#----------------------#
 # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
@@ -4040,5 +4061,9 @@
 
 
-### CHECKING FOR SYSTEM ###
+#########################
+## CHECKING FOR SYSTEM ##
+#########################
+## here the system is checked, and openGL is included
+## also checking for SDL on differen Systems
 
 echo "$as_me:$LINENO: checking for System" >&5
@@ -4046,5 +4071,7 @@
 ## checking for openGL-environment and other sys-specific parameters
 case "$target" in
-### WINDOWS ###
+#---------#
+# WINDOWS #
+#---------#
   *-*-mingw32*)
 echo "mingw-WINDOWS detected"
@@ -4349,5 +4376,5 @@
 fi
 
-    if test "$FOUND_opengl32" = "yes" ; then
+    if test x$FOUND_opengl32 = xyes ; then
 	LIBS="$LIBS -lopengl32"
     else
@@ -4578,5 +4605,5 @@
 fi
 
-    if test "$FOUND_glu32" = "yes" ; then
+    if test x$FOUND_glu32 = xyes ; then
 	LIBS="$LIBS -lGLU32"
     else
@@ -4651,5 +4678,5 @@
 fi
 
-    if test $FOUND_mingw32 = "yes"; then
+    if test x$FOUND_mingw32 = xyes; then
 	LIBS="$LIBS -lmingw32"
     fi
@@ -4873,5 +4900,5 @@
 fi
 
-    if test "$FOUND_sdlmain" = "yes" ; then
+    if test x$FOUND_sdlmain = xyes ; then
        LIBS="$LIBS -lsdlmain"
     else
@@ -4944,5 +4971,5 @@
 fi
 
-    if test "$FOUND_sdl" = "yes" ; then
+    if test x$FOUND_sdl = xyes ; then
        LIBS="$LIBS -lsdl"
     else
@@ -4955,6 +4982,7 @@
 
     ;;
-
-### LINUX ###
+#-------#
+# LINUX #
+#-------#
  *-*-linux*)
 echo "Linux detected"
@@ -5189,5 +5217,5 @@
 fi
 
-   if test "$FOUND_GL" = "yes" ; then
+   if test x$FOUND_GL = xyes ; then
      LIBS="$LIBS -lGL"
    else
@@ -5423,5 +5451,5 @@
 fi
 
-    if test "$FOUND_GLU" = "yes" ; then
+    if test x$FOUND_GLU = xyes ; then
       LIBS="$LIBS -lGLU"
     else
@@ -5652,5 +5680,5 @@
 fi
 
-     if test "$FOUND_SDL" = "yes" ; then
+     if test x$FOUND_SDL = xyes ; then
        LIBS="$LIBS -lSDL"
      else
@@ -5672,8 +5700,9 @@
 #    LIBS="$LIBS $SDL_LIBS"
     ;;
-
-### OS X ###
+#-----------#
+# MAC -OS X #
+#-----------#
  *darwin*)
-echo "OS X detected"
+ echo "OS X detected"
 
  osX="yes"
@@ -5993,4 +6022,10 @@
    LIBS="$LIBS -framework OpenGL"
 
+       SDL_CFLAGS=`sdl-config --cflags`
+       SDL_LIBS=`sdl-config --libs`
+       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+       LIBS="$LIBS $SDL_LIBS"
+
+
 # checking for SDL-headers
 #    AC_CHECK_HEADERS(SDL/SDL.h ,,
@@ -6004,8 +6039,4 @@
 #      )
 
-       SDL_CFLAGS=`sdl-config --cflags`
-       SDL_LIBS=`sdl-config --libs`
-       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-       LIBS="$LIBS $SDL_LIBS"
 
     ;;
@@ -6017,6 +6048,12 @@
 
 
-## check for SDL_Image
-if test "$def_sdl_image" = "yes"; then
+###################################
+## CHECKING FOR HEADERS AND LIBS ##
+###################################
+
+#-----------#
+# SDL_Image #
+#-----------#
+if test x$def_sdl_image = xyes; then
 # checking for SDL_image-headers
 
@@ -6173,5 +6210,5 @@
 
 fi
-if test "$def_sdl_image" = "yes"; then
+if test x$def_sdl_image = xyes; then
 # checking for SDL_image-lib
   echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
@@ -6237,5 +6274,5 @@
 fi
 
-     if test "$FOUND_SDL_image" = "yes" ; then
+     if test x$FOUND_SDL_image = xyes ; then
        LIBS="$LIBS -lSDL_image"
      else
@@ -6248,7 +6285,9 @@
 fi
 
-
-if test "$def_sdl_image" = "no"; then
- ## checking for libjpeg
+## case no SDL-image:
+if test x$def_sdl_image = xno; then
+#---------#
+# libjpeg #
+#---------#
 
 for ac_header in jpeglib.h
@@ -6403,5 +6442,5 @@
 done
 
- if test $jpegHeader = "no"; then
+ if test xjpegHeader = xno; then
 	echo " not including jpeg."
  else
@@ -6468,5 +6507,5 @@
 fi
 
-    if test "$FOUND_jpeg" = "yes" ; then
+    if test x$FOUND_jpeg = xyes ; then
       LIBS="$LIBS -ljpeg"
     else
@@ -6479,5 +6518,7 @@
  fi
 
- ## checking for libpng
+#--------#
+# libpng #
+#--------#
 
 for ac_header in png.h
@@ -6632,5 +6673,5 @@
 done
 
- if test $pngHeader = "no"; then
+ if test x$pngHeader = xno; then
 	echo " not including png."
  else
@@ -6697,5 +6738,5 @@
 fi
 
-    if test "$FOUND_png" = "yes" ; then
+    if test x$FOUND_png = xyes ; then
       LIBS="$LIBS -lpng"
     else
@@ -6709,6 +6750,8 @@
 fi
 
-## checking for GTK
-if test "$def_gtk" = yes; then
+#-----#
+# 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)
@@ -6743,6 +6786,8 @@
 
 
-## checking for gThread
-if test "$def_gthread" = yes; then
+#---------#
+# gThread #
+#---------#
+if test x$def_gthread = xyes; then
 
 	echo "$as_me:$LINENO: checking for gthread" >&5
@@ -6776,6 +6821,8 @@
 
 
-## checking for libcURL
-if test "$def_curl" = yes; then
+#---------#
+# libcURL #
+#---------#
+if test x$def_curl = xyes; then
 
 
@@ -7020,6 +7067,7 @@
 
 
-
-##checking for pthread
+#---------#
+# pthread #
+#---------#
 if test x$def_pthread = xyes ; then
  if test x$have_gthread = xyes ; then
@@ -7238,9 +7286,11 @@
 fi
 
-   if test "$FOUND_pthread" = "yes" ; then
+   if test x$FOUND_pthread = xyes ; then
       LIBS="$LIBS -lpthread"
    fi
  fi
 fi
+
+
 # FIXME: Replace `main' with a function in `-lm':
 
@@ -8129,4 +8179,7 @@
 
 
+######################
+## OUTPUT CONFIGURE ##
+######################
                                                   ac_config_files="$ac_config_files Makefile src/Makefile src/importer/Makefile src/console/Makefile src/gui/Makefile"
 
