--- a/src/configure.ac
+++ b/src/configure.ac
@@ -442,11 +442,16 @@
   qmakevers="`${QMAKE} --version 2>&1`"
   #echo "qmake version: $qmakevers"
   v4=`expr "$qmakevers" : '.*Qt[ ][ ]*version[ ][ ]*4.*'`
-  if test X$v4 = X0 ; then 
+  v5=`expr "$qmakevers" : '.*Qt[ ][ ]*version[ ][ ]*5.*'`
+  if test X$v4 = X0 -a X$v5 = X0; then 
      AC_MSG_ERROR([qmake seems to be using Qt version 3 which is not supported any more])
      QTGUI=qtgui
   else
-    AC_MSG_NOTICE([using qt version 4 user interface])
+    if test X$v4 != X0 ; then
+       AC_MSG_NOTICE([using qt version 4 user interface])
+    else
+       AC_MSG_NOTICE([using qt version 5 user interface])
+    fi
     QTGUI=qtgui
   fi