diff -r 16b63b32f82e code/nel/CMakeLists.txt
--- a/code/nel/CMakeLists.txt	Tue May 11 13:38:43 2010 +0200
+++ b/code/nel/CMakeLists.txt	Tue May 11 06:39:46 2010 -0700
@@ -72,6 +72,8 @@
 FIND_PACKAGE(LibXml2 REQUIRED)
 FIND_PACKAGE(PNG REQUIRED)
 FIND_PACKAGE(Jpeg)
+FIND_PACKAGE(Xf86VidMode)
+FIND_PACKAGE(GL)
 
 NL_SETUP_BUILD()
 
diff -r 16b63b32f82e code/nel/CMakeModules/FindGL.cmake
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/code/nel/CMakeModules/FindGL.cmake	Tue May 11 06:39:46 2010 -0700
@@ -0,0 +1,52 @@
+# - Locate GL library
+# This module defines
+#  OPENGL_LIBRARIES, the library to link against
+#  GL_FOUND, if false, do not try to link to GL
+#  OPENGL_INCLUDES, where to find headers.
+
+IF(OPENGL_LIBRARIES AND OPENGL_INCLUDES)
+  # in cache already
+  SET(GL_FIND_QUIETLY TRUE)
+ENDIF(OPENGL_LIBRARIES AND OPENGL_INCLUDES)
+
+
+FIND_PATH(OPENGL_INCLUDES
+  gl.h
+  PATHS
+  $ENV{GL_DIR}/include/
+  /usr/local/include/
+  /usr/include/
+  /usr/include/nvidia/
+  /sw/include/
+  /opt/local/include/
+  /opt/csw/include/
+  /opt/include/
+  PATH_SUFFIXES GL 
+)
+
+FIND_LIBRARY(OPENGL_LIBRARIES
+  GL 
+  PATHS
+  $ENV{GL_DIR}/lib
+  /usr/local/lib
+  /usr/lib
+  /usr/lib/nvidia/
+  /usr/local/X11R6/lib
+  /usr/X11R6/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  /usr/freeware/lib64
+)
+
+IF(OPENGL_LIBRARIES AND OPENGL_INCLUDES)
+  SET(GL_FOUND "YES")
+  IF(NOT GL_FIND_QUIETLY)
+    MESSAGE(STATUS "Found GL: ${OPENGL_LIBRARIES}")
+  ENDIF(NOT GL_FIND_QUIETLY)
+ELSE(OPENGL_LIBRARIES AND OPENGL_INCLUDES)
+  IF(NOT GL_FIND_QUIETLY)
+    MESSAGE(STATUS "Warning: Unable to find GL!")
+  ENDIF(NOT GL_FIND_QUIETLY)
+ENDIF(OPENGL_LIBRARIES AND OPENGL_INCLUDES)
diff -r 16b63b32f82e code/nel/CMakeModules/FindXf86VidMode.cmake
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/code/nel/CMakeModules/FindXf86VidMode.cmake	Tue May 11 06:39:46 2010 -0700
@@ -0,0 +1,45 @@
+# - Locate Jpeg library
+# This module defines
+#  XF86VidMode_LIBRARY, the library to link against
+#  XF86VidMode_FOUND, if false, do not try to link to XF86VidMode
+#  XF86VidMode_INCLUDE_DIR, where to find headers.
+
+IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
+  # in cache already
+  SET(XF86VidMode_FIND_QUIETLY TRUE)
+ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
+
+
+FIND_PATH(XF86VidMode_INCLUDE_DIR
+  xf86vm.h
+  PATHS
+  $ENV{XF86VidMode_DIR}/include
+  /usr/include/X11/
+  /usr/X11R6/include/
+  PATH_SUFFIXES extensions 
+)
+
+FIND_LIBRARY(XF86VidMode_LIBRARY
+  Xxf86vm 
+  PATHS
+  $ENV{XF86VidMode_DIR}/lib
+  /usr/X11R6/lib
+  /usr/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  /usr/freeware/lib64
+)
+
+IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
+  SET(XF86VidMode_FOUND "YES")
+  ADD_DEFINITIONS(-DXF86VIDMODE)
+  IF(NOT XF86VidMode_FIND_QUIETLY)
+    MESSAGE(STATUS "Found XF86VidMode: ${XF86VidMode_LIBRARY}")
+  ENDIF(NOT XF86VidMode_FIND_QUIETLY)
+ELSE(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
+  IF(NOT XF86VidMode_FIND_QUIETLY)
+    MESSAGE(STATUS "Warning: Unable to find XF86VidMode!")
+  ENDIF(NOT XF86VidMode_FIND_QUIETLY)
+ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
diff -r 16b63b32f82e code/nel/src/3d/driver/opengl/CMakeLists.txt
--- a/code/nel/src/3d/driver/opengl/CMakeLists.txt	Tue May 11 13:38:43 2010 +0200
+++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt	Tue May 11 06:39:46 2010 -0700
@@ -9,7 +9,7 @@
 ADD_LIBRARY(${NLDRV_OGL_LIB} SHARED ${SRC})
 
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
-TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES})
+TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES} ${XF86VidMode_LIBRARY})
 SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES 
   VERSION ${NL_VERSION}
   PROJECT_LABEL "Driver, Video: OpenGL")
@@ -31,4 +31,4 @@
 INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
 IF(WITH_MAXPLUGIN)
   INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
