Index: /trunk/configure
===================================================================
--- /trunk/configure	(revision 5275)
+++ /trunk/configure	(revision 5276)
@@ -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 RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF PKG_CONFIG MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_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 RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF PKG_CONFIG MSBITFIELDS CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -4325,6 +4325,7 @@
     MWINDOWS="-mwindows"
 
-
-
+#--------#
+# MIN-GW #
+#--------#
 # checking for mingw32
     echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
@@ -4394,9 +4395,9 @@
     fi
 
-#-----------#
-# SDL(win) #
-#-----------#
-# checking for SDL-headers
-    # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+#---------------#
+# open-GL (win) #
+#---------------#
+# checking gl header
+   # On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
 
@@ -4471,5 +4472,5 @@
 
 
-for ac_header in SDL/SDL.h
+for ac_header in GL/gl.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4617,6 +4618,6 @@
 
 else
-  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
-echo "$as_me: error: cannot find SDL headers" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
+echo "$as_me: error: cannot find opengl headers" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -4624,13 +4625,12 @@
 done
 
-
-#checking for libSDL
-    echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
-echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
-if test "${ac_cv_lib_sdlmain_main+set}" = set; then
+#   checking for Windows openGl library
+    echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
+echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
+if test "${ac_cv_lib_opengl32_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsdlmain  $LIBS"
+LIBS="-lopengl32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4671,10 +4671,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_sdlmain_main=yes
+  ac_cv_lib_opengl32_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_sdlmain_main=no
+ac_cv_lib_opengl32_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4682,97 +4682,21 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
-echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
-if test $ac_cv_lib_sdlmain_main = yes; then
-  FOUND_sdlmain=yes
-fi
-
-    if test x$FOUND_sdlmain = xyes ; then
-       LIBS="$LIBS -lsdlmain"
-    else
-        echo "------------------"
-        echo "SDL library not found."
-        echo "please install the SDL library, which can be found at http://www.libsdl.org"
-        echo "------------------"
-        exit 1
+echo "$as_me:$LINENO: result: $ac_cv_lib_opengl32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_opengl32_main" >&6
+if test $ac_cv_lib_opengl32_main = yes; then
+  FOUND_GL=yes; LIBS="$LIBS -lopengl32"
+fi
+
+    if test x$FOUND_GL != xyes ; then
+         echo "------------------"
+         echo "opengl not found."
+         echo "please install the opengl package which can be found at http://www.opengl.org"
+         echo "------------------"
+         exit -1
     fi
-    echo "$as_me:$LINENO: checking for main in -lsdl" >&5
-echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
-if test "${ac_cv_lib_sdl_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsdl  $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_sdl_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_sdl_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_sdl_main" >&5
-echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
-if test $ac_cv_lib_sdl_main = yes; then
-  FOUND_sdl=yes
-fi
-
-    if test x$FOUND_sdl = xyes ; then
-       LIBS="$LIBS -lsdl"
-    else
-        echo "------------------"
-        echo "SDL library not found."
-        echo "please install the SDL library, which can be found at http://www.libsdl.org"
-        echo "------------------"
-        exit -1
-    fi
-
-#---------------#
-# open-GL (win) #
-#---------------#
-# checking gl header
-
-for ac_header in GL/gl.h
+
+# cheking for GLU-header
+
+for ac_header in GL/glu.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4927,12 +4851,13 @@
 done
 
-#   checking for Windows openGl library
-    echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
-echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
-if test "${ac_cv_lib_opengl32_main+set}" = set; then
+
+# checking for libGLU
+    echo "$as_me:$LINENO: checking for main in -lglu32" >&5
+echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6
+if test "${ac_cv_lib_glu32_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lopengl32  $LIBS"
+LIBS="-lglu32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4973,10 +4898,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_opengl32_main=yes
+  ac_cv_lib_glu32_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_opengl32_main=no
+ac_cv_lib_glu32_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -4984,25 +4909,21 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_opengl32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_opengl32_main" >&6
-if test $ac_cv_lib_opengl32_main = yes; then
-  FOUND_opengl32=yes
-else
-  "gl/gl.h"
-fi
-
-    if test x$FOUND_opengl32 = xyes ; then
-        LIBS="$LIBS -lopengl32"
-    else
+echo "$as_me:$LINENO: result: $ac_cv_lib_glu32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_glu32_main" >&6
+if test $ac_cv_lib_glu32_main = yes; then
+  FOUND_GLU=yes; LIBS="$LIBS -lGLU32"
+fi
+
+    if test x$FOUND_GLU != xyes ; then
          echo "------------------"
