Index: /code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake
===================================================================
--- /code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake	(revision 2638)
+++ /code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake	(revision 2639)
@@ -24,4 +24,8 @@
  #
 
+######################## Options ########################
+
+OPTION(ACTIVATE_VISUAL_LEAK_DETECTOR "Memory leak detector" FALSE)
+
 #################### Compiler Flags #####################
 
@@ -42,5 +46,13 @@
 ADD_COMPILER_FLAGS("-D_CRT_SECURE_NO_WARNINGS" CACHE)
 ADD_COMPILER_FLAGS("-DUNICODE -D_UNICODE"      CACHE)
-ADD_COMPILER_FLAGS("-w44522 -w44251 -w44800"   CACHE)
+
+# Overwrite CMake default flags here.
+SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
+SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
+SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"           RelWithDebInfo CACHE)
+SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
+
+
+####################### Warnings ########################
 
 # Increase warning level if requested
@@ -53,9 +65,49 @@
 ENDIF()
 
-# Overwrite CMake default flags here.
-SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
-SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
-SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"           RelWithDebInfo CACHE)
-SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
+# "<type> needs to have dll-interface to be used by clients'
+# Happens on STL member variables which are not public
+ADD_COMPILER_FLAGS("-w44251" CACHE)
+
+# Multiple assignment operators specified
+ADD_COMPILER_FLAGS("-w44522" CACHE)
+
+# Forcing values to bool
+ADD_COMPILER_FLAGS("-w44800" CACHE)
+
+# This warns about truncation to 255 characters in debug/browse info
+# ADD_COMPILER_FLAGS("-w44786 -w44503" CACHE)
+
+# conversion from 'double' to 'float', possible loss of data
+# conversion from 'ogg_int64_t' to 'long', possible loss of data
+# ADD_COMPILER_FLAGS("-w44244" CACHE)
+
+# "conversion from 'size_t' to 'unsigned int', possible loss of data
+# ADD_COMPILER_FLAGS("-w44267" CACHE)
+
+# "truncation from 'double' to 'float'
+# ADD_COMPILER_FLAGS("-w44305" CACHE)
+
+# "non dll-interface class used as base for dll-interface class"
+# ADD_COMPILER_FLAGS("-w44275" CACHE)
+
+# "C++ Exception Specification ignored"
+# This is because MSVC 6 did not implement all the C++ exception
+# specifications in the ANSI C++ draft.
+# ADD_COMPILER_FLAGS("-w44290" CACHE)
+
+# "no suitable definition provided for explicit template
+# instantiation request" Occurs in VC7 for no justifiable reason.
+# ADD_COMPILER_FLAGS("-w44661" CACHE)
+
+# Deprecation warnings when using CRT calls in VC8
+# These show up on all C runtime lib code in VC8, disable since they clutter
+# the warnings with things we may not be able to do anything about (e.g.
+# generated code from nvparse etc). I doubt very much that these calls
+# will ever be actually removed from VC anyway, it would break too much code.
+# Note: Probably handled by "-DCRT_SECURE_NO_WARNINGS"
+# ADD_COMPILER_FLAGS("-w44996" CACHE)
+
+# "conditional expression constant"
+# ADD_COMPILER_FLAGS("-w4201" CACHE)
 
 
Index: /code/branches/buildsystem2/src/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem2/src/CMakeLists.txt	(revision 2638)
+++ /code/branches/buildsystem2/src/CMakeLists.txt	(revision 2639)
@@ -35,4 +35,40 @@
 ################ OrxonoxConfig.h ################
 
