--- foo/dbus-0.36.2/configure.in	2005-08-29 20:13:16.000000000 +0100
+++ dbus-0.36.2/configure.in	2005-10-09 12:18:12.000000000 +0100
@@ -943,22 +943,41 @@
        fi
     done
 fi
+
+
 if test x"$have_qt" = x"yes"; then
-   AC_MSG_RESULT([found])
+    AC_MSG_RESULT([found])
+    have_qt=no
+
+    AC_MSG_CHECKING([for libqt-mt.la])
+    if test -n "$QTDIR" -a -f "$QTDIR/lib/libqt-mt.la"; then
+        have_qt=yes
+        DBUS_QT_LIBS="$QTDIR/lib"
+    else
+        for dir in "/usr/lib" "${prefix}/lib/qt" "/usr/lib/qt-3.1" "/usr/lib/qt3" "/usr/lib/qt" "/usr/lib/qt/lib" "/usr/lib/qt-3.1/lib"; do
+            if test -f "$dir/libqt-mt.la"; then
+                have_qt=yes
+                DBUS_QT_LIBS="$dir"
+           fi
+        done
+    fi
+
+    if test x"$have_qt" = x"yes"; then
+        AC_MSG_RESULT([found])
+    else
+        AC_MSG_RESULT([not found])
+    fi
+
 else
-   AC_MSG_RESULT([not found])
+    AC_MSG_RESULT([not found])
 fi
 
+
 dnl linking to kdecore will give us a bit of help from libtool
 if (! kde-config >& /dev/null); then
     have_qt=no
 else
-    kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
-    if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
-        have_qt=no
-    else
-        DBUS_QT_LIBS="$kdelibs/libkdecore.la"
-    fi
+    DBUS_QT_LIBS="$DBUS_QT_LIBS/libqt-mt.la"
 fi
 
 if test x$have_qt = xno ; then