-         echo "opengl not found."
-         echo "please install the opengl package which can be found at http://www.opengl.org"
+         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
 
-# cheking for GLU-header
-
-for ac_header in GL/glu.h
+# checking glew header
+
+for ac_header in GL/glew.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5150,6 +5071,6 @@
 
 else
-  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
-echo "$as_me: error: cannot find opengl headers" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find opengl extension wrangler headers" >&5
+echo "$as_me: error: cannot find opengl extension wrangler headers" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -5157,13 +5078,12 @@
 done
 
-
-# checking for libGLU
-    echo "$as_me:$LINENO: checking for main in -lglu32" >&5
-echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6
-if test "${ac_cv_lib_glu32_main+set}" = set; then
+#   checking for Windows glew library
+    echo "$as_me:$LINENO: checking for main in -lglew32" >&5
+echo $ECHO_N "checking for main in -lglew32... $ECHO_C" >&6
+if test "${ac_cv_lib_glew32_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglu32  $LIBS"
+LIBS="-lglew32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5204,10 +5124,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_glu32_main=yes
+  ac_cv_lib_glew32_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_glu32_main=no
+ac_cv_lib_glew32_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5215,23 +5135,24 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_glu32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_glu32_main" >&6
-if test $ac_cv_lib_glu32_main = yes; then
-  FOUND_glu32=yes
-fi
-
-    if test x$FOUND_glu32 = xyes ; then
-        LIBS="$LIBS -lGLU32"
-    else
+echo "$as_me:$LINENO: result: $ac_cv_lib_glew32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_glew32_main" >&6
+if test $ac_cv_lib_glew32_main = yes; then
+  FOUND_GLEW=yes; LIBS="$LIBS -lglew32"
+fi
+
+    if test x$FOUND_GLEW != xyes ; then
          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 "opengl extension wrangler not found."
+         echo "please install the glew package which can be found at http://glew.sourceforge.net"
          echo "------------------"
          exit -1
     fi
 
-# checking glew header
-
-for ac_header in GL/glew.h
+#--------#
+# openAL #
+#--------#
+# checking for openAL-headers
+
+for ac_header in AL/al.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5379,6 +5300,6 @@
 
 else