+# Check endianness
+INCLUDE(TestBigEndian)
+TEST_BIG_ENDIAN(ORXONOX_BIG_ENDIAN)
+IF(NOT ORXONOX_BIG_ENDIAN)
+  SET(ORXONOX_LITTLE_ENDIAN TRUE)
+ENDIF()
+
+# 32/64 bit system check
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  SET(ORXONOX_ARCH_64 TRUE)
+ELSE()
+  SET(ORXONOX_ARCH_32 TRUE)
+ENDIF()
+
+# Platforms
+SET(ORXONOX_PLATFORM_WINDOWS ${WIN32})
+SET(ORXONOX_PLATFORM_APPLE ${APPLE})
+SET(ORXONOX_PLATFORM_UNIX ${UNIX})
+IF(UNIX AND NOT APPLE)
+  SET(ORXONOX_PLATFORM_LINUX TRUE)
+ENDIF()
+
+# Check __forceinline
+INCLUDE(CheckCXXSourceCompiles)
+SET(_source "int main() { return 0; } __forceinline void test() { return; }")
+CHECK_CXX_SOURCE_COMPILES("${_source}" HAVE_FORCEINLINE)
+
+# Check ciso646 include (operators in words)
+INCLUDE(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX(cstdint HAVE_CSTDINT)
+CHECK_INCLUDE_FILE_CXX(cstddef HAVE_CSTDDEF)
+CHECK_INCLUDE_FILE_CXX(ciso646 HAVE_CISO646)
+
+SET(GENERATED_FILE_COMMENT
+   "DO NOT EDIT THIS FILE!
+    It has been automatically generated by CMake from OrxonoxConfig.h.in")
 # Copy and configure OrxonoxConfig which gets included in every file
 CONFIGURE_FILE(OrxonoxConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/OrxonoxConfig.h)
Index: /code/branches/buildsystem2/src/OrxonoxConfig.h.in
===================================================================
--- /code/branches/buildsystem2/src/OrxonoxConfig.h.in	(revision 2638)
+++ /code/branches/buildsystem2/src/OrxonoxConfig.h.in	(revision 2639)
@@ -21,10 +21,10 @@
  *
  *   Author:
+ *      Reto Grieder
+ *   Co-authors:
  *      ...
- *   Co-authors:
- *      Reto Grieder
  *
  *   Original code: OgrePlatform.h, licensed under the LGPL. The code
- *   has changed quite a bit however.
+ *   has changed almost completely though.
  *
  */
@@ -34,84 +34,65 @@
  @brief
     Various constants for compiler, architecture and platform.
+
+    @GENERATED_FILE_COMMENT@
  */
 
-#ifndef _OrxonoxPlatform_H__
-#define _OrxonoxPlatform_H__
+#ifndef _OrxonoxConfig_H__
+#define _OrxonoxConfig_H__
 
-/* Initial platform/compiler-related stuff to set. */
+/*---------------------------------
+ * Platform and compiler related options
+ *-------------------------------*/
+#cmakedefine ORXONOX_PLATFORM_WINDOWS
+#cmakedefine ORXONOX_PLATFORM_LINUX
+#cmakedefine ORXONOX_PLATFORM_APPLE
+#cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
 
-#define ORXONOX_PLATFORM_WIN32 1
-#define ORXONOX_PLATFORM_LINUX 2
-#define ORXONOX_PLATFORM_APPLE 3
-
-#define ORXONOX_COMPILER_MSVC 1
-#define ORXONOX_COMPILER_GNUC 2
-#define ORXONOX_COMPILER_BORL 3
-
-#define ORXONOX_ENDIAN_LITTLE 1
-#define ORXONOX_ENDIAN_BIG 2
-
-#define ORXONOX_ARCHITECTURE_32 1
-#define ORXONOX_ARCHITECTURE_64 2
-
-
-/* Finds the compiler type and version. */
-
+/* Determine compiler and set ORXONOX_COMP_VER */
 #if defined( _MSC_VER )
-#  define ORXONOX_COMPILER ORXONOX_COMPILER_MSVC
+#  define ORXONOX_COMPILER_MSVC
 #  define ORXONOX_COMP_VER _MSC_VER
 
 #elif defined( __GNUC__ )
-#  define ORXONOX_COMPILER ORXONOX_COMPILER_GNUC
+#  define ORXONOX_COMPILER_GCC
 #  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
         (__GNUC_MINOR__*10) + \
         __GNUC_PATCHLEVEL__)
+#  if defined(__MINGW32__)
+#    define ORXONOX_COMPILER_MINGW
+#  endif
 
 #elif defined( __BORLANDC__ )
-#  define ORXONOX_COMPILER ORXONOX_COMPILER_BORL
+#  define ORXONOX_COMPILER_BORLAND
 #  define ORXONOX_COMP_VER __BCPLUSPLUS__
 
 #else
-#  pragma error "No known compiler. Abort! Abort!"
+#  pragma error "No known compiler. Abort!"
 
 #endif
 
+/* Endianness */
+#cmakedefine ORXONOX_BIG_ENDIAN
+#cmakedefine ORXONOX_LITTLE_ENDIAN
+
+/* Architecture */
+#cmakedefine ORXONOX_ARCH_32
+#cmakedefine ORXONOX_ARCH_64
 
 /* See if we can use __forceinline or if we need to use __inline instead */
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-#  if ORXONOX_COMP_VER >= 1200
-#    define FORCEINLINE __forceinline
-#  endif
-#elif defined(__MINGW32__)
-#  if !defined(FORCEINLINE)
-#    define FORCEINLINE __inline
-#  endif
+#cmakedefine HAVE_FORCEINLINE
+#ifdef HAVE_FORCEINLINE
+#  define FORCEINLINE __forceinline
 #else
 #  define FORCEINLINE __inline
 #endif
 
-/* Finds the current platform */
-#if defined( __WIN32__ ) || defined( _WIN32 )
-#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_WIN32
-#elif defined( __APPLE_CC__)
-#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_APPLE
-#else
-#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_LINUX
-#endif
-
-/* Find the arch type */
-#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
-#  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_64
-#else
-#  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_32
-#endif
-
 /* Try to define function information */
 #ifndef __FUNCTIONNAME__
-#  if ORXONOX_COMPILER == ORXONOX_COMPILER_BORL
+#  ifdef ORXONOX_COMPILER_BORLAND
 #    define __FUNCTIONNAME__ __FUNC__
-#  elif ORXONOX_COMPILER == ORXONOX_COMPILER_GNUC
+#  elif defined(ORXONOX_COMPILER_GCC)
 #    define __FUNCTIONNAME__ __PRETTY_FUNCTION__
-#  elif ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#  elif defined(ORXONOX_COMPILER_MSVC)
 #    define __FUNCTIONNAME__ __FUNCTION__
 #  else
@@ -120,33 +101,12 @@
 #endif
 
-/* Determine whether we're building in debug mode */
-#if defined(_DEBUG) || defined(DEBUG)
-#  define ORXONOX_DEBUG_MODE 1
-#else
-#  define ORXONOX_DEBUG_MODE 0
-#endif
 
-/* Define configurable floating point type */
-namespace orxonox
-{
-#ifdef ORXONOX_DOUBLE_PRECISION
-    typedef double Real;
-#else
-    typedef float  Real;
-#endif
-}
-
-/* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
-#cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
-
-//-----------------------------------------------------------------------
-// Version Information
-//-----------------------------------------------------------------------
-
-#define ORXONOX_VERSION_MAJOR 0
-#define ORXONOX_VERSION_MINOR 1
-#define ORXONOX_VERSION_PATCH 2
-#define ORXONOX_VERSION_SUFFIX ""
-#define ORXONOX_VERSION_NAME "Bellatrix"
+/*---------------------------------
+ * Version information
+ *-------------------------------*/
+#define ORXONOX_VERSION_MAJOR @ORXONOX_VERSION_MAJOR@
+#define ORXONOX_VERSION_MINOR @ORXONOX_VERSION_MINOR@
+#define ORXONOX_VERSION_PATCH @ORXONOX_VERSION_PATCH@
+#define ORXONOX_VERSION_NAME "@ORXONOX_VERSION_NAME@"
 
 #define ORXONOX_VERSION ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
@@ -154,34 +114,11 @@
 
 /*---------------------------------
- * Windows Settings
+ * Unix settings
  *-------------------------------*/
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
-/* Disable unicode support on MingW at the moment, poorly supported in stdlibc++
- * STLPORT fixes this though so allow if found
- * MinGW C++ Toolkit supports unicode and sets the define __MINGW32_TOOLKIT_UNICODE__ in _mingw.h */
-#  if defined( __MINGW32__ ) && !defined(_STLPORT_VERSION)
-#    include<_mingw.h>
-#    if defined(__MINGW32_TOOLBOX_UNICODE__)
-#      define ORXONOX_UNICODE_SUPPORT 1
-#    else
-#      define ORXONOX_UNICODE_SUPPORT 0
-#    endif
-#  else
-#    define ORXONOX_UNICODE_SUPPORT 1
-#  endif
-#endif /* Platform Win32 */
-
-
-/*---------------------------------
- * Linux/Apple Settings
- *-------------------------------*/
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX || ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
-
-/* A quick define to overcome different names for the same function */
-#  define stricmp strcasecmp
+#ifdef ORXONOX_PLATFORM_UNIX
 
 /* TODO: Check what this actually is and whether we need it or not */
 #if 0
-#  if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+#  ifdef ORXONOX_PLATFORM_APPLE
 #    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
 #  else
@@ -191,9 +128,5 @@
 #endif
 
-/* Always enable unicode support for the moment
- * Perhaps disable in old versions of gcc if necessary */
-#  define ORXONOX_UNICODE_SUPPORT 1
-
-#endif /* Patform Linux/Apple */
+#endif /* Patform Unix */
 
 
@@ -201,77 +134,43 @@
  * Apple Settings
  *-------------------------------*/
-/* For apple, we always have a custom config.h file */
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
-#  include "config.h"
-#endif
 
 
 /*---------------------------------
- * Visual Studio Settings
+ * Includes
  *-------------------------------*/
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-/* Turn off warnings generated by long std templates
- * This warns about truncation to 255 characters in debug/browse info */
-/*#   pragma warning (disable : 4786)*/
+/* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
+#cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
 
-/* Turn off warnings generated by long std templates
- * This warns about truncation to 255 characters in debug/browse info */
-/*#   pragma warning (disable : 4503)*/
+/* Define the english written operators like and, or, xor
+ * This is C++ standard, but the Microsoft compiler doesn't define them. */
+#cmakedefine HAVE_CISO646
+#ifdef HAVE_CISO646
+#  include <ciso646>
+#endif
 
-/* disable: conversion from 'double' to 'float', possible loss of data
- * disable: conversion from 'ogg_int64_t' to 'long', possible loss of data
- * This has been dealt with in base_properties of the solution since the
- * warning primarily occurs in library header files (which are mostly
- * included before OrxonoxPlatform.h is) */
-/*#   pragma warning (disable : 4244)*/
+#cmakedefine HAVE_CSTDINT
+#ifdef HAVE_CSTDINT
+#  include <cstdint>
+#elif defined(ORXONOX_COMPILER_MSVC)
+typedef __int8            int8_t;
+typedef __int16           int16_t;
+typedef __int32           int32_t;
+typedef __int64           int64_t;
+typedef unsigned __int8   uint8_t;
+typedef unsigned __int16  uint16_t;
+typedef unsigned __int32  uint32_t;
+typedef unsigned __int64  uint64_t;
+#endif
 
-/* disable: "conversion from 'size_t' to 'unsigned int', possible loss of data */
-/*#   pragma warning (disable : 4267)*/
+#cmakedefine HAVE_CSTDDEF
+#ifdef HAVE_CSTDDEF
+#  include <cstddef>
+#endif
 
-/* disable: "truncation from 'double' to 'float' */
-/*#   pragma warning (disable : 4305)*/
+/* Visual Leak Detector looks for memory leaks */
+#cmakedefine ACTIVATE_VISUAL_LEAK_DETECTOR
+#ifdef ACTIVATE_VISUAL_LEAK_DETECTOR
+#  include <vld.h>
+#endif
 
-/* set to level 4: "<type> needs to have dll-interface to be used by clients'
- * Happens on STL member variables which are not public therefore is ok */
-#   pragma warning (disable : 4251)
-
-/* disable: 'MultiTypeString' : multiple assignment operators specified
- * Used in MultiType and works fine so far */
-/*#   pragma warning (disable : 4522)*/
-
-/* disable: "non dll-interface class used as base for dll-interface class"
- * Happens when deriving from Singleton because bug in compiler ignores
- * template export */
-/*#   pragma warning (disable : 4275)*/
-
-/* disable: "C++ Exception Specification ignored"
- * This is because MSVC 6 did not implement all the C++ exception
- * specifications in the ANSI C++ draft. */
-/*#   pragma warning( disable : 4290 )*/
-
-/* disable: "no suitable definition provided for explicit template
- * instantiation request" Occurs in VC7 for no justifiable reason on all
- * #includes of Singleton */
-/*#   pragma warning( disable: 4661)*/
-
-/* disable: deprecation warnings when using CRT calls in VC8
- * These show up on all C runtime lib code in VC8, disable since they clutter
- * the warnings with things we may not be able to do anything about (e.g.
- * generated code from nvparse etc). I doubt very much that these calls
- * will ever be actually removed from VC anyway, it would break too much code. */
-/*# pragma warning( disable: 4996)*/
-
-/* disable: "conditional expression constant", always occurs on
- * ORXONOX_MUTEX_CONDITIONAL when no threading enabled */
-/*#   pragma warning (disable : 201)*/
-
-
-/* Define the english written operators like and, or, xor */
-#include <iso646.h>
-
-/* include visual leak detector to search for memory leaks */
-/* #include <vld.h> */
-
-#endif /* ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC */
-
-#endif /* _OrxonoxPlatform_H__ */
+#endif /* _OrxonoxConfig_H__ */
Index: /code/branches/buildsystem2/src/audio/AudioPrereqs.h
===================================================================
--- /code/branches/buildsystem2/src/audio/AudioPrereqs.h	(revision 2638)
+++ /code/branches/buildsystem2/src/audio/AudioPrereqs.h	(revision 2639)
@@ -40,5 +40,5 @@
 // Shared library settings
 //-----------------------------------------------------------------------
-#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( AUDIO_STATIC_BUILD )
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( AUDIO_STATIC_BUILD )
 #  ifdef AUDIO_SHARED_BUILD
 #    define _AudioExport __declspec(dllexport)
@@ -68,14 +68,3 @@
 }
 