-ENDIF(WITH_MAXPLUGIN)
\ No newline at end of file
+ENDIF(WITH_MAXPLUGIN)
diff -r 16b63b32f82e code/ryzom/CMakeLists.txt
--- a/code/ryzom/CMakeLists.txt	Tue May 11 13:38:43 2010 +0200
+++ b/code/ryzom/CMakeLists.txt	Tue May 11 06:39:46 2010 -0700
@@ -80,7 +80,7 @@
 FIND_PACKAGE(Lua50 REQUIRED)
 FIND_PACKAGE(CURL REQUIRED)
 FIND_PACKAGE(Libwww)
-FIND_PACKAGE(X11)
+PKG_CHECK_MODULES(X11 x11)
 
 
 NL_SETUP_BUILD()
diff -r 16b63b32f82e code/ryzom/CMakeModules/FindLibwww.cmake
--- a/code/ryzom/CMakeModules/FindLibwww.cmake	Tue May 11 13:38:43 2010 +0200
+++ b/code/ryzom/CMakeModules/FindLibwww.cmake	Tue May 11 06:39:46 2010 -0700
@@ -38,6 +38,20 @@
   /usr/freeware/lib64
 )
 
+FIND_LIBRARY(LIBMD5_LIBRARY 
+  md5 
+  PATHS
+  /usr/local/lib
+  /usr/lib
+  /usr/local/X11R6/lib
+  /usr/X11R6/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  /usr/freeware/lib64
+)
+
 IF(LIBWWW_LIBRARY AND LIBWWW_INCLUDE_DIR)
   SET(LIBWWW_FOUND "YES")
   IF(NOT LIBWWW_FIND_QUIETLY)
@@ -49,3 +63,13 @@
   ENDIF(NOT LIBWWW_FIND_QUIETLY)
 ENDIF(LIBWWW_LIBRARY AND LIBWWW_INCLUDE_DIR)
 
+IF(LIBMD5_LIBRARY)
+  SET(LIBMD5_FOUND "YES")
+  IF(NOT LIBMD5_FIND_QUIETLY)
+    MESSAGE(STATUS "Found LibMD5: ${LIBMD5_LIBRARY}")
+  ENDIF(NOT LIBMD5_FIND_QUIETLY)
+ELSE(LIBMD5_LIBRARY)
+  IF(NOT LIBMD5_FIND_QUIETLY)
+    MESSAGE(STATUS "Warning: Unable to find LibMD5!")
+  ENDIF(NOT LIBMD5_FIND_QUIETLY)
+ENDIF(LIBMD5_LIBRARY)
diff -r 16b63b32f82e code/ryzom/CMakeModules/nel.cmake
--- a/code/ryzom/CMakeModules/nel.cmake	Tue May 11 13:38:43 2010 +0200
+++ b/code/ryzom/CMakeModules/nel.cmake	Tue May 11 06:39:46 2010 -0700
@@ -66,7 +66,7 @@
     SET(NL_RELEASE_CFLAGS "/Ox /Ob2 /Oi /Ot /Oy /GT /GF")
     SET(NL_RELEASEDEBUG_CFLAGS "/DNL_RELEASE_DEBUG /Ob2 /GF")
   ELSE(WIN32)
-    SET(PLATFORM_CFLAGS "-ftemplate-depth-24 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused")
+    SET(PLATFORM_CFLAGS "-ftemplate-depth-30 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused")
     IF(WITH_COVERAGE)
       SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
     ENDIF(WITH_COVERAGE)
diff -r 16b63b32f82e code/ryzom/client/src/CMakeLists.txt
--- a/code/ryzom/client/src/CMakeLists.txt	Tue May 11 13:38:43 2010 +0200
+++ b/code/ryzom/client/src/CMakeLists.txt	Tue May 11 06:39:46 2010 -0700
@@ -53,7 +53,8 @@
 				${NELSNDDRV_LIBRARY}
 				client_sheets 
 				${NELPACS_LIBRARY} 
-				${LIBWWW_LIBRARY} 
+				${LIBWWW_LIBRARY}
+				${LIBMD5_LIBRARY} 
 				${Boost_LIBRARIES} 
 				${X11_LIBRARIES}
 				seven_zip
diff -r 16b63b32f82e code/ryzom/tools/assoc_mem/CMakeLists.txt
--- a/code/ryzom/tools/assoc_mem/CMakeLists.txt	Tue May 11 13:38:43 2010 +0200
+++ b/code/ryzom/tools/assoc_mem/CMakeLists.txt	Tue May 11 06:39:46 2010 -0700
@@ -1,5 +1,9 @@
 FILE(GLOB SRC *.cpp *.h)
 
+LIST(REMOVE_ITEM SRC 
+        ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ record.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 2\ of\ record.cpp)
+
 ADD_EXECUTABLE(assoc_mem ${SRC})
 
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS})
diff -r 16b63b32f82e code/ryzom/tools/stats_scan/CMakeLists.txt
--- a/code/ryzom/tools/stats_scan/CMakeLists.txt	Tue May 11 13:38:43 2010 +0200
+++ b/code/ryzom/tools/stats_scan/CMakeLists.txt	Tue May 11 06:39:46 2010 -0700
@@ -1,5 +1,8 @@
 FILE(GLOB SRC *.cpp *.h)
 
+LIST(REMOVE_ITEM SRC
+        ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ char_commands.cpp)
+
 ADD_EXECUTABLE(stats_scan ${SRC})
 
 INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIRS} ${NELNET_INCLUDE_DIRS})
