Index: /orxonox/trunk/Makefile.in
===================================================================
--- /orxonox/trunk/Makefile.in	(revision 4129)
+++ /orxonox/trunk/Makefile.in	(revision 4130)
@@ -129,4 +129,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/configure
===================================================================
--- /orxonox/trunk/configure	(revision 4129)
+++ /orxonox/trunk/configure	(revision 4130)
@@ -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 RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_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 RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF PKG_CONFIG MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -4216,4 +4216,50 @@
 
 
+#-------------------------#
+# checking for pkg-config #
+#-------------------------#
+if test x$def_gtk = xyes; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; 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_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_PKG_CONFIG="$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
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+
+
 #########################
 ## CHECKING FOR SYSTEM ##
@@ -6674,13 +6720,12 @@
 #-----#
 if test x$def_gtk = xyes; 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
+	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`
+		GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
+		GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
 
 cat >>confdefs.h <<_ACEOF
@@ -6688,4 +6733,8 @@
 _ACEOF
 
+		if test $DEBUG -ge 3; then
+		 echo "cflags: $GTK2_CFLAGS"
+		 echo "libs: $GTK2_LIBS"
+		fi
 	else
 		echo "no"
@@ -8671,4 +8720,5 @@
 s,@DOXYGEN_FALSE@,$DOXYGEN_FALSE,;t t
 s,@GPROF@,$GPROF,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
 s,@MSBITFIELDS@,$MSBITFIELDS,;t t
 s,@GTK2_LIBS@,$GTK2_LIBS,;t t
Index: /orxonox/trunk/configure.ac
===================================================================
--- /orxonox/trunk/configure.ac	(revision 4129)
+++ /orxonox/trunk/configure.ac	(revision 4130)
@@ -192,4 +192,12 @@
 AC_PATH_PROG(GPROF, gprof)
 
+#-------------------------#
+# checking for pkg-config #
+#-------------------------#
+if test x$def_gtk = xyes; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config)
+fi
+
+
 #########################
 ## CHECKING FOR SYSTEM ##
@@ -435,13 +443,16 @@
 #-----#
 if test x$def_gtk = xyes; 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
+	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`
+		GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
+		GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
 		AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
+		if test $DEBUG -ge 3; then
+		 echo "cflags: $GTK2_CFLAGS"
+		 echo "libs: $GTK2_LIBS"
+		fi
 	else
 		echo "no"
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/Makefile.in	(revision 4130)
@@ -219,4 +219,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/lib/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/lib/Makefile.in	(revision 4130)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/lib/graphics/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/graphics/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/lib/graphics/Makefile.in	(revision 4130)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/lib/graphics/importer/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/lib/graphics/importer/Makefile.in	(revision 4130)
@@ -143,4 +143,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/lib/gui/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/gui/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/lib/gui/Makefile.in	(revision 4130)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/lib/gui/console/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/gui/console/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/lib/gui/console/Makefile.in	(revision 4130)
@@ -132,4 +132,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/lib/gui/gui/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/lib/gui/gui/Makefile.in	(revision 4130)
@@ -150,4 +150,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/subprojects/Makefile.in
===================================================================
--- /orxonox/trunk/src/subprojects/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/subprojects/Makefile.in	(revision 4130)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: /orxonox/trunk/src/subprojects/testmain/Makefile.in
===================================================================
--- /orxonox/trunk/src/subprojects/testmain/Makefile.in	(revision 4129)
+++ /orxonox/trunk/src/subprojects/testmain/Makefile.in	(revision 4130)
@@ -128,4 +128,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
