Index: orxonox/trunk/gui/orxonox_gui.cc
===================================================================
--- orxonox/trunk/gui/orxonox_gui.cc	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui.cc	(revision 3165)
@@ -34,7 +34,4 @@
 
 */
-
-#include <gtk/gtkmain.h>
-
 #include "orxonox_gui.h"
 #include "orxonox_gui_video.h"
@@ -66,10 +63,12 @@
 OrxonoxGui::OrxonoxGui (int argc, char *argv[])
 {
-  
+#ifdef HAVE_GTK2
   initGTK(argc, argv);
-
+#endif
   orxonoxGUI = new Window( "Grafical OrxOnoX loader, "PACKAGE_VERSION);
+#ifdef HAVE_GTK2
   orxonoxGUI->connectSignal ("destroy", orxonoxGUI->orxonox_gui_quit);
   orxonoxGUI->connectSignal ("delete_event", orxonoxGUI->orxonox_gui_quit);
+#endif /* HAVE_GTK2 */
   
   Box* windowBox = new Box ('h');
@@ -111,5 +110,7 @@
 
   
+#ifdef HAVE_GTK2
   mainloopGTK();
+#endif
 }
 
Index: orxonox/trunk/gui/orxonox_gui_banner.cc
===================================================================
--- orxonox/trunk/gui/orxonox_gui_banner.cc	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_banner.cc	(revision 3165)
@@ -38,8 +38,11 @@
   // Banner Window //
   logoWindow = new Window("Logo");
-    bannerEventBox->connectSignal ("button_press_event", logoWindow, Window::windowOpen);
+
+#ifdef HAVE_GTK2
+  bannerEventBox->connectSignal ("button_press_event", logoWindow, Window::windowOpen);
 
   logoWindow->connectSignal("destroy", logoWindow, Window::windowClose);
   logoWindow->connectSignal("delete_event", logoWindow, Window::windowClose);
+#endif /* HAVE_GTK2 */
   logoEventBox = new EventBox();
   logoBox = new Box('v');
@@ -50,6 +53,8 @@
   logoBox->fill(logoLabel);
   logoBox->fill(logoEventBox);
+#ifdef HAVE_GTK2
   logoEventBox->connectSignal("button_press_event",logoWindow, Window::windowClose);
-  
+#endif /* HAVE_GTK2 */
+
   logoWindow->fill (logoBox);
   
Index: orxonox/trunk/gui/orxonox_gui_exec.cc
===================================================================
--- orxonox/trunk/gui/orxonox_gui_exec.cc	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_exec.cc	(revision 3165)
@@ -41,5 +41,7 @@
   
   start = new Button ("Start");
+#ifdef HAVE_GTK2
   start->connectSignal ("clicked", startOrxonox);
+#endif /* HAVE_GTK2 */
   execBox->fill (start);
   saveSettings = new CheckButton ("Save Settings");
@@ -56,5 +58,7 @@
   execBox->fill (alwaysShow);
   quit = new Button ("Quit");
+#ifdef HAVE_GTK2
   quit->connectSignal ("clicked", orxonoxGUI->orxonox_gui_quit);
+#endif /* HAVE_GTK2 */
   execBox->fill (quit);
 
@@ -278,4 +282,5 @@
 }
 
+#ifdef HAVE_GTK2
 /**
    \brief Starts ORXONOX. (not really implemented yet, but the function is there.\n
@@ -288,2 +293,3 @@
   cout << "Starting Orxonox" <<endl;
 }
+#endif /* HAVE_GTK2 */
Index: orxonox/trunk/gui/orxonox_gui_exec.h
===================================================================
--- orxonox/trunk/gui/orxonox_gui_exec.h	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_exec.h	(revision 3165)
@@ -39,5 +39,6 @@
 
 };
+#ifdef HAVE_GTK2
   gint startOrxonox (GtkWidget *widget, Widget* data);
-
+#endif /* HAVE_GTK2 */
 #endif /* _ORXONOX_GUI_EXEC_H */
Index: orxonox/trunk/gui/orxonox_gui_gtk.cc
===================================================================
--- orxonox/trunk/gui/orxonox_gui_gtk.cc	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_gtk.cc	(revision 3165)
@@ -39,4 +39,5 @@
 extern OrxonoxGuiExec* exec;
 
+#ifdef HAVE_GTK2
 bool initGTK(int argc, char *argv[])
 {
@@ -48,4 +49,6 @@
   gtk_main();
 }
