[FFmpeg-devel] [PATCH] configure: Include quotes around pkg_version

Joe Schiffler joeschiffler3 at gmail.com
Mon Dec 16 23:19:50 EET 2024


Since $pkg_version includes spaces, builds can fail in some MSYS environments.

Build passing with quotes:
https://github.com/JoeSchiff/pyav-ffmpeg/actions/runs/12358403929

Build failing without quotes:
https://github.com/JoeSchiff/pyav-ffmpeg/actions/runs/12360472377

Signed-off-by: Joe Schiffler <joeschiffler3 at gmail.com>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index bf55ba67fa..bb1263a8ce 100755
--- a/configure
+++ b/configure
@@ -1521,7 +1521,7 @@ test_pkg_config(){
     funcs="$4"
     shift 4
     disable $name
-    test_cmd $pkg_config --exists --print-errors $pkg_version || return
+    test_cmd $pkg_config --exists --print-errors "$pkg_version" || return
     pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
     pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
     pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
@@ -1541,7 +1541,7 @@ test_pkg_config_cpp(){
     cond="$4"
     shift 4
     disable $name
-    test_cmd $pkg_config --exists --print-errors $pkg_version || return
+    test_cmd $pkg_config --exists --print-errors "$pkg_version" || return
     pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
     pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
     pkg_incflags=$($pkg_config --cflags-only-I $pkg_config_flags $pkg)
-- 
2.43.0



More information about the ffmpeg-devel mailing list