aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Schiffler <joeschiffler3@gmail.com>2024-12-16 16:19:50 -0500
committerAlexander Strasser <eclipse7@gmx.net>2025-01-02 09:23:00 +0100
commit0457aaf0d3a05331dc599bea573809fd0317c624 (patch)
tree6f5267b7b57fc3691e21d52cd049fc3a3d4f4c6a
parent041a6c36142f89addf2bc850f5bd27a089d900f5 (diff)
downloadffmpeg-0457aaf0d3a05331dc599bea573809fd0317c624.tar.gz
configure: Include quotes around pkg_version
In some MSYS environments it can happen that the 3 argument syntax for pkg-config library specifications fails because somehow the expansion of pkg_version ends up with a redirection we guess. To avoid failures like in the referenced build[2], we quote it so the whole module including operators will be expanded into a single shell word and the single argument syntax for specifying the library for pkg-config will be used. The single argument syntax seems to be supported by the original pkg-config from the beginning more than 20 years[3]. In the pkgconf implementation single argument syntax was supported pretty much from the beginning as well. The multiple argument syntax we used until this change, was not supported until a change[4] more than 10 years ago. References ---------- 1. Build passing with quotes: https://github.com/JoeSchiff/pyav-ffmpeg/actions/runs/12358403929 2. Build failing without quotes: https://github.com/JoeSchiff/pyav-ffmpeg/actions/runs/12360472377 3. Earliest commit of the current pkg-config Git repo already mentions the single argument syntax: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/2ac96cbcc708d8945329fd1b2001386e1c895c64#124c0becfe68b1ef671f49ed2b9d24779ace126f_0_162 4. pkgconf gets support for 3 argument syntax (pkgconf --exists liba = 1.2.3): https://github.com/pkgconf/pkgconf/commit/793de6a06ca52fbfe906a269b5f2b2ba41739517 Commit-message-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Joe Schiffler <joeschiffler3@gmail.com> Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
-rwxr-xr-xconfigure4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index 6c1829ab8e..d078dc1221 100755
--- a/configure
+++ b/configure
@@ -1522,7 +1522,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)
@@ -1542,7 +1542,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)