Index: /trunk/configure
===================================================================
--- /trunk/configure	(revision 57937)
+++ /trunk/configure	(revision 57938)
@@ -1516,8 +1516,10 @@
           INCQT4=`strip_I "$FLGQT4"`
           LIBQT4=`PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 pkg-config QtCore --libs`
-          foundqt4=3 # pkg-config
           TOOLQT4=`pkg-config QtCore --variable=prefix`
           TOOLQT4MOC="`pkg-config QtCore --variable=moc_location`"
           TOOLQT4BIN="`dirname $TOOLQT4MOC`"
+          if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
+            test_execute_path "`strip_L "$LIBQT4"`" nofatal && foundqt4=3 # pkg-config
+          fi
         fi
       else
@@ -1606,7 +1608,7 @@
             QT4BINSUFF=""
           fi
-          moc_ver=`$TOOLQT4/bin/moc-$QT4BINSUFF -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
+          moc_ver=`$TOOLQT4/bin/moc$QT4BINSUFF -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
           if [ $? -ne 0 ]; then
-            log_failure "moc-$QT4BINSUFF not working"
+            log_failure "moc$QT4BINSUFF not working"
             fail
           else
