Index: /orxonox/trunk/Makefile.am
===================================================================
--- /orxonox/trunk/Makefile.am	(revision 3099)
+++ /orxonox/trunk/Makefile.am	(revision 3100)
@@ -1,1 +1,7 @@
-SUBDIRS = src console gui importer
+if HAVE_GTK2
+  GTK_PROGS =gui console
+else
+  GTK_PROGS =
+endif
+
+SUBDIRS = src importer $(GTK_PROGS)
Index: /orxonox/trunk/Makefile.in
===================================================================
--- /orxonox/trunk/Makefile.in	(revision 3099)
+++ /orxonox/trunk/Makefile.in	(revision 3100)
@@ -60,5 +60,5 @@
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = src importer gui console
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -164,5 +164,7 @@
 target_os = @target_os@
 target_vendor = @target_vendor@
-SUBDIRS = src console gui importer
+@HAVE_GTK2_FALSE@GTK_PROGS = 
+@HAVE_GTK2_TRUE@GTK_PROGS = gui console
+SUBDIRS = src importer $(GTK_PROGS)
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -370,5 +372,5 @@
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
Index: /orxonox/trunk/configure
===================================================================
--- /orxonox/trunk/configure	(revision 3099)
+++ /orxonox/trunk/configure	(revision 3100)
@@ -865,4 +865,5 @@
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-gtk           Prevents GTK from being loaded
 
 Some influential environment variables:
@@ -3830,4 +3831,24 @@
 
 
+
+### CHECKING  OPTIONAT ARGUMENTS
+## GTK-disabled
+def_gtk=yes
+echo "$as_me:$LINENO: checking if gtk should be enabled" >&5
+echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6
+# Check whether --enable-gtk or --disable-gtk was given.
+if test "${enable_gtk+set}" = set; then
+  enableval="$enable_gtk"
+  def_gtk=no
+fi;
+if test "$def_gtk" = yes; then
+  echo "yes"
+fi
+if test "$def_gtk" = no; then
+  echo "no"
+fi
+
+
+
 ### CHECKING FOR SYSTEM ###
 
@@ -5801,20 +5822,24 @@
 
 ## checking for GTK
-#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
+if test "$def_gtk" = yes; 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`
-else
-  echo "no"
-fi
-
-
-
-
-if test "x$have_gtk2" = xyes; then
+	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`
+	else
+		echo "no"
+	fi
+
+fi
+
+
+
+
+if test x$have_gtk2 = xyes; then
   HAVE_GTK2_TRUE=
   HAVE_GTK2_FALSE='#'
@@ -5823,4 +5848,5 @@
   HAVE_GTK2_FALSE=
 fi
+
 
 
Index: /orxonox/trunk/configure.ac
===================================================================
--- /orxonox/trunk/configure.ac	(revision 3099)
+++ /orxonox/trunk/configure.ac	(revision 3100)
@@ -20,4 +20,21 @@
 AC_PROG_CXX
 AC_HEADER_STDC
+
+
+### CHECKING  OPTIONAT ARGUMENTS
+## GTK-disabled
+def_gtk=yes
+AC_MSG_CHECKING([if gtk should be enabled])
+AC_ARG_ENABLE([gtk], 
+	AC_HELP_STRING(	[--disable-gtk], 
+	[Prevents GTK from being loaded]), [def_gtk=no]) 
+if test "$def_gtk" = yes; then 
+  echo "yes"
+fi 
+if test "$def_gtk" = no; then 
+  echo "no"
+fi
+
+
 
 ### CHECKING FOR SYSTEM ###
@@ -207,17 +224,22 @@
 
 ## checking for GTK
-#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
-  echo "yes"
-  have_gtk2=yes
-  GTK2_LIBS=`pkg-config --libs gtk+-2.0`
-  GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
-else
-  echo "no"
+if test "$def_gtk" = yes; then 
+
+	#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
+  		echo "yes"
+  		have_gtk2=yes
+		GTK2_LIBS=`pkg-config --libs gtk+-2.0`
+		GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
+	else
+		echo "no"
+	fi
+	
 fi
 AC_SUBST(GTK2_LIBS)
 AC_SUBST(GTK2_CFLAGS)
-AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes)
+AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
+
 
 