+#endif /* HAVE_GTK2 */
+
 /* WIDGET */
 
@@ -87,5 +90,7 @@
 void Widget::show()
 {
+#ifdef HAVE_GTK2
   gtk_widget_show (this->widget);
+#endif /* HAVE_GTK2 */
 }
 
@@ -95,5 +100,7 @@
 void Widget::hide()
 {
+#ifdef HAVE_GTK2
   gtk_widget_hide (this->widget);
+#endif /* HAVE_GTK2 */
 }
 
@@ -105,7 +112,10 @@
 void Widget::setSize(int width, int height)
 {
+#ifdef HAVE_GTK2
   gtk_widget_set_usize (this->widget, width, height);
-}
-
+#endif /* HAVE_GTK2 */
+}
+
+#ifdef HAVE_GTK2
 /** 
     \brief Connect any signal to any given Sub-widget
@@ -144,4 +154,5 @@
   g_signal_handler_disconnect (G_OBJECT (this->widget), signalID);
 }
+#endif /* HAVE_GTK2 */
 
 /**
@@ -181,7 +192,9 @@
 }
 
+#ifdef HAVE_GTK2
 gint Widget::doNothingSignal (GtkWidget *widget, GdkEvent* event, void* nothing)
 {
 }
+#endif /* HAVE_GTK2 */
 
 //void deleteWidget(Widget* lastWidget)
@@ -249,5 +262,7 @@
   if (this->down == NULL)
     {
+#ifdef HAVE_GTK2
       gtk_container_add (GTK_CONTAINER (this->widget), lowerWidget->widget);
+#endif /* HAVE_GTK2 */
       this->down = lowerWidget;
     }
@@ -310,4 +325,5 @@
   static_cast<Container*>(this)->init();
 
+#ifdef HAVE_GTK2
   widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_window_set_policy (GTK_WINDOW(widget), TRUE, TRUE, TRUE);
@@ -316,5 +332,5 @@
 #endif 
   gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
-
+#endif /* HAVE_GTK2 */
 }
 
@@ -327,11 +343,15 @@
     {
       printf ("showall\n");
+#ifdef HAVE_GTK2
       gtk_widget_show_all  (widget);
-      isOpen = true;
+#endif /* HAVE_GTK2 */ 
+     isOpen = true;
     }
   else
     {
       printf ("showone\n");
+#ifdef HAVE_GTK2
       gtk_widget_show (widget);
+#endif /* HAVE_GTK2 */
     }
 }
@@ -347,5 +367,7 @@
   label = new char[strlen(title)+1];
   strcpy(label, title);
+#ifdef HAVE_GTK2
   gtk_window_set_title (GTK_WINDOW (widget), title);
+#endif /* HAVE_GTK2 */
 }
 
@@ -358,6 +380,8 @@
     {
       isOpen = true;
+#ifdef HAVE_GTK2
       gtk_widget_show_all(widget);
       gtk_grab_add(widget);
+#endif /* HAVE_GTK2 */
     }
 }
@@ -371,9 +395,12 @@
     {
       isOpen = false;
+#ifdef HAVE_GTK2
       gtk_grab_remove(widget);
       gtk_widget_hide (widget);
+#endif /* HAVE_GTK2 */
     }
 }
 
+#ifdef HAVE_GTK2
 /**
    \brief opens up a window (not topmost Window).
@@ -415,4 +442,5 @@
   return FALSE;
 }
+#endif /* HAVE_GTK2 */
 
 
@@ -442,7 +470,9 @@
 {
   static_cast<Container*>(this)->init();
-  
+
+#ifdef HAVE_GTK2
   widget = gtk_frame_new ("");
   gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
+#endif /* HAVE_GTK2 */
 }
 
@@ -457,5 +487,7 @@
   label = new char[strlen(title)+1];
   strcpy(label, title);
+#ifdef HAVE_GTK2
   gtk_frame_set_label (GTK_FRAME (widget), title);
+#endif /* HAVE_GTK2 */
 }
 
@@ -488,7 +520,8 @@
   static_cast<Container*>(this)->init();
 
+#ifdef HAVE_GTK2
   widget = gtk_event_box_new ();
   gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
- 
+#endif /* HAVE_GTK2 */
 }
 
@@ -533,4 +566,5 @@
 
   static_cast<Packer*>(this)->init();
+#ifdef HAVE_GTK2
   if (boxtype == 'v')
     {
@@ -541,4 +575,6 @@
       widget = gtk_hbox_new (FALSE, 0);
     }