-//-----------------------------------------------------------------------
-// Warnings
-//-----------------------------------------------------------------------
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-
-// set to 4: conversion from 'ogg_int64_t' to 'long', possible loss of data
-#pragma warning (4 : 4244)
-
-#endif
-
-
 #endif /* _AudioPrereqs_H__ */
Index: /code/branches/buildsystem2/src/core/ArgumentCompletionFunctions.cc
===================================================================
--- /code/branches/buildsystem2/src/core/ArgumentCompletionFunctions.cc	(revision 2638)
+++ /code/branches/buildsystem2/src/core/ArgumentCompletionFunctions.cc	(revision 2639)
@@ -63,5 +63,5 @@
                     startdirectory = ".";
                 }
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
                 else
                 {
Index: /code/branches/buildsystem2/src/core/CorePrereqs.h
===================================================================
--- /code/branches/buildsystem2/src/core/CorePrereqs.h	(revision 2638)
+++ /code/branches/buildsystem2/src/core/CorePrereqs.h	(revision 2639)
@@ -42,5 +42,5 @@
 // Shared library settings
 //-----------------------------------------------------------------------
-#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( CORE_STATIC_BUILD )
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( CORE_STATIC_BUILD )
 #  ifdef CORE_SHARED_BUILD
 #    define _CoreExport __declspec(dllexport)
Index: /code/branches/buildsystem2/src/core/Functor.h
===================================================================
--- /code/branches/buildsystem2/src/core/Functor.h	(revision 2638)
+++ /code/branches/buildsystem2/src/core/Functor.h	(revision 2639)
@@ -436,5 +436,5 @@
 
 // disable annoying warning about forcing value to boolean
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#ifdef ORXONOX_COMPILER_MSVC
 #pragma warning(push)
 #pragma warning(disable:4100 4800)
@@ -475,5 +475,5 @@
 }
 
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#ifdef ORXONOX_COMPILER_MSVC
 #pragma warning(pop)
 #endif
