--- a/m4/ax_path_qmake4.m4
+++ b/m4/ax_path_qmake4.m4
@@ -23,10 +23,10 @@
 #   the copyright notice and this notice are preserved.
 
 AC_DEFUN([AX_PATH_QMAKE4], [
-  ax_guessed_qt4_dirs="/usr/lib/qt4/bin:/usr/local/lib/qt4/bin:/usr/qt4/bin:/usr/local/qt4/bin:${QT4DIR}/bin:${QTDIR}/bin"
+  ax_guessed_qt4_dirs="${QT4DIR}/bin:${QTDIR}/bin"
   AC_PROG_EGREP
-  AC_PATH_PROGS(_QMAKE4, [qmake-qt4 qmake4], [], ["$PATH:$ax_guessed_qt4_dirs"])
-  AC_PATH_PROGS(_QMAKE, [qmake], [], ["$PATH:$ax_guessed_qt4_dirs"])
+  AC_PATH_PROGS(_QMAKE4, [qmake-qt4 qmake4], [], ["$ax_guessed_qt4_dirs:$PATH"])
+  AC_PATH_PROGS(_QMAKE, [qmake], [], ["$ax_guessed_qt4_dirs:$PATH"])
 
   AC_CACHE_CHECK([for Qt4 version of qmake], ax_cv_path_QMAKE4, [
     ax_cv_path_QMAKE4=no