-  { { echo "$as_me:$LINENO: error: cannot find opengl extension wrangler headers" >&5
-echo "$as_me: error: cannot find opengl extension wrangler headers" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find openAL header." >&5
+echo "$as_me: error: cannot find openAL header." >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -5386,12 +5307,12 @@
 done
 
-#   checking for Windows glew library
-    echo "$as_me:$LINENO: checking for main in -lglew32" >&5
-echo $ECHO_N "checking for main in -lglew32... $ECHO_C" >&6
-if test "${ac_cv_lib_glew32_main+set}" = set; then
+# checking for openAL-lib
+  echo "$as_me:$LINENO: checking for main in -lOpenAL32" >&5
+echo $ECHO_N "checking for main in -lOpenAL32... $ECHO_C" >&6
+if test "${ac_cv_lib_OpenAL32_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglew32  $LIBS"
+LIBS="-lOpenAL32  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5432,10 +5353,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_glew32_main=yes
+  ac_cv_lib_OpenAL32_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_glew32_main=no
+ac_cv_lib_OpenAL32_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5443,26 +5364,87 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_glew32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_glew32_main" >&6
-if test $ac_cv_lib_glew32_main = yes; then
-  FOUND_glew32=yes
-fi
-
-    if test x$FOUND_glew32 = xyes ; then
-        LIBS="$LIBS -lglew32"
-    else
-         echo "------------------"
-         echo "opengl extension wrangler not found."
-         echo "please install the glew package which can be found at http://glew.sourceforge.net"
-         echo "------------------"
-         exit -1
-    fi
-
-#--------#
-# openAL #
-#--------#
-# checking for openAL-headers
-
-for ac_header in AL/al.h
+echo "$as_me:$LINENO: result: $ac_cv_lib_OpenAL32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_OpenAL32_main" >&6
+if test $ac_cv_lib_OpenAL32_main = yes; then
+  FOUND_OPENAL=yes; LIBS="$LIBS -lOpenAL32"
+fi
+
+  echo "$as_me:$LINENO: checking for main in -lALut" >&5
+echo $ECHO_N "checking for main in -lALut... $ECHO_C" >&6
+if test "${ac_cv_lib_ALut_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lALut  $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_ALut_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ALut_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_ALut_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ALut_main" >&6
+if test $ac_cv_lib_ALut_main = yes; then
+  FOUND_ALUT=yes; LIBS="$LIBS -lALut"
+fi
+
+     if test x$FOUND_OPENAL != xyes ; then
+        echo "------------------"
+        echo "openal library not found."
+        echo "please install the openal library, which can be found at http://www.openal.org"
+        echo "------------------"
+        exit -1
+     fi
+
+
+#-----------#
+# SDL(win) #
+#-----------#
+# checking for SDL-headers
+
+for ac_header in SDL/SDL.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5610,6 +5592,6 @@
 
 else
-  { { echo "$as_me:$LINENO: error: cannot find openAL header." >&5
-echo "$as_me: error: cannot find openAL header." >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
+echo "$as_me: error: cannot find SDL headers" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -5617,12 +5599,13 @@
 done
 
-# checking for openAL-lib
-  echo "$as_me:$LINENO: checking for main in -lOpenAL32" >&5
-echo $ECHO_N "checking for main in -lOpenAL32... $ECHO_C" >&6
-if test "${ac_cv_lib_OpenAL32_main+set}" = set; then
+
+#checking for libSDL
+    echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
+echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
+if test "${ac_cv_lib_sdlmain_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lOpenAL32  $LIBS"
+LIBS="-lsdlmain  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5663,10 +5646,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_OpenAL32_main=yes
+  ac_cv_lib_sdlmain_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_OpenAL32_main=no
+ac_cv_lib_sdlmain_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5674,17 +5657,24 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_OpenAL32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_OpenAL32_main" >&6
-if test $ac_cv_lib_OpenAL32_main = yes; then
-  FOUND_openal=yes
-fi
-
-  echo "$as_me:$LINENO: checking for main in -lALut" >&5
-echo $ECHO_N "checking for main in -lALut... $ECHO_C" >&6
-if test "${ac_cv_lib_ALut_main+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
+echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
+if test $ac_cv_lib_sdlmain_main = yes; then
+  FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"
+fi
+
+    if test x$FOUND_sdlmain != xyes ; then
+        echo "------------------"
+        echo "SDL library not found."
+        echo "please install the SDL library, which can be found at http://www.libsdl.org"
+        echo "------------------"
+        exit 1
+    fi
+    echo "$as_me:$LINENO: checking for main in -lsdl" >&5
+echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
+if test "${ac_cv_lib_sdl_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lALut  $LIBS"
+LIBS="-lsdl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5725,10 +5715,10 @@
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_ALut_main=yes
+  ac_cv_lib_sdl_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_ALut_main=no
+ac_cv_lib_sdl_main=no
 fi
 rm -f conftest.err conftest.$ac_objext \
@@ -5736,22 +5726,19 @@
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ALut_main" >&5
-echo "${ECHO_T}$ac_cv_lib_ALut_main" >&6
-if test $ac_cv_lib_ALut_main = yes; then
-  FOUND_ALut=yes
-fi
-
-     if test x$FOUND_openal = xyes ; then
-      if test x$FOUND_ALut = xyes ; then
-       LIBS="$LIBS -lALut -lOpenAL32"
-     else
+echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
+if test $ac_cv_lib_sdl_main = yes; then
+  FOUND_SDL=yes; LIBS="$LIBS -lsdl"
+fi
+
+    if test x$FOUND_SDL != xyes ; then
         echo "------------------"
-        echo "openal library not found."
-        echo "please install the openal library, which can be found at http://www.openal.org"
+        echo "SDL library not found."
+        echo "please install the SDL library, which can be found at http://www.libsdl.org"
         echo "------------------"
         exit -1
-      fi
-     fi
-    ;;
+    fi
+
+  ;;
 
 #########
@@ -5988,10 +5975,8 @@
 echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
 if test $ac_cv_lib_GL_main = yes; then
-  FOUND_GL=yes
-fi
-
-   if test x$FOUND_GL = xyes ; then
-     LIBS="$LIBS -lGL"
-   else
+  FOUND_GL=yes; LIBS="$LIBS -lGL"
+fi
+
+   if test x$FOUND_GL != xyes ; then
          echo "------------------"
          echo "opengl not found."
@@ -6156,7 +6141,8 @@
 done
 
-
-#    AC_CHECK_LIB([GLU], [main], FOUND_GLU=yes)
-#    if test x$FOUND_GLU = xyes ; then
+### FIXME ###
+#    AC_CHECK_LIB([GLU], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU"])
+#    if test x$FOUND_GLU != xyes ; then
+      FOUND_GLU=yes
       LIBS="$LIBS -lGLU"
 #    else
@@ -6614,8 +6600,8 @@
 echo "${ECHO_T}$ac_cv_lib_openal_main" >&6
 if test $ac_cv_lib_openal_main = yes; then
-  FOUND_openal=yes
-fi
-
-     if test x$FOUND_openal = xyes ; then
+  FOUND_OPENAL=yes
+fi
+
+     if test x$FOUND_OPENAL = xyes ; then
        LIBS="$LIBS -lopenal"
      else
@@ -6840,5 +6826,5 @@
 echo "${ECHO_T}$ac_cv_lib_alut_main" >&6
 if test $ac_cv_lib_alut_main = yes; then
-  FOUND_alut=yes
+  FOUND_ALUT=yes
 fi
 
@@ -6846,5 +6832,7 @@
        LIBS="-lalut $LIBS"
      fi
-
+#-----#
+# SDL #
+#-----#
 # checking for SDL
   echo "$as_me:$LINENO: checking for SDL-version" >&5
@@ -7222,7 +7210,5 @@
 fi
 
-    if test x$FOUND_SDL = xyes ; then
-     echo `sdl-config --libs`
-    else
+    if test x$FOUND_SDL != xyes ; then
         echo "------------------"
         echo "SDL library not found."
@@ -7965,10 +7951,8 @@
 echo "${ECHO_T}$ac_cv_lib_SDL_ttf_TTF_OpenFont" >&6
 if test $ac_cv_lib_SDL_ttf_TTF_OpenFont = yes; then
-  FOUND_SDL_ttf=yes
-fi
-
-     if test x$FOUND_SDL_ttf = xyes ; then
-       LIBS="$LIBS -lSDL_ttf"
-     else
+  FOUND_SDL_ttf=yes; LIBS="$LIBS -lSDL_ttf"
+fi
+
+     if test x$FOUND_SDL_ttf != xyes ; then
         echo "------------------"
         echo "SDL_ttf library not found."
@@ -8347,10 +8331,8 @@
 echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6
 if test $ac_cv_lib_SDL_image_main = yes; then
-  FOUND_SDL_image=yes
-fi
-
-   if test x$FOUND_SDL_image = xyes ; then
-     LIBS="$LIBS -lSDL_image"
-   else
+  FOUND_SDL_image=yes; LIBS="$LIBS -lSDL_image"
+fi
+
+   if test x$FOUND_SDL_image != xyes ; then
       echo "------------------"
       echo "SDL_image library not found."
@@ -8578,10 +8560,8 @@
 echo "${ECHO_T}$ac_cv_lib_ogg_main" >&6
 if test $ac_cv_lib_ogg_main = yes; then
-  FOUND_ogg=yes
-fi
-
-     if test x$FOUND_ogg = xyes ; then
-       LIBS="$LIBS -logg"
-     else
+  FOUND_ogg=yes; LIBS="$LIBS -logg"
+fi
+
+     if test x$FOUND_ogg != xyes ; then
         echo "------------------"
         echo "ogg library not found."
@@ -8654,10 +8634,8 @@
 echo "${ECHO_T}$ac_cv_lib_vorbis_main" >&6
 if test $ac_cv_lib_vorbis_main = yes; then
-  FOUND_vorbis=yes
-fi
-
-     if test x$FOUND_vorbis = xyes ; then
-       LIBS="$LIBS -lvorbis"
-     else
+  FOUND_vorbis=yes; LIBS="$LIBS -lvorbis"
+fi
+
+     if test x$FOUND_vorbis != xyes ; then
         echo "------------------"
         echo "vorbis library not found."
@@ -8885,10 +8863,8 @@
 echo "${ECHO_T}$ac_cv_lib_vorbisfile_main" >&6
 if test $ac_cv_lib_vorbisfile_main = yes; then
-  FOUND_vorbisfile=yes
-fi
-
-     if test x$FOUND_vorbisfile = xyes ; then
-       LIBS="$LIBS -lvorbisfile"
-     else
+  FOUND_vorbisfile=yes; LIBS="$LIBS -lvorbisfile"
+fi
+
+     if test x$FOUND_vorbisfile != xyes ; then
         echo "------------------"
         echo "vorbisfile library not found."
@@ -8898,42 +8874,4 @@
      fi
 
-#-----#
-# 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)
-        echo "$as_me:$LINENO: checking for gtk2.0" >&5
-echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
-        if `$PKG_CONFIG --exists gtk+-2.0`; then
-                echo "yes"
-                have_gtk2=yes
-                GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
-                GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_GTK2 1
-_ACEOF
-
-                if test $DEBUG -ge 3; then
-                 echo "cflags: $GTK2_CFLAGS"
-                 echo "libs: $GTK2_LIBS"
-                fi
-        else
-                echo "no"
-        fi
-
-fi
-
-
-
-
-if test x$have_gtk2 = xyes; then
-  HAVE_GTK2_TRUE=
-  HAVE_GTK2_FALSE='#'
-else
-  HAVE_GTK2_TRUE='#'
-  HAVE_GTK2_FALSE=
-fi
-
 
 #---------#
@@ -8941,5 +8879,4 @@
 #---------#
 if test x$def_curl = xyes; then
-
 
 for ac_header in curl/curl.h
@@ -9087,7 +9024,7 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- curlHeader="yes"
-else
-  curlHeader="no"
+ curlHeader=yes
+else
+  curlHeader=no
 fi
 
@@ -9246,12 +9183,52 @@
 echo "${ECHO_T}$ac_cv_lib_efence_main" >&6
 if test $ac_cv_lib_efence_main = yes; then
-  FOUND_efence=yes
-fi
-
-   if test x$FOUND_efence = xyes ; then
-      LIBS="$LIBS -lefence"
+  FOUND_efence=yes; LIBS="$LIBS -lefence"
+fi
+
+   if test x$FOUND_efence != xyes ; then
+     echo "efence was requested, but is not installed!! going on"
    fi
 
 fi
+
+#-----#
+# 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)
+        echo "$as_me:$LINENO: checking for gtk2.0" >&5
+echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
+        if `$PKG_CONFIG --exists gtk+-2.0`; then
+                echo "yes"
+                have_gtk2=yes
+                GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
+                GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GTK2 1
+_ACEOF
+
+                if test $DEBUG -ge 3; then
+                 echo "cflags: $GTK2_CFLAGS"
+                 echo "libs: $GTK2_LIBS"
+                fi
+        else
+                echo "no"
+        fi
+
+fi
+
+
+
+
+if test x$have_gtk2 = xyes; then
+  HAVE_GTK2_TRUE=
+  HAVE_GTK2_FALSE='#'
+else
+  HAVE_GTK2_TRUE='#'
+  HAVE_GTK2_FALSE=
+fi
+
+
 
 # FIXME: Replace `main' with a function in `-lm':
@@ -10280,15 +10257,15 @@
    { (exit 1); exit 1; }; }
 fi
+if test -z "${HAVE_CURL_TRUE}" && test -z "${HAVE_CURL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_CURL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_CURL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${HAVE_GTK2_TRUE}" && test -z "${HAVE_GTK2_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTK2\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
 echo "$as_me: error: conditional \"HAVE_GTK2\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${HAVE_CURL_TRUE}" && test -z "${HAVE_CURL_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_CURL\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_CURL\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
@@ -10913,12 +10890,12 @@
 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
 s,@MSBITFIELDS@,$MSBITFIELDS,;t t
+s,@CURL_LIBS@,$CURL_LIBS,;t t
+s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t
+s,@HAVE_CURL_TRUE@,$HAVE_CURL_TRUE,;t t
+s,@HAVE_CURL_FALSE@,$HAVE_CURL_FALSE,;t t
 s,@GTK2_LIBS@,$GTK2_LIBS,;t t
 s,@GTK2_CFLAGS@,$GTK2_CFLAGS,;t t
 s,@HAVE_GTK2_TRUE@,$HAVE_GTK2_TRUE,;t t
 s,@HAVE_GTK2_FALSE@,$HAVE_GTK2_FALSE,;t t
-s,@CURL_LIBS@,$CURL_LIBS,;t t
-s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t
-s,@HAVE_CURL_TRUE@,$HAVE_CURL_TRUE,;t t
-s,@HAVE_CURL_FALSE@,$HAVE_CURL_FALSE,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 5275)
+++ /trunk/configure.ac	(revision 5276)
@@ -257,6 +257,7 @@
     MWINDOWS="-mwindows"
 
-
-
+#--------#
+# MIN-GW #
+#--------#
 # checking for mingw32
     AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
@@ -264,4 +265,65 @@
         LIBS="$LIBS -lmingw32"
     fi
+
+#---------------#
+# open-GL (win) #
+#---------------#
+# checking gl header
+   AC_CHECK_HEADERS(GL/gl.h ,,
+      [AC_MSG_ERROR([cannot find opengl headers])])
+#   checking for Windows openGl library
+    AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"])
+    if test x$FOUND_GL != xyes ; then
+         echo "------------------"
+         echo "opengl not found."
+         echo "please install the opengl package which can be found at http://www.opengl.org"
+         echo "------------------"
+         exit -1
+    fi
+
+# cheking for GLU-header
+    AC_CHECK_HEADERS([GL/glu.h] ,,
+      [AC_MSG_ERROR([cannot find opengl headers]) ])
+
+# checking for libGLU
+    AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"])
+    if test x$FOUND_GLU != xyes ; then
+         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
+
+# checking glew header
+   AC_CHECK_HEADERS(GL/glew.h ,,
+      [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
+#   checking for Windows glew library
+    AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"])
+    if test x$FOUND_GLEW != xyes ; then
+         echo "------------------"
+         echo "opengl extension wrangler not found."
+         echo "please install the glew package which can be found at http://glew.sourceforge.net"
+         echo "------------------"
+         exit -1
+    fi
+
+#--------#
+# openAL #
+#--------#
+# checking for openAL-headers
+  AC_CHECK_HEADERS([AL/al.h] ,,
+      [AC_MSG_ERROR([cannot find openAL header.])])
+# checking for openAL-lib
+  AC_CHECK_LIB([OpenAL32], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lOpenAL32"])
+  AC_CHECK_LIB([ALut], [main], [FOUND_ALUT=yes; LIBS="$LIBS -lALut"])
+     if test x$FOUND_OPENAL != xyes ; then
+        echo "------------------"
+        echo "openal library not found."
+        echo "please install the openal library, which can be found at http://www.openal.org"
+        echo "------------------"
+        exit -1
+     fi
+
 
 #-----------#
@@ -273,8 +335,6 @@
 
 #checking for libSDL
-    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
-    if test x$FOUND_sdlmain = xyes ; then
-       LIBS="$LIBS -lsdlmain"
-    else
+    AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"])
+    if test x$FOUND_sdlmain != xyes ; then
         echo "------------------"
         echo "SDL library not found."
@@ -283,8 +343,6 @@
         exit 1
     fi
-    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
-    if test x$FOUND_sdl = xyes ; then
-       LIBS="$LIBS -lsdl"
-    else
+    AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"])
+    if test x$FOUND_SDL != xyes ; then
         echo "------------------"
         echo "SDL library not found."
@@ -294,74 +352,5 @@
     fi
 
-#---------------#
-# open-GL (win) #
-#---------------#
-# checking gl header
-   AC_CHECK_HEADERS(GL/gl.h ,,
-      [AC_MSG_ERROR([cannot find opengl headers]) ])
-#   checking for Windows openGl library
-    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
-    if test x$FOUND_opengl32 = xyes ; 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
-
-# cheking for GLU-header
-    AC_CHECK_HEADERS([GL/glu.h] ,,
-      [AC_MSG_ERROR([cannot find opengl headers]) ])
-
-# checking for libGLU
-    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
-    if test x$FOUND_glu32 = xyes ; 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
-
-# checking glew header
-   AC_CHECK_HEADERS(GL/glew.h ,,
-      [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
-#   checking for Windows glew library
-    AC_CHECK_LIB([glew32], [main], [FOUND_glew32=yes])
-    if test x$FOUND_glew32 = xyes ; then
-        LIBS="$LIBS -lglew32"
-    else
-         echo "------------------"
-         echo "opengl extension wrangler not found."
-         echo "please install the glew package which can be found at http://glew.sourceforge.net"
-         echo "------------------"
-         exit -1
-    fi
-
-#--------#
-# openAL #
-#--------#
-# checking for openAL-headers
-  AC_CHECK_HEADERS([AL/al.h] ,,
-      [AC_MSG_ERROR([cannot find openAL header.])])
-# checking for openAL-lib
-  AC_CHECK_LIB([OpenAL32], [main], [FOUND_openal=yes])
-  AC_CHECK_LIB([ALut], [main], [FOUND_ALut=yes])
-     if test x$FOUND_openal = xyes ; then
-      if test x$FOUND_ALut = xyes ; then
-       LIBS="$LIBS -lALut -lOpenAL32"
-     else
-        echo "------------------"
-        echo "openal library not found."
-        echo "please install the openal library, which can be found at http://www.openal.org"
-        echo "------------------"
-        exit -1
-      fi
-     fi
-    ;;
+  ;;
 
 #########
@@ -387,8 +376,6 @@
 
 #  checking for Unix GL
-   AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
-   if test x$FOUND_GL = xyes ; then
-     LIBS="$LIBS -lGL"
-   else
+   AC_CHECK_LIB([GL], [main], [FOUND_GL=yes; LIBS="$LIBS -lGL"])
+   if test x$FOUND_GL != xyes ; then
          echo "------------------"
          echo "opengl not found."
@@ -401,7 +388,8 @@
     AC_CHECK_HEADERS([GL/glu.h] ,,
       [AC_MSG_ERROR([cannot find opengl headers]) ])
-
-#    AC_CHECK_LIB([GLU], [main], FOUND_GLU=yes)
-#    if test x$FOUND_GLU = xyes ; then
+### FIXME ### THIS CHECK SHOULD WORK EVERYWHERE !!
+#    AC_CHECK_LIB([GLU], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU"])
+#    if test x$FOUND_GLU != xyes ; then
+      FOUND_GLU=yes
       LIBS="$LIBS -lGLU"
 #    else
@@ -417,8 +405,6 @@
       [AC_MSG_ERROR([cannot find glew headers]) ])
 # checking for GLEW-lib
-  AC_CHECK_LIB([GLEW], [main], FOUND_GLEW=yes)
-   if test x$FOUND_GLEW = xyes ; then
-     LIBS="$LIBS -lGLEW"
-   else
+  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
+   if test x$FOUND_GLEW != xyes ; then
          echo "------------------"
          echo "glew not found."
@@ -435,8 +421,6 @@
       [AC_MSG_ERROR([cannot find openAL header.])])
 # checking for openAL-lib
-  AC_CHECK_LIB([openal], [main], [FOUND_openal=yes])
-     if test x$FOUND_openal = xyes ; then
-       LIBS="$LIBS -lopenal"
-     else
+  AC_CHECK_LIB([openal], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lopenal"])
+     if test x$FOUND_OPENAL != xyes ; then
         echo "------------------"
         echo "openal library not found."
@@ -448,9 +432,9 @@
   AC_CHECK_HEADERS([AL/alut.h] ,,
       [AC_MSG_ERROR([cannot find openAL Utility Toolkit (alut) header.])])
-  AC_CHECK_LIB([alut], [main], [FOUND_alut=yes])
-     if test x$FOUND_alut = xyes ; then
-       LIBS="-lalut $LIBS"
-     fi
-
+  AC_CHECK_LIB([alut], [main], [FOUND_ALUT=yes; LIBS="-lalut $LIBS"])
+
+#-----#
+# SDL #
+#-----#
 # checking for SDL
   AC_MSG_CHECKING([for SDL-version])
@@ -463,7 +447,5 @@
    LIBS="`sdl-config --libs` $LIBS"
    AC_CHECK_LIB([SDL], [main], [FOUND_SDL=yes])
-    if test x$FOUND_SDL = xyes ; then
-     echo `sdl-config --libs`
-    else
+    if test x$FOUND_SDL != xyes ; then
         echo "------------------"
         echo "SDL library not found."
@@ -534,8 +516,6 @@
       [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])]))
 # checking for SDL_ttf-lib
-  AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes])
-     if test x$FOUND_SDL_ttf = xyes ; then
-       LIBS="$LIBS -lSDL_ttf"
-     else
+  AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes; LIBS="$LIBS -lSDL_ttf"])
+     if test x$FOUND_SDL_ttf != xyes ; then
         echo "------------------"
         echo "SDL_ttf library not found."
@@ -552,8 +532,6 @@
     [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))])
 # 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
+AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes; LIBS="$LIBS -lSDL_image"])
+   if test x$FOUND_SDL_image != xyes ; then
       echo "------------------"
       echo "SDL_image library not found."
@@ -570,8 +548,6 @@
       [AC_MSG_ERROR([cannot find ogg header.])])
 # checking for ogg-lib
-  AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes])
-     if test x$FOUND_ogg = xyes ; then
-       LIBS="$LIBS -logg"
-     else
+  AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes; LIBS="$LIBS -logg"])
+     if test x$FOUND_ogg != xyes ; then
         echo "------------------"
         echo "ogg library not found."
@@ -585,8 +561,6 @@
 #--------#
 # checking for vorbis-lib
-  AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes])
-     if test x$FOUND_vorbis = xyes ; then
-       LIBS="$LIBS -lvorbis"
-     else
+  AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes; LIBS="$LIBS -lvorbis"])
+     if test x$FOUND_vorbis != xyes ; then
         echo "------------------"
         echo "vorbis library not found."
@@ -603,8 +577,6 @@
       [AC_MSG_ERROR([cannot find vorbisfile header.])])
 # checking for vorbisfile-lib
-  AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes])
-     if test x$FOUND_vorbisfile = xyes ; then
-       LIBS="$LIBS -lvorbisfile"
-     else
+  AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes; LIBS="$LIBS -lvorbisfile"])
+     if test x$FOUND_vorbisfile != xyes ; then
         echo "------------------"
         echo "vorbisfile library not found."