Index: /code/branches/buildsystem2/src/network/NetworkPrereqs.h
===================================================================
--- /code/branches/buildsystem2/src/network/NetworkPrereqs.h	(revision 2638)
+++ /code/branches/buildsystem2/src/network/NetworkPrereqs.h	(revision 2639)
@@ -40,5 +40,5 @@
 // Shared library settings
 //-----------------------------------------------------------------------
-#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( NETWORK_STATIC_BUILD )
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( NETWORK_STATIC_BUILD )
 #  ifdef NETWORK_SHARED_BUILD
 #    define _NetworkExport __declspec(dllexport)
Index: /code/branches/buildsystem2/src/network/Synchronisable.h
===================================================================
--- /code/branches/buildsystem2/src/network/Synchronisable.h	(revision 2638)
+++ /code/branches/buildsystem2/src/network/Synchronisable.h	(revision 2639)
@@ -35,9 +35,7 @@
 #include <map>
 #include <queue>
-#include "util/Integers.h"
 #include "core/OrxonoxClass.h"
 #include "core/XMLIncludes.h"
 #include "NetworkCallback.h"
-#include "util/Integers.h"
 
 #define REGISTERDATA(varname, ...) \
Index: /code/branches/buildsystem2/src/network/packet/Packet.h
===================================================================
--- /code/branches/buildsystem2/src/network/packet/Packet.h	(revision 2638)
+++ /code/branches/buildsystem2/src/network/packet/Packet.h	(revision 2639)
@@ -34,6 +34,4 @@
 #include <enet/enet.h>
 #include <boost/thread/recursive_mutex.hpp>
-
-#include "util/Integers.h"
 
 namespace orxonox {
Index: /code/branches/buildsystem2/src/orxonox/Main.cc
===================================================================
--- /code/branches/buildsystem2/src/orxonox/Main.cc	(revision 2638)
+++ /code/branches/buildsystem2/src/orxonox/Main.cc	(revision 2639)
@@ -53,5 +53,5 @@
 #include "gamestates/GSIOConsole.h"
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+#ifdef ORXONOX_PLATFORM_APPLE
 #include <CoreFoundation/CoreFoundation.h>
 
Index: /code/branches/buildsystem2/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- /code/branches/buildsystem2/src/orxonox/OrxonoxPrereqs.h	(revision 2638)
+++ /code/branches/buildsystem2/src/orxonox/OrxonoxPrereqs.h	(revision 2639)
@@ -41,5 +41,5 @@
 //-----------------------------------------------------------------------
 #define ORXONOX_NO_EXPORTS // This is an executable that needs no exports
-#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
 #  ifdef ORXONOX_SHARED_BUILD
 #    define _OrxonoxExport __declspec(dllexport)
Index: /code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- /code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc	(revision 2638)
+++ /code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc	(revision 2639)
@@ -217,5 +217,5 @@
         delete this->ogreRoot_;
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
         // delete the ogre log and the logManager (since we have created it).
         this->ogreLogger_->getDefaultLog()->removeListener(this);
@@ -307,5 +307,5 @@
 
         // TODO: LogManager doesn't work on oli platform. The why is yet unknown.
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
         // create a new logManager
         ogreLogger_ = new Ogre::LogManager();
@@ -355,5 +355,5 @@
 
 #if 0 // Ogre 1.4.3 doesn't yet support setDebugOutputEnabled(.)
-#if ORXONOX_PLATFORM != ORXONOX_PLATFORM_WIN32
+#ifndef ORXONOX_PLATFORM_WINDOWS
         // tame the ogre ouput so we don't get all the mess in the console
         Ogre::Log* defaultLog = Ogre::LogManager::getSingleton().getDefaultLog();
Index: /code/branches/buildsystem2/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- /code/branches/buildsystem2/src/orxonox/gamestates/GSRoot.cc	(revision 2638)
+++ /code/branches/buildsystem2/src/orxonox/gamestates/GSRoot.cc	(revision 2639)
@@ -44,5 +44,5 @@
 #include "Settings.h"
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 
+#ifdef ORXONOX_PLATFORM_WINDOWS 
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
@@ -165,5 +165,5 @@
     void GSRoot::setThreadAffinity(unsigned int limitToCPU)
     {
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
         // Get the current process core mask
 	    DWORD procMask;
Index: /code/branches/buildsystem2/src/orxonox/pch/havepch/OrxonoxStableHeaders.h
===================================================================
--- /code/branches/buildsystem2/src/orxonox/pch/havepch/OrxonoxStableHeaders.h	(revision 2638)
+++ /code/branches/buildsystem2/src/orxonox/pch/havepch/OrxonoxStableHeaders.h	(revision 2639)
@@ -57,5 +57,5 @@
 
 //Get around Windows hackery (windows.h is included by Ogre.h)
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 
+#ifdef ORXONOX_PLATFORM_WINDOWS 
 #  ifdef max
 #    undef max
@@ -100,5 +100,5 @@
 //#endif /* ifdef NDEBUG */
 
-#endif /* ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) */
+#endif /* defined(ORXONOX_ENABLE_PCH) */
 
 #endif /* _OrxonoxStableHeaders_H__ */
Index: /code/branches/buildsystem2/src/util/CMakeLists.txt
===================================================================
--- /code/branches/buildsystem2/src/util/CMakeLists.txt	(revision 2638)
+++ /code/branches/buildsystem2/src/util/CMakeLists.txt	(revision 2639)
@@ -25,5 +25,4 @@
   Exception.h
   ExprParser.h
-  Integers.h
   Math.h
   MathConvert.h
@@ -54,7 +53,13 @@
 #SET(UTIL_FILES ${UTIL_SRC_FILES} ${UTIL_HDR_FILES})
 GENERATE_SOURCE_GROUPS(${UTIL_FILES})
-# Also add OrxonoxConfig.h to have it least somewhere in the IDE
-LIST(APPEND UTIL_FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
-SOURCE_GROUP("" FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
+# Also add OrxonoxConfig to have it least somewhere in the IDE
+LIST(APPEND UTIL_FILES
+  ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
+  ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
+)
+SOURCE_GROUP("" FILES
+  ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
+  ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
+)
 
 IF(NOT GCC_SYSTEM_HEADER_SUPPORT)
Index: /code/branches/buildsystem2/src/util/CRC32.h
===================================================================
--- /code/branches/buildsystem2/src/util/CRC32.h	(revision 2638)
+++ /code/branches/buildsystem2/src/util/CRC32.h	(revision 2639)
@@ -32,5 +32,4 @@
 #include "UtilPrereqs.h"
 #include <iostream>
-#include "Integers.h"
 
 namespace orxonox
Index: /code/branches/buildsystem2/src/util/Clipboard.cc
===================================================================
--- /code/branches/buildsystem2/src/util/Clipboard.cc	(revision 2638)
+++ /code/branches/buildsystem2/src/util/Clipboard.cc	(revision 2639)
@@ -36,5 +36,5 @@
 #include "Clipboard.h"
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
 
 /////////////
@@ -104,5 +104,5 @@
 }
 
-#else /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 */
+#else /* ORXONOX_PLATFORM_WINDOWS */
 
 /////////////
@@ -135,3 +135,3 @@
 }
 
-#endif /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 */
+#endif /* ORXONOX_PLATFORM_WINDOWS */
Index: /code/branches/buildsystem2/src/util/Convert.h
===================================================================
--- /code/branches/buildsystem2/src/util/Convert.h	(revision 2638)
+++ /code/branches/buildsystem2/src/util/Convert.h	(revision 2639)
@@ -50,5 +50,5 @@
 // This is however exactly what convertValue does, so we need to suppress these warnings.
 // They only occur when using the ImplicitConversion template.
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_GNUC
+#ifdef ORXONOX_COMPILER_GCC
 #  pragma GCC system_header
 #endif
@@ -63,5 +63,5 @@
 
 // disable warnings about possible loss of data
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#ifdef ORXONOX_COMPILER_MSVC
 #  pragma warning(push)
 #  pragma warning(disable:4244)
@@ -88,5 +88,5 @@
 }
 
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#ifdef ORXONOX_COMPILER_MSVC
 #  pragma warning(pop)
 #endif
Index: de/branches/buildsystem2/src/util/Integers.h
===================================================================
--- /code/branches/buildsystem2/src/util/Integers.h	(revision 2638)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
- @file
- @brief
-    Defines fixed with integers
- */
-
-#ifndef _Integers_H__
-#define _Integers_H__
-
-#include "UtilPrereqs.h"
-
-/* Define fixed with integers
- * Note: This is not in a namespace to make it available everywhere!*/
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-typedef __int8            int8_t;
-typedef __int16           int16_t;
-typedef __int32           int32_t;
-typedef __int64           int64_t;
-typedef unsigned __int8   uint8_t;
-typedef unsigned __int16  uint16_t;
-typedef unsigned __int32  uint32_t;
-typedef unsigned __int64  uint64_t;
-#elif ORXONOX_COMPILER == ORXONOX_COMPILER_GCC
-# include "inttypes.h"
-#endif
-
-#endif /* _Integers_H__ */
Index: /code/branches/buildsystem2/src/util/Math.h
===================================================================
--- /code/branches/buildsystem2/src/util/Math.h	(revision 2638)
+++ /code/branches/buildsystem2/src/util/Math.h	(revision 2639)
@@ -52,5 +52,5 @@
 
 //Get around Windows hackery
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
 #  ifdef max
 #    undef max
Index: /code/branches/buildsystem2/src/util/SignalHandler.cc
===================================================================
--- /code/branches/buildsystem2/src/util/SignalHandler.cc	(revision 2638)
+++ /code/branches/buildsystem2/src/util/SignalHandler.cc	(revision 2639)
@@ -45,5 +45,5 @@
 }
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX
+#ifdef ORXONOX_PLATFORM_LINUX
 
 #include <wait.h>
