[vlc-devel] [PATCH] fix searching for native qt5 progs on cygwin and msys2

Martell Malone martellmalone at gmail.com
Tue Nov 4 13:48:53 CET 2014

Myself and jb had discussed a patch over email last month where to find the
qt programs I had to change AC_PATH_PROGS to AC_PATH_PROG to successfully
find the qt programs on windows. jb quickly pointed out that this was wrong
and after a quick lookup I saw that he was correct it should remain as

So it took some time to figure out but

The reason for the issue is that on windows if there is a space in the path
or if the program is prepends with .exe and we specify the search PATH
in AC_PATH_PROGS we must enclose them in quotes or the program will not be

For future reference.
If anyone uses AC_PATH_PROGS please enclose defined search paths (if you
have any) in quotes

Can someone test this on other platforms and report on any breakages.
I don't expect any.

>From d159aa321cd047e0e6b79e57d7221e253c25f59d Mon Sep 17 00:00:00 2001
From: martell <martellmalone at gmail.com>
Date: Tue, 4 Nov 2014 12:39:16 +0000
Subject: [PATCH] Fix AC_PATH_PROGS for cygwin and msys2

 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 319df97..620d49a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3798,9 +3798,9 @@ AS_IF([test "${enable_qt}" != "no"], [
       QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
       QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
-      AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, [${QT_HOST_PATH}
${QT_PATH}/bin ${CONTRIB_DIR}/bin])
-      AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, [${QT_HOST_PATH}
${QT_PATH}/bin ${CONTRIB_DIR}/bin])
-      AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, [${QT_HOST_PATH}
${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+      AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}"
"${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+      AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}"
"${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+      AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}"
"${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
     ], [
       PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
         AS_IF([test -n "${enable_qt}"],[
@@ -3811,9 +3811,9 @@ AS_IF([test "${enable_qt}" != "no"], [
       QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
-      AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, [${QT_PATH}/bin
+      AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin"
       AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
-      AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, [${QT_PATH}/bin
+      AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin"
 AS_IF([test "${enable_qt}" != "no"], [
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141104/2f6b3390/attachment.html>

More information about the vlc-devel mailing list