--- src/onfigure.ac.orig	2006-07-12 14:23:16.000000000 +0200
+++ src/configure.ac	2006-07-12 14:27:08.000000000 +0200
@@ -481,11 +481,15 @@
 SOC_LIBS=""
 SOC_LOADER="dxmainc.c"
 if test "x$enable_gtk" != "xno"; then
-	AC_PATH_PROG(GTKCONFIG, gtk-config)
-	if test "x$GTKCONFIG" != x; then
-		SOC_LOADER="dxmain.c"
-		SOC_CFLAGS="`$GTKCONFIG --cflags`"
-		SOC_LIBS="`$GTKCONFIG --libs`"
+	AC_PATH_PROG(PKGCONFIG, pkg-config)
+
+	if test "x$PKGCONFIG" != x; then
+		AC_MSG_CHECKING(for fontconfig)
+		if $PKGCONFIG --exists gtk+-2.0; then
+			SOC_LOADER="dxmain.c"
+			SOC_CFLAGS="`$PKGCONFIG gtk+-2.0 --cflags`"
+			SOC_LIBS="`$PKGCONFIG gtk+-2.0 --libs`"
+		fi
 	fi
 fi
 AC_SUBST(SOC_CFLAGS)
