Index: /orxonox/trunk/config.h.in
===================================================================
--- /orxonox/trunk/config.h.in	(revision 1958)
+++ /orxonox/trunk/config.h.in	(revision 1959)
@@ -6,13 +6,4 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `GL' library (-lGL). */
-#undef HAVE_LIBGL
-
-/* Define to 1 if you have the `GLU' library (-lGLU). */
-#undef HAVE_LIBGLU
-
-/* Define to 1 if you have the `glut' library (-lglut). */
-#undef HAVE_LIBGLUT
 
 /* Define to 1 if you have the `m' library (-lm). */
Index: /orxonox/trunk/configure
===================================================================
--- /orxonox/trunk/configure	(revision 1958)
+++ /orxonox/trunk/configure	(revision 1959)
@@ -1321,7 +1321,4 @@
 
 
-
-          ac_config_headers="$ac_config_headers config.h"
-
 am__api_version="1.7"
 ac_aux_dir=
@@ -1726,4 +1723,7 @@
 
 
+          ac_config_headers="$ac_config_headers config.h"
+
+
 # Checks for programs.
 ac_ext=cc
@@ -3283,14 +3283,323 @@
 
 # Checks for libraries.
-# FIXME: Replace `main' with a function in `-lGL':
-
-
-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
+
+#  cheking for libGL
+#   checking for Unix GL
+
+echo "$as_me:$LINENO: checking for glPushMatrix in -lGL" >&5
+echo $ECHO_N "checking for glPushMatrix in -lGL... $ECHO_C" >&6
+if test "${ac_cv_lib_GL_glPushMatrix+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lGL  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 glPushMatrix ();
+int
+main ()
+{
+glPushMatrix ();
+  ;
+  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_GL_glPushMatrix=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_GL_glPushMatrix=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_GL_glPushMatrix" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_glPushMatrix" >&6
+if test $ac_cv_lib_GL_glPushMatrix = yes; then
+  FOUND_GL=yes
+fi
+
+if test "$FOUND_GL" = "yes" ; then
+    LIBS="$LIBS -lGL"
+    #   checking for Windows openGl library
+else
+    echo "We did not find the Linux opengl Library. Checking for Windows Library"
+    echo "$as_me:$LINENO: checking for glPushMatrix in -lopengl32" >&5
+echo $ECHO_N "checking for glPushMatrix in -lopengl32... $ECHO_C" >&6
+if test "${ac_cv_lib_opengl32_glPushMatrix+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopengl32  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 glPushMatrix ();
+int
+main ()
+{
+glPushMatrix ();
+  ;
+  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_opengl32_glPushMatrix=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_opengl32_glPushMatrix=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_opengl32_glPushMatrix" >&5
+echo "${ECHO_T}$ac_cv_lib_opengl32_glPushMatrix" >&6
+if test $ac_cv_lib_opengl32_glPushMatrix = yes; then
+  FOUND_opengl=yes
+fi
+
+    if test "$FOUND_opengl" = "yes" ; then
+	LIBS="$LIBS -lopengl32"
+
+	else
+	 echo "------------------"
+	 echo "opengl not found."
+	 echo "please install the opengl package which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+fi
+
+#  cheking for libGLU
+echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
+echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
+if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGLU  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 gluProject ();
+int
+main ()
+{
+gluProject ();
+  ;
+  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_GLU_gluProject=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_GLU_gluProject=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_GLU_gluProject" >&5
+echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
+if test $ac_cv_lib_GLU_gluProject = yes; then
+  FOUND_GLU=yes
+fi
+
+if test "$FOUND_GLU" = "yes" ; then
+    LIBS="$LIBS -lGLU"
+    #   checking for Windows GLU32 library
+else
+    echo "We did not find the Linux GLU Library. Checking for Windows Library"
+    echo "$as_me:$LINENO: checking for glPushMatrix in -lGLU32" >&5
+echo $ECHO_N "checking for glPushMatrix in -lGLU32... $ECHO_C" >&6
+if test "${ac_cv_lib_GLU32_glPushMatrix+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGLU32  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 glPushMatrix ();
+int
+main ()
+{
+glPushMatrix ();
+  ;
+  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_GLU32_glPushMatrix=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_GLU32_glPushMatrix=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_GLU32_glPushMatrix" >&5
+echo "${ECHO_T}$ac_cv_lib_GLU32_glPushMatrix" >&6
+if test $ac_cv_lib_GLU32_glPushMatrix = yes; then
+  FOUND_GLU32=yes
+fi
+
+    if test "$FOUND_GLU32" = "yes" ; then
+	LIBS="$LIBS -lGLU32"
+
+	else
+	 echo "------------------"
+	 echo "GLU library not found."
+	 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+fi
+# FIXME: Replace `main' with a function in `-lOSMesa':
+
+echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
+echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
+if test "${ac_cv_lib_OSMesa_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lOSMesa  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3331,10 +3640,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_GL_main=yes
+  ac_cv_lib_OSMesa_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_GL_main=no
+ac_cv_lib_OSMesa_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -3342,24 +3651,24 @@
 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_OSMesa_main" >&5
+echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
+if test $ac_cv_lib_OSMesa_main = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGL 1
-_ACEOF
-
-  LIBS="-lGL $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lGLU':
-
-echo "$as_me:$LINENO: checking for main in -lGLU" >&5
-echo $ECHO_N "checking for main in -lGLU... $ECHO_C" >&6
-if test "${ac_cv_lib_GLU_main+set}" = set; then
+#define HAVE_LIBOSMESA 1
+_ACEOF
+
+  LIBS="-lOSMesa $LIBS"
+
+fi
+
+# FIXME: Replace `main' with a function in `-lX11':
+
+echo "$as_me:$LINENO: checking for main in -lX11" >&5
+echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
+if test "${ac_cv_lib_X11_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lGLU  $LIBS"
+LIBS="-lX11  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3400,10 +3709,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_GLU_main=yes
+  ac_cv_lib_X11_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_GLU_main=no
+ac_cv_lib_X11_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -3411,24 +3720,24 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5
-echo "${ECHO_T}$ac_cv_lib_GLU_main" >&6
-if test $ac_cv_lib_GLU_main = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
+echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
+if test $ac_cv_lib_X11_main = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGLU 1
-_ACEOF
-
-  LIBS="-lGLU $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lOSMesa':
-
-echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
-echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
-if test "${ac_cv_lib_OSMesa_main+set}" = set; then
+#define HAVE_LIBX11 1
+_ACEOF
+
+  LIBS="-lX11 $LIBS"
+
+fi
+
+# FIXME: Replace `main' with a function in `-lXt':
+
+echo "$as_me:$LINENO: checking for main in -lXt" >&5
+echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
+if test "${ac_cv_lib_Xt_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lOSMesa  $LIBS"
+LIBS="-lXt  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3469,10 +3778,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_OSMesa_main=yes
+  ac_cv_lib_Xt_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_OSMesa_main=no
+ac_cv_lib_Xt_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -3480,24 +3789,24 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5
-echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
-if test $ac_cv_lib_OSMesa_main = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
+echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
+if test $ac_cv_lib_Xt_main = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBOSMESA 1
-_ACEOF
-
-  LIBS="-lOSMesa $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lX11':
-
-echo "$as_me:$LINENO: checking for main in -lX11" >&5
-echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
-if test "${ac_cv_lib_X11_main+set}" = set; then
+#define HAVE_LIBXT 1
+_ACEOF
+
+  LIBS="-lXt $LIBS"
+
+fi
+
+
+#  cheking for libglut32
+echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
+echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6
+if test "${ac_cv_lib_glut_glutInit+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lX11  $LIBS"
+LIBS="-lglut  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3507,9 +3816,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 glutInit ();
 int
 main ()
 {
-main ();
+glutInit ();
   ;
   return 0;
@@ -3538,10 +3853,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_X11_main=yes
+  ac_cv_lib_glut_glutInit=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_X11_main=no
+ac_cv_lib_glut_glutInit=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -3549,24 +3864,22 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
-echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
-if test $ac_cv_lib_X11_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBX11 1
-_ACEOF
-
-  LIBS="-lX11 $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lXt':
-
-echo "$as_me:$LINENO: checking for main in -lXt" >&5
-echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
-if test "${ac_cv_lib_Xt_main+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5
+echo "${ECHO_T}$ac_cv_lib_glut_glutInit" >&6
+if test $ac_cv_lib_glut_glutInit = yes; then
+  FOUND_glut=yes
+fi
+
+if test "$FOUND_glut" = "yes" ; then
+    LIBS="$LIBS -lglut"
+    #   checking for Windows glut32 library
+else
+    echo "We did not find the Linux glut Library. Checking for Windows Library"
+    echo "$as_me:$LINENO: checking for glPushMatrix in -lglut32" >&5
+echo $ECHO_N "checking for glPushMatrix in -lglut32... $ECHO_C" >&6
+if test "${ac_cv_lib_glut32_glPushMatrix+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXt  $LIBS"
+LIBS="-lglut32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3576,9 +3889,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 glPushMatrix ();
 int
 main ()
 {
-main ();
+glPushMatrix ();
   ;
   return 0;
@@ -3607,10 +3926,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_Xt_main=yes
+  ac_cv_lib_glut32_glPushMatrix=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_Xt_main=no
+ac_cv_lib_glut32_glPushMatrix=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -3618,82 +3937,19 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
-echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
-if test $ac_cv_lib_Xt_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBXT 1
-_ACEOF
-
-  LIBS="-lXt $LIBS"
-
-fi
-
-# FIXME: Replace `main' with a function in `-lglut':
-
-echo "$as_me:$LINENO: checking for main in -lglut" >&5
-echo $ECHO_N "checking for main in -lglut... $ECHO_C" >&6
-if test "${ac_cv_lib_glut_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglut  $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_glut_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_glut_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_glut_main" >&5
-echo "${ECHO_T}$ac_cv_lib_glut_main" >&6
-if test $ac_cv_lib_glut_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGLUT 1
-_ACEOF
-
-  LIBS="-lglut $LIBS"
-
+echo "$as_me:$LINENO: result: $ac_cv_lib_glut32_glPushMatrix" >&5
+echo "${ECHO_T}$ac_cv_lib_glut32_glPushMatrix" >&6
+if test $ac_cv_lib_glut32_glPushMatrix = yes; then
+  FOUND_glut32=yes
+fi
+
+    if test "$FOUND_glut32" = "yes" ; then
+	LIBS="$LIBS -lglut32"
+    else
+	 echo "------------------"
+	 echo "glut library not found."
+	 echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
+	 echo "------------------"
+	 exit -1
+    fi
 fi
 
Index: /orxonox/trunk/configure.ac
===================================================================
--- /orxonox/trunk/configure.ac	(revision 1958)
+++ /orxonox/trunk/configure.ac	(revision 1959)
@@ -4,7 +4,7 @@
 AC_PREREQ(2.59)
 AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
+AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([.])
 AC_CONFIG_HEADER([config.h])
-AM_INIT_AUTOMAKE
 
 # Checks for programs.
@@ -13,8 +13,45 @@
 
 # Checks for libraries.
-# FIXME: Replace `main' with a function in `-lGL':
-AC_CHECK_LIB([GL], [main])
-# FIXME: Replace `main' with a function in `-lGLU':
-AC_CHECK_LIB([GLU], [main])
+
+#  cheking for libGL
+#   checking for Unix GL
+AC_CHECK_LIB([GL], [glPushMatrix], FOUND_GL=yes)
+if test "$FOUND_GL" = "yes" ; then
+    LIBS="$LIBS -lGL"
+    #   checking for Windows openGl library
+else
+    echo "We did not find the Linux opengl Library. Checking for Windows Library"
+    AC_CHECK_LIB([opengl32], [glPushMatrix], FOUND_opengl=yes)
+    if test "$FOUND_opengl" = "yes" ; then
+	LIBS="$LIBS -lopengl32"
+	
+	else
+	 echo "------------------"
+	 echo "opengl not found."
+	 echo "please install the opengl package which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+fi
+
+#  cheking for libGLU
+AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
+if test "$FOUND_GLU" = "yes" ; then
+    LIBS="$LIBS -lGLU"
+    #   checking for Windows GLU32 library
+else
+    echo "We did not find the Linux GLU Library. Checking for Windows Library"
+    AC_CHECK_LIB([GLU32], [glPushMatrix], FOUND_GLU32=yes)
+    if test "$FOUND_GLU32" = "yes" ; then
+	LIBS="$LIBS -lGLU32"
+	
+	else
+	 echo "------------------"
+	 echo "GLU library not found."
+	 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
+	 echo "------------------"
+	 exit -1
+    fi
+fi
 # FIXME: Replace `main' with a function in `-lOSMesa':
 AC_CHECK_LIB([OSMesa], [main])
@@ -23,6 +60,24 @@
 # FIXME: Replace `main' with a function in `-lXt':
 AC_CHECK_LIB([Xt], [main])
-# FIXME: Replace `main' with a function in `-lglut':
-AC_CHECK_LIB([glut], [main])
+
+#  cheking for libglut32
+AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes)
+if test "$FOUND_glut" = "yes" ; then
+    LIBS="$LIBS -lglut"
+    #   checking for Windows glut32 library
+else
+    echo "We did not find the Linux glut Library. Checking for Windows Library"
+    AC_CHECK_LIB([glut32], [glPushMatrix], FOUND_glut32=yes)
+    if test "$FOUND_glut32" = "yes" ; then
+	LIBS="$LIBS -lglut32"
+    else
+	 echo "------------------"
+	 echo "glut library not found."
+	 echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
+	 echo "------------------"
+	 exit -1
+    fi
+fi
+
 # FIXME: Replace `main' with a function in `-lm':
 AC_CHECK_LIB([m], [main])
Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 1958)
+++ /orxonox/trunk/src/Makefile.am	(revision 1959)
@@ -1,4 +1,4 @@
 AM_CXXFLAGS="-I/usr/X11R6/include"
-AM_LDFLAGS="-L/usr/Mesa-6.0.1/lib -lglut32 -lGLU32 -lopengl32 -lm -L/usr/X11R6/lib -lXt -lX11"
+AM_LDFLAGS="-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11"
 
 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 1958)
+++ /orxonox/trunk/src/Makefile.in	(revision 1959)
@@ -111,5 +111,5 @@
 target_alias = @target_alias@
 AM_CXXFLAGS = "-I/usr/X11R6/include"
-AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib -lglut32 -lGLU32 -lopengl32 -lm -L/usr/X11R6/lib -lXt -lX11"
+AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11"
 
 