@@ -613,4 +585,36 @@
         exit -1
      fi
+
+
+#---------#
+# libcURL #
+#---------#
+if test x$def_curl = xyes; then
+ AC_CHECK_HEADERS([curl/curl.h], [curlHeader=yes], [curlHeader=no])
+ AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
+ if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
+  have_curl=yes
+  CURL_LIBS=`curl-config --libs`
+  CURLCFLAGS=`curl-config --cflags`
+  AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL])
+ else
+  have_curl=no
+ fi
+
+fi
+AC_SUBST(CURL_LIBS)
+AC_SUBST(CURL_CFLAGS)
+AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
+
+#--------#
+# efence #
+#--------#
+if test x$def_efence = xyes ; then
+  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"])
+   if test x$FOUND_efence != xyes ; then
+     echo "efence was requested, but is not installed!! going on"
+   fi
+
+fi
 
 #-----#
@@ -618,5 +622,5 @@
 #-----#
 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)
+#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
         AC_MSG_CHECKING([for gtk2.0])
         if `$PKG_CONFIG --exists gtk+-2.0`; then
@@ -639,35 +643,4 @@
 AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
 
-#---------#
-# libcURL #
-#---------#
-if test x$def_curl = xyes; then
-
- AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"])
- AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
- if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
-  have_curl=yes
-  CURL_LIBS=`curl-config --libs`
-  CURLCFLAGS=`curl-config --cflags`
-  AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL])
- else
-  have_curl=no
- fi
-
-fi
-AC_SUBST(CURL_LIBS)
-AC_SUBST(CURL_CFLAGS)
-AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
-
-#--------#
-# 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':