+#endif /* HAVE_GTK2 */
+
 }
 
@@ -550,5 +586,7 @@
 void Box::fill (Widget *lowerWidget)
 {
+#ifdef HAVE_GTK2
   gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0);
+#endif /* HAVE_GTK2 */
   if (this->down == NULL)
     this->down = lowerWidget;
@@ -579,5 +617,7 @@
 
   this->init();
+#ifdef HAVE_GTK2
   widget = gtk_image_new_from_file (imagename);
+#endif /* HAVE_GTK2 */
 }
 
@@ -671,5 +711,7 @@
   static_cast<Option*>(this)->init();
 
+#ifdef HAVE_GTK2
   widget = gtk_button_new_with_label ("");
+#endif /* HAVE_GTK2 */
 }
 
@@ -684,5 +726,7 @@
   label = new char[strlen(title)+1];
   strcpy(label, title);
+#ifdef HAVE_GTK2
   gtk_button_set_label (GTK_BUTTON(widget), title);
+#endif /* HAVE_GTK2 */
 }
 
@@ -706,5 +750,7 @@
   this->setTitle(buttonname);
 
+#ifdef HAVE_GTK2
   this->connectSignal ("clicked", this->OptionChange);
+#endif /* HAVE_GTK2 */
 }
 
@@ -718,5 +764,7 @@
   static_cast<Option*>(this)->init();
 
+#ifdef HAVE_GTK2
   widget = gtk_check_button_new_with_label ("");
+#endif /* HAVE_GTK2 */
 }
 
@@ -731,12 +779,17 @@
   label = new char[strlen(title)+1];
   strcpy(label, title);
+#ifdef HAVE_GTK2
   gtk_button_set_label(GTK_BUTTON(widget), title);
+#endif /* HAVE_GTK2 */
 }
 
 bool CheckButton::isActive()
 {
+#ifdef HAVE_GTK2
   return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
-}
-
+#endif /* HAVE_GTK2 */
+}
+
+#ifdef HAVE_GTK2
 /** 
     \brief Signal OptionChange writes the Value from the CheckButton to its Object-Database.
@@ -750,4 +803,5 @@
   cout << static_cast<CheckButton*>(checkbutton)->label << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl;
 }
+#endif /* HAVE_GTK2 */
 
 /**
@@ -757,5 +811,7 @@
 void CheckButton::redraw ()
 {
+#ifdef HAVE_GTK2
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
+#endif /* HAVE_GTK2 */
 }
 
@@ -773,5 +829,7 @@
   this->setValue(start);
   this->setTitle(slidername);
+#ifdef HAVE_GTK2
   this->connectSignal ("value_changed", this->OptionChange);
+#endif /* HAVE_GTK2 */
 }
 
@@ -786,5 +844,7 @@
   static_cast<Option*>(this)->init();
 
-  widget = gtk_hscale_new_with_range (start, end, 5);
+#ifdef HAVE_GTK2
+ widget = gtk_hscale_new_with_range (start, end, 5);
+#endif /* HAVE_GTK2 */
 }
 
@@ -810,4 +870,5 @@
 }
 
+#ifdef HAVE_GTK2
 /** 
     \brief Signal OptionChange writes the Value from the Slider to its Object-Database.
@@ -821,4 +882,5 @@
   cout << static_cast<Slider*>(slider)->label << " set to: "<< static_cast<Slider*>(slider)->value << endl;
 }
+#endif /* HAVE_GTK2 */
 
 /**
@@ -828,5 +890,7 @@
 void Slider::redraw ()
 {
+#ifdef HAVE_GTK2
   gtk_range_set_value (GTK_RANGE (widget), value);
+#endif /* HAVE_GTK2 */
 }
 
@@ -845,5 +909,6 @@
     
   char *itemName;
-  
+
+#ifdef HAVE_GTK2             /////////////////////// REINPLEMENT
   va_start (itemlist, menuname);
   while (strcmp (itemName = va_arg (itemlist, char*), "lastItem"))
@@ -852,7 +917,10 @@
     }
   va_end(itemlist);
-
+#endif /* HAVE_GTK2 */
+
+#ifdef HAVE_GTK2
   gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu);
   this->connectSignal ("changed", this->OptionChange);
+#endif /* HAVE_GTK2 */
 }
 
@@ -866,6 +934,8 @@
   static_cast<Option*>(this)->init();
 