@@ -358,3 +358,3 @@
 }
 
-#endif /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX */
+#endif /* ORXONOX_PLATFORM_LINUX */
Index: /code/branches/buildsystem2/src/util/SignalHandler.h
===================================================================
--- /code/branches/buildsystem2/src/util/SignalHandler.h	(revision 2638)
+++ /code/branches/buildsystem2/src/util/SignalHandler.h	(revision 2639)
@@ -45,5 +45,5 @@
 }
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX
+#ifdef ORXONOX_PLATFORM_LINUX
 #include <signal.h>
 
@@ -97,5 +97,5 @@
 }
 
-#else /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX */
+#else /* ORXONOX_PLATFORM_LINUX */
 
 namespace orxonox
@@ -114,5 +114,5 @@
 }
 
-#endif /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX */
+#endif /* ORXONOX_PLATFORM_LINUX */
 
 #endif /* _SignalHandler_H__ */
Index: /code/branches/buildsystem2/src/util/Sleep.h
===================================================================
--- /code/branches/buildsystem2/src/util/Sleep.h	(revision 2638)
+++ /code/branches/buildsystem2/src/util/Sleep.h	(revision 2639)
@@ -38,5 +38,5 @@
 #include "UtilPrereqs.h"
 
-#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+#ifdef ORXONOX_PLATFORM_WINDOWS
 #include <winbase.h>
 
Index: /code/branches/buildsystem2/src/util/UtilPrereqs.h
===================================================================
--- /code/branches/buildsystem2/src/util/UtilPrereqs.h	(revision 2638)
+++ /code/branches/buildsystem2/src/util/UtilPrereqs.h	(revision 2639)
@@ -40,5 +40,5 @@
 // Shared library settings
 //-----------------------------------------------------------------------
-#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( UTIL_STATIC_BUILD )
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( UTIL_STATIC_BUILD )
 #  ifdef UTIL_SHARED_BUILD
 #    define _UtilExport __declspec(dllexport)
