Index: orxonox/branches/updater/configure
===================================================================
--- orxonox/branches/updater/configure	(revision 3283)
+++ orxonox/branches/updater/configure	(revision 3561)
@@ -312,5 +312,5 @@
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE GTHREAD_LIBS GTHREAD_CFLAGS HAVE_GTHREAD_TRUE HAVE_GTHREAD_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE GTHREAD_LIBS GTHREAD_CFLAGS HAVE_GTHREAD_TRUE HAVE_GTHREAD_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -867,4 +867,5 @@
   --enable-debug          compiles in debug mode. Lots of debug info about the
                           game.
+  --enable-sub-projects   also builds the subProjects while make from srcdir
 
 Optional Packages:
@@ -1338,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
@@ -1446,5 +1447,4 @@
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-
 
 am__api_version="1.8"
@@ -1853,6 +1853,7 @@
 
 
-
-# Checks for programs.
+#########################
+## Checks for programs ##
+#########################
 ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -3841,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
@@ -3852,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
 
@@ -3871,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
@@ -3882,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
@@ -3900,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
@@ -3918,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
@@ -3936,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
@@ -3953,14 +3969,46 @@
   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
-
-
-## PROGRAMM CHECKING
-# checking for Doxygen
+#-------------------#
+# 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
+# Check whether --enable-sub-projects or --disable-sub-projects was given.
+if test "${enable_sub_projects+set}" = set; then
+  enableval="$enable_sub_projects"
+  def_sub_projects=yes
+fi;
+if test x$def_sub_projects = xyes; then
+  echo "yes"
+fi
+if test x$def_sub_projects = xno; then
+  echo "no"
+fi
+
+
+if test x$def_sub_projects = xyes; then
+  SUB_PROJECTS_TRUE=
+  SUB_PROJECTS_FALSE='#'
+else
+  SUB_PROJECTS_TRUE='#'
+  SUB_PROJECTS_FALSE=
+fi
+
+
+#######################
+## 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
@@ -4013,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
@@ -4019,5 +4071,7 @@
 ## checking for openGL-environment and other sys-specific parameters
 case "$target" in
-### WINDOWS ###
+#---------#
+# WINDOWS #
+#---------#
   *-*-mingw32*)
 echo "mingw-WINDOWS detected"
@@ -4322,5 +4376,5 @@
 fi
 
-    if test "$FOUND_opengl32" = "yes" ; then
+    if test x$FOUND_opengl32 = xyes ; then
 	LIBS="$LIBS -lopengl32"
     else
@@ -4551,5 +4605,5 @@
 fi
 
-    if test "$FOUND_glu32" = "yes" ; then
+    if test x$FOUND_glu32 = xyes ; then
 	LIBS="$LIBS -lGLU32"
     else
@@ -4624,5 +4678,5 @@
 fi
 
-    if test $FOUND_mingw32 = "yes"; then
+    if test x$FOUND_mingw32 = xyes; then
 	LIBS="$LIBS -lmingw32"
     fi
@@ -4846,5 +4900,5 @@
 fi
 
-    if test "$FOUND_sdlmain" = "yes" ; then
+    if test x$FOUND_sdlmain = xyes ; then
        LIBS="$LIBS -lsdlmain"
     else
@@ -4917,5 +4971,5 @@
 fi
 
-    if test "$FOUND_sdl" = "yes" ; then
+    if test x$FOUND_sdl = xyes ; then
        LIBS="$LIBS -lsdl"
     else
@@ -4928,6 +4982,7 @@
 
     ;;
-
-### LINUX ###
+#-------#
+# LINUX #
+#-------#
  *-*-linux*)
 echo "Linux detected"
@@ -4936,5 +4991,5 @@
 
 CPPFLAGS="-I/usr/X11R6/include"
-LDFLAGS="-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
+LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
 # checking gl header
 
@@ -5094,7 +5149,7 @@
 
 #  checking for Unix GL
-   echo "$as_me:$LINENO: checking for main in -lGL" >&5
-echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
-if test "${ac_cv_lib_GL_main+set}" = set; then
+   echo "$as_me:$LINENO: checking for glLoadIdentity in -lGL" >&5
+echo $ECHO_N "checking for glLoadIdentity in -lGL... $ECHO_C" >&6
+if test "${ac_cv_lib_GL_glLoadIdentity+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -5108,9 +5163,15 @@
 /* end confdefs.h.  */
 
-
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char glLoadIdentity ();
 int
 main ()
 {
-main ();
+glLoadIdentity ();
   ;
   return 0;
@@ -5139,10 +5200,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_GL_main=yes
+  ac_cv_lib_GL_glLoadIdentity=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_GL_main=no
+ac_cv_lib_GL_glLoadIdentity=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5150,11 +5211,11 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
-echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
-if test $ac_cv_lib_GL_main = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glLoadIdentity" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_glLoadIdentity" >&6
+if test $ac_cv_lib_GL_glLoadIdentity = yes; then
   FOUND_GL=yes
 fi
 
-   if test "$FOUND_GL" = "yes" ; then
+   if test x$FOUND_GL = xyes ; then
      LIBS="$LIBS -lGL"
    else
@@ -5390,5 +5451,5 @@
 fi
 
-    if test "$FOUND_GLU" = "yes" ; then
+    if test x$FOUND_GLU = xyes ; then
       LIBS="$LIBS -lGLU"
     else
@@ -5619,5 +5680,5 @@
 fi
 
-     if test "$FOUND_SDL" = "yes" ; then
+     if test x$FOUND_SDL = xyes ; then
        LIBS="$LIBS -lSDL"
      else
@@ -5639,8 +5700,9 @@
 #    LIBS="$LIBS $SDL_LIBS"
     ;;
-
-### OS X ###
+#-----------#
+# MAC -OS X #
+#-----------#
  *darwin*)
-echo "OS X detected"
+ echo "OS X detected"
 
  osX="yes"
@@ -5960,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 ,,
@@ -5971,8 +6039,4 @@
 #      )
 
-       SDL_CFLAGS=`sdl-config --cflags`
-       SDL_LIBS=`sdl-config --libs`
-       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-       LIBS="$LIBS $SDL_LIBS"
 
     ;;
@@ -5984,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
 
@@ -6140,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
@@ -6204,5 +6274,5 @@
 fi
 
-     if test "$FOUND_SDL_image" = "yes" ; then
+     if test x$FOUND_SDL_image = xyes ; then
        LIBS="$LIBS -lSDL_image"
      else
@@ -6215,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
@@ -6370,5 +6442,5 @@
 done
 
- if test $jpegHeader = "no"; then
+ if test x$jpegHeader = xno; then
 	echo " not including jpeg."
  else
@@ -6435,5 +6507,5 @@
 fi
 
-    if test "$FOUND_jpeg" = "yes" ; then
+    if test x$FOUND_jpeg = xyes ; then
       LIBS="$LIBS -ljpeg"
     else
@@ -6446,5 +6518,7 @@
  fi
 
- ## checking for libpng
+#--------#
+# libpng #
+#--------#
 
 for ac_header in png.h
@@ -6599,5 +6673,5 @@
 done
 
- if test $pngHeader = "no"; then
+ if test x$pngHeader = xno; then
 	echo " not including png."
  else
@@ -6664,5 +6738,5 @@
 fi
 
-    if test "$FOUND_png" = "yes" ; then
+    if test x$FOUND_png = xyes ; then
       LIBS="$LIBS -lpng"
     else
@@ -6676,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)
@@ -6710,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
@@ -6743,6 +6821,8 @@
 
 
-## checking for libcURL
-if test "$def_curl" = yes; then
+#---------#
+# libcURL #
+#---------#
+if test x$def_curl = xyes; then
 
 
@@ -6987,6 +7067,7 @@
 
 
-
-##checking for pthread
+#---------#
+# pthread #
+#---------#
 if test x$def_pthread = xyes ; then
  if test x$have_gthread = xyes ; then
@@ -7205,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':
 
@@ -8096,5 +8179,9 @@
 
 
-                                                  ac_config_files="$ac_config_files Makefile src/console/Makefile src/gui/Makefile src/Makefile src/importer/Makefile"
+######################
+## OUTPUT CONFIGURE ##
+######################
+                                                                                ac_config_files="$ac_config_files Makefile src/Makefile src/lib/Makefile src/lib/graphics/Makefile src/lib/graphics/importer/Makefile src/lib/gui/Makefile src/lib/gui/console/Makefile src/lib/gui/gui/Makefile"
+
 
 cat >confcache <<\_ACEOF
@@ -8207,4 +8294,11 @@
 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; }; }
@@ -8683,8 +8777,11 @@
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "src/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/console/Makefile" ;;
-  "src/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/gui/Makefile" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-  "src/importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/importer/Makefile" ;;
+  "src/lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;;
+  "src/lib/graphics/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/graphics/Makefile" ;;
+  "src/lib/graphics/importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/graphics/importer/Makefile" ;;
+  "src/lib/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/Makefile" ;;
+  "src/lib/gui/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/console/Makefile" ;;
+  "src/lib/gui/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/gui/Makefile" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
@@ -8831,4 +8928,6 @@
 s,@EGREP@,$EGREP,;t t
 s,@DEBUG@,$DEBUG,;t t
+s,@SUB_PROJECTS_TRUE@,$SUB_PROJECTS_TRUE,;t t
+s,@SUB_PROJECTS_FALSE@,$SUB_PROJECTS_FALSE,;t t
 s,@DOXYGEN@,$DOXYGEN,;t t
 s,@DOXYGEN_TRUE@,$DOXYGEN_TRUE,;t t