+#ifdef HAVE_GTK2
   widget = gtk_option_menu_new ();
   menu = gtk_menu_new ();
+#endif /* HAVE_GTK2 */
 
 }
@@ -889,8 +959,11 @@
 void Menu::addItem (char* itemName)
 {
+#ifdef HAVE_GTK2
   item = gtk_menu_item_new_with_label (itemName);
   gtk_menu_shell_append(GTK_MENU_SHELL (menu), item);
-}
-
+#endif /* HAVE_GTK2 */
+}
+
+#ifdef HAVE_GTK2
 /** 
     \brief Signal OptionChange writes the Value from the Menu to its Object-Database.
@@ -904,4 +977,5 @@
   cout << static_cast<Menu*>(menu)->label << " changed to : " << static_cast<Menu*>(menu)->value << endl;
 }
+#endif /* HAVE_GTK2 */
 
 /**
@@ -911,5 +985,7 @@
 void Menu::redraw ()
 {
-  gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value);
+#ifdef HAVE_GTK2
+ gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value);
+#endif /* HAVE_GTK2 */
 }
 
@@ -927,6 +1003,9 @@
   cValue = NULL;
 
+#ifdef HAVE_GTK2
   widget = gtk_label_new ("");
-}
+#endif /* HAVE_GTK2 */
+}
+
 void OptionLabel::setValue(char* newValue)
 {
@@ -935,5 +1014,7 @@
   cValue = new char [strlen(newValue)+1];
   strcpy(cValue, newValue);
+#ifdef HAVE_GTK2
   gtk_label_set_text (GTK_LABEL (widget), cValue);
+#endif /* HAVE_GTK2 */
 }
 
@@ -944,5 +1025,7 @@
   label = new char [strlen(title)+1];
   strcpy(label, title);
+#ifdef HAVE_GTK2
   gtk_label_set_text (GTK_LABEL (widget), title);
+#endif /* HAVE_GTK2 */
 }
 
@@ -980,6 +1063,8 @@
   static_cast<Widget*>(this)->init();
 
+#ifdef HAVE_GTK2
   widget = gtk_label_new ("");
   gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
+#endif /* HAVE_GTK2 */
 }
 
@@ -994,5 +1079,7 @@
   label = new char[strlen(text)+1];
   strcpy(label, text);
+#ifdef HAVE_GTK2
   gtk_label_set_text (GTK_LABEL (this->widget), text);
+#endif /* HAVE_GTK2 */
 }
 
@@ -1003,4 +1090,4 @@
 char* Label::getText ()
 {
-  return ((char*)gtk_label_get_text (GTK_LABEL (this->widget)));
-}
+  return label;
+}
Index: orxonox/trunk/gui/orxonox_gui_gtk.h
===================================================================
--- orxonox/trunk/gui/orxonox_gui_gtk.h	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_gtk.h	(revision 3165)
@@ -11,4 +11,5 @@
 #endif
 
+#ifdef HAVE_GTK2
 #include <gtk/gtkmain.h>
 #include <gtk/gtkwindow.h>
@@ -25,7 +26,11 @@
 #include <gtk/gtkimage.h>
 #include <gtk/gtkeventbox.h>
-
+#endif /* HAVE_GTK2 */
+
+#ifdef HAVE_GTK2
 bool initGTK(int argc, char *argv[]);
 bool mainloopGTK(void);
+#endif /* HAVE_GTK2 */
+
 
 //! This is the topmost object that can be displayed all others are derived from it.
@@ -37,5 +42,7 @@
 
   Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next
+#ifdef HAVE_GTK2
   GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains.
+#endif /* HAVE_GTK2 */
   void init(void);
   int isOption; //!< with this Paramenter one can set the option-type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option, 3: float option, 4:char option, 5: char* option
@@ -45,4 +52,5 @@
   enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 
   char* label; //!< The name of the Widget. Some do display it, Options need it to save;
+#ifdef HAVE_GTK2
   gulong connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
   gulong connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
@@ -50,4 +58,5 @@
   gulong connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void *));
   void disconnectSignal (gulong signalID);
+#endif /* HAVE_GTK2 */
   void show ();
   void hide ();
@@ -58,5 +67,7 @@
   static void setOptions (Widget* widget);
   
+#ifdef HAVE_GTK2
   static gint doNothingSignal (GtkWidget *widget, GdkEvent* event, void* nothing);
+#endif /* HAVE_GTK2 */
 };
 
