--- subversion-1.10.3/build/ac-macros/kwallet.m4        2018-10-24 11:50:47.000000000 -0700
+++ subversion-1.10.3/build/ac-macros/kwallet.m4        2018-10-24 11:55:37.000000000 -0700
@@ -45,7 +45,8 @@
           if test -n "$PKG_CONFIG"; then
             if test "$HAVE_DBUS" = "yes"; then
+              AC_CHECK_PROG(KF5_CHECK,kf5-config,yes)
               AC_MSG_CHECKING([for Qt])
-              if $PKG_CONFIG --exists Qt5Core Qt5DBus Qt5Gui; then
+              if test x"$KF5_CHECK" = x"yes" && $PKG_CONFIG --exists Qt5Core Qt5DBus Qt5Gui ; then
                 AC_MSG_RESULT([yes, Qt5])
                 qt_pkg_config_names="Qt5Core Qt5DBus Qt5Gui"
                 kde_config_name="kf5-config"
