Index: orxonox/trunk/Makefile.am
===================================================================
--- orxonox/trunk/Makefile.am	(revision 3218)
+++ orxonox/trunk/Makefile.am	(revision 3219)
@@ -14,8 +14,6 @@
 	     doc/doxyconf/project 
 
-##
-## Doxygen stuff
-##
-
+## doxygen stuff
+if DOXYGEN
 DOXYGEN_INPUT = "src src/gui src/importer"
 
@@ -29,2 +27,3 @@
 
 include doc/documentation.am
+endif
Index: orxonox/trunk/Makefile.in
===================================================================
--- orxonox/trunk/Makefile.in	(revision 3218)
+++ orxonox/trunk/Makefile.in	(revision 3219)
@@ -92,4 +92,7 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -178,10 +181,10 @@
 	     doc/doxyconf/project 
 
-DOXYGEN_INPUT = "src src/gui src/importer"
-DOXYGEN_EXCLUDE = 
-DOXYGEN_EXAMPLE_PATH = 
-DOXYGEN_SEARCHENGINE = YES
-DX_CONFIG_FILE = "$(top_srcdir)/orxodox"
-DX_CONF_DIR = "$(top_srcdir)/doc/doxyconf"
+@DOXYGEN_TRUE@DOXYGEN_INPUT = "src src/gui src/importer"
+@DOXYGEN_TRUE@DOXYGEN_EXCLUDE = 
+@DOXYGEN_TRUE@DOXYGEN_EXAMPLE_PATH = 
+@DOXYGEN_TRUE@DOXYGEN_SEARCHENGINE = YES
+@DOXYGEN_TRUE@DX_CONFIG_FILE = "$(top_srcdir)/orxodox"
+@DOXYGEN_TRUE@DX_CONF_DIR = "$(top_srcdir)/doc/doxyconf"
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -597,55 +600,55 @@
 
 
-doc:
-	if test ! -e $(DX_CONFIG_FILE); then \
-	 make doc-config; \
-	fi
-	@echo "Generating doxygen Documentation"; \
-	doxygen $(DX_CONFIG_FILE)
-
-doc-config:
-	@echo "Generationg doxygen configuration File." ; \
-	if test -e  "$(top_srcdir)/orxodox"; then \
-	  echo "deleting existing Configuration File" ; \
-	  rm $(top_srcdir)/orxodox ; \
-	fi ; \
-	touch $(DX_CONFIG_FILE) ; \
-	$(DX_CONF_DIR)/project						>> $(DX_CONFIG_FILE); \
-	echo "PROJECT_NAME		= \"$(PACKAGE_NAME)\"" 		>> $(DX_CONFIG_FILE); \
-	echo "PROJECT_NUMBER	   	= \"$(PACKAGE_VERSION)\"" 	>> $(DX_CONFIG_FILE); \
-	echo "OUTPUT_DIRECTORY  	= \"$(top_srcdir)/doc/\"" 	>> $(DX_CONFIG_FILE); \
-	echo " " >> $(DX_CONFIG_FILE); \
-\
-	$(DX_CONF_DIR)/build						>> $(DX_CONFIG_FILE); \
-\
-	$(DX_CONF_DIR)/progress						>> $(DX_CONFIG_FILE); \
-	if test $(DEBUG) -ge 2 ; then \
-	 echo "QUIET			= \"NO\""			>> $(DX_CONFIG_FILE); \
-	else \
-	 echo "QUIET			= \"YES\""			>> $(DX_CONFIG_FILE); \
-	fi ;\
-\
-	$(DX_CONF_DIR)/input						>> $(DX_CONFIG_FILE); \
-	echo "INPUT                  	= $(DOXYGEN_INPUT)"  		>> $(DX_CONFIG_FILE); \
-\
-	$(DX_CONF_DIR)/preprocessor					>> $(DX_CONFIG_FILE); \
-	echo "INCLUDE_PATH           	= \"$(top_srcdir)\""		>> $(DX_CONFIG_FILE); \
-	echo "PREDEFINED             	= \"HAVE_CONFIG_H= \""		>> $(DX_CONFIG_FILE); \
-	\
-	$(DX_CONF_DIR)/confopts						>> $(DX_CONFIG_FILE) 
-
-doc-delete: 
-	@echo "Deleting doxygen Documentation" 
-	rm -rf $(top_srcdir)/doc/html 
-	rm -rf $(top_srcdir)/doc/latex 
-
-distclean-local: doc-delete
-	rm -f $(top_srcdir)/orxodox
-
-clean-local:  doc-delete
-
-all-local: doc
-
-.PHONY: doc doc-config doc-delete
+@DOXYGEN_TRUE@doc:
+@DOXYGEN_TRUE@	if test ! -e $(DX_CONFIG_FILE); then \
+@DOXYGEN_TRUE@	 make doc-config; \
+@DOXYGEN_TRUE@	fi
+@DOXYGEN_TRUE@	@echo "Generating doxygen Documentation"; \
+@DOXYGEN_TRUE@	$(DOXYGEN) $(DX_CONFIG_FILE)
+
+@DOXYGEN_TRUE@doc-config:
+@DOXYGEN_TRUE@	@echo "Generationg doxygen configuration File." ; \
+@DOXYGEN_TRUE@	if test -e  "$(top_srcdir)/orxodox"; then \
+@DOXYGEN_TRUE@	  echo "deleting existing Configuration File" ; \
+@DOXYGEN_TRUE@	  rm $(top_srcdir)/orxodox ; \
+@DOXYGEN_TRUE@	fi ; \
+@DOXYGEN_TRUE@	touch $(DX_CONFIG_FILE) ; \
+@DOXYGEN_TRUE@	$(DX_CONF_DIR)/project						>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo "PROJECT_NAME		= \"$(PACKAGE_NAME)\"" 		>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo "PROJECT_NUMBER	   	= \"$(PACKAGE_VERSION)\"" 	>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo "OUTPUT_DIRECTORY  	= \"$(top_srcdir)/doc/\"" 	>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo " " >> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@\
+@DOXYGEN_TRUE@	$(DX_CONF_DIR)/build						>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@\
+@DOXYGEN_TRUE@	$(DX_CONF_DIR)/progress						>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	if test $(DEBUG) -ge 2 ; then \
+@DOXYGEN_TRUE@	 echo "QUIET			= \"NO\""			>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	else \
+@DOXYGEN_TRUE@	 echo "QUIET			= \"YES\""			>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	fi ;\
+@DOXYGEN_TRUE@\
+@DOXYGEN_TRUE@	$(DX_CONF_DIR)/input						>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo "INPUT                  	= $(DOXYGEN_INPUT)"  		>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@\
+@DOXYGEN_TRUE@	$(DX_CONF_DIR)/preprocessor					>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo "INCLUDE_PATH           	= \"$(top_srcdir)\""		>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	echo "PREDEFINED             	= \"HAVE_CONFIG_H= \""		>> $(DX_CONFIG_FILE); \
+@DOXYGEN_TRUE@	\
+@DOXYGEN_TRUE@	$(DX_CONF_DIR)/confopts						>> $(DX_CONFIG_FILE) 
+
+@DOXYGEN_TRUE@doc-delete: 
+@DOXYGEN_TRUE@	@echo "Deleting doxygen Documentation" 
+@DOXYGEN_TRUE@	rm -rf $(top_srcdir)/doc/html 
+@DOXYGEN_TRUE@	rm -rf $(top_srcdir)/doc/latex 
+
+@DOXYGEN_TRUE@distclean-local: doc-delete
+@DOXYGEN_TRUE@	rm -f $(top_srcdir)/orxodox
+
+@DOXYGEN_TRUE@clean-local:  doc-delete
+
+@DOXYGEN_TRUE@all-local: doc
+
+@DOXYGEN_TRUE@.PHONY: doc doc-config doc-delete
 
 # Local Variables:
Index: orxonox/trunk/configure
===================================================================
--- orxonox/trunk/configure	(revision 3218)
+++ orxonox/trunk/configure	(revision 3219)
@@ -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 CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_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 CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -3868,5 +3868,4 @@
 
 
-
 ## GTK-disabled
 echo "$as_me:$LINENO: checking if gtk should be enabled" >&5
@@ -3902,4 +3901,57 @@
   echo "no"
 fi
+
+
+## PROGRAMM CHECKING
+# checking for Doxygen
+# Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_DOXYGEN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $DOXYGEN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+DOXYGEN=$ac_cv_path_DOXYGEN
+
+if test -n "$DOXYGEN"; then
+  echo "$as_me:$LINENO: result: $DOXYGEN" >&5
+echo "${ECHO_T}$DOXYGEN" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+if test $DOXYGEN; then
+  DOXYGEN_TRUE=
+  DOXYGEN_FALSE='#'
+else
+  DOXYGEN_TRUE='#'
+  DOXYGEN_FALSE=
+fi
+
 
 ### CHECKING FOR SYSTEM ###
@@ -7606,4 +7658,11 @@
 Usually this means the macro was only invoked conditionally." >&5
 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${DOXYGEN_TRUE}" && test -z "${DOXYGEN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"DOXYGEN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"DOXYGEN\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
@@ -8209,4 +8268,7 @@
 s,@EGREP@,$EGREP,;t t
 s,@DEBUG@,$DEBUG,;t t
+s,@DOXYGEN@,$DOXYGEN,;t t
+s,@DOXYGEN_TRUE@,$DOXYGEN_TRUE,;t t
+s,@DOXYGEN_FALSE@,$DOXYGEN_FALSE,;t t
 s,@MSBITFIELDS@,$MSBITFIELDS,;t t
 s,@GTK2_LIBS@,$GTK2_LIBS,;t t
Index: orxonox/trunk/configure.ac
===================================================================
--- orxonox/trunk/configure.ac	(revision 3218)
+++ orxonox/trunk/configure.ac	(revision 3219)
@@ -43,5 +43,4 @@
 
 AC_SUBST(DEBUG)
-
 
 ## GTK-disabled
@@ -69,4 +68,10 @@
 fi
 
+
+## PROGRAMM CHECKING
+# checking for Doxygen
+AC_PATH_PROG(DOXYGEN, doxygen)
+AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
+
 ### CHECKING FOR SYSTEM ###
 
Index: orxonox/trunk/doc/documentation.am
===================================================================
--- orxonox/trunk/doc/documentation.am	(revision 3218)
+++ orxonox/trunk/doc/documentation.am	(revision 3219)
@@ -7,5 +7,5 @@
 	fi
 	@echo "Generating doxygen Documentation"; \
-	doxygen $(DX_CONFIG_FILE)
+	$(DOXYGEN) $(DX_CONFIG_FILE)
 
 doc-config:
Index: orxonox/trunk/src/Makefile.in
===================================================================
--- orxonox/trunk/src/Makefile.in	(revision 3218)
+++ orxonox/trunk/src/Makefile.in	(revision 3219)
@@ -117,4 +117,7 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: orxonox/trunk/src/console/Makefile.in
===================================================================
--- orxonox/trunk/src/console/Makefile.in	(revision 3218)
+++ orxonox/trunk/src/console/Makefile.in	(revision 3219)
@@ -94,4 +94,7 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: orxonox/trunk/src/gui/Makefile.in
===================================================================
--- orxonox/trunk/src/gui/Makefile.in	(revision 3218)
+++ orxonox/trunk/src/gui/Makefile.in	(revision 3219)
@@ -101,4 +101,7 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: orxonox/trunk/src/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/importer/Makefile.in	(revision 3218)
+++ orxonox/trunk/src/importer/Makefile.in	(revision 3219)
@@ -95,4 +95,7 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