@@ -114,7 +125,9 @@
   void close();
 
+#ifdef HAVE_GTK2
   static gint windowOpen (GtkWidget *widget, GdkEvent* event, void* window);
   static gint windowClose (GtkWidget *widget, GdkEvent* event, void* window);
   static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
+#endif /* HAVE_GTK2 */
 };
 
@@ -220,5 +233,7 @@
  public:
   CheckButton (char* buttonname);
+#ifdef HAVE_GTK2
   static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
+#endif /* HAVE_GTK2 */
   
   void init(void);
@@ -242,5 +257,7 @@
   void setValue(int value);
 
+#ifdef HAVE_GTK2
   static gint OptionChange (GtkWidget* widget, Widget* slider);
+#endif /* HAVE_GTK2 */
   void redraw();
 };
@@ -250,6 +267,8 @@
 {
  private:
+#ifdef HAVE_GTK2
   GtkWidget* menu;
   GtkWidget* item;
+#endif /* HAVE_GTK2 */
   va_list itemlist;
   
@@ -261,5 +280,7 @@
 
   void addItem(char* itemName);
+#ifdef HAVE_GTK2
   static gint OptionChange (GtkWidget* widget, Widget* menu);
+#endif /* HAVE_GTK2 */
   void redraw();
 };
Index: orxonox/trunk/gui/orxonox_gui_keys.cc
===================================================================
--- orxonox/trunk/gui/orxonox_gui_keys.cc	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_keys.cc	(revision 3165)
@@ -68,5 +68,7 @@
     
     closeButton = new Button("close");
+#ifdef HAVE_GTK2
     closeButton->connectSignal("button_press_event", pKeyWindow, Window::windowClose);
+#endif /* HAVE_GTK2 */
 
     pKeysBox->fill(closeButton);
@@ -74,9 +76,13 @@
    pKeyWindow->fill(pKeyFrame);
    Window::addWindow(pKeyWindow);
+#ifdef HAVE_GTK2
    pKeyWindow->connectSignal("destroy", pKeyWindow, Window::windowClose);
    pKeyWindow->connectSignal("delete_event", pKeyWindow, Window::windowClose);
+#endif /* HAVE_GTK2 */
 
   openButton = new Button (player);
+#ifdef HAVE_GTK2
   openButton->connectSignal("button_press_event", pKeyWindow, Window::windowOpen);
+#endif /* HAVE_GTK2 */
 
   inputWindow = new Window("inputWindow");
@@ -84,6 +90,8 @@
   inputButton = new Button ("test");
   inputWindow->fill (inputButton);
+#ifdef HAVE_GTK2
   inputWindow->connectSignal("destroy",  Widget::doNothingSignal);
   inputWindow->connectSignal("delete_event", Widget::doNothingSignal);
+#endif /* HAVE_GTK2 */
 
 }
@@ -96,7 +104,9 @@
   inputKey[key]->pKeyOLabel = new OptionLabel (name, name);
   inputKey[key]->pKeyOLabel->saveable = true;
-  
+
+#ifdef HAVE_GTK2
   //inputKey[key]->pKeyButton->connectSignal("key_press_event", inputKey[key]->pKeyButton, key_cb);
   inputKey[key]->pKeyButton->connectSignal("button_press_event", inputKey[key], inputWindowEvent);
+#endif /* HAVE_GTK2 */
 
   inputKey[key]->pKeyBox->fill(inputKey[key]->pKeyButton);
@@ -120,4 +130,5 @@
 long Player::keySignal = 0;
 
+#ifdef HAVE_GTK2
 gint Player::inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* inputKey)
 {
@@ -264,2 +275,3 @@
   inputWindow->close();
 }
+#endif /* HAVE_GTK2 */
Index: orxonox/trunk/gui/orxonox_gui_keys.h
===================================================================
--- orxonox/trunk/gui/orxonox_gui_keys.h	(revision 3164)
+++ orxonox/trunk/gui/orxonox_gui_keys.h	(revision 3165)
@@ -8,6 +8,7 @@
 
 #include "orxonox_gui.h"
+#ifdef HAVE_GTK2
 #include <gdk/gdkkeysyms.h>
-
+#endif /* HAVE_GTK2 */
 /**
  * defines the Possible Player Keys
@@ -62,6 +63,8 @@
   Button* getOpenButton();
 
+#ifdef HAVE_GTK2
   static gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);
   static gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);
+#endif /* HAVE_GTK2 */
   void setkey(KEYS key);
   
