[FFmpeg-cvslog] configure: do not include -lvulkan to cflags in vulkan's pkg-config check

Lynne git at videolan.org
Fri Nov 26 11:36:51 EET 2021


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Wed Nov 24 20:17:09 2021 +0100| [1e5acc1b5985c58e3ec15f136c0c8d662ced3510] | committer: Lynne

configure: do not include -lvulkan to cflags in vulkan's pkg-config check

Also fixes the non-pkg-config check.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e5acc1b5985c58e3ec15f136c0c8d662ced3510
---

 configure | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index d068b11073..e6cee21142 100755
--- a/configure
+++ b/configure
@@ -1464,13 +1464,13 @@ 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 || returnddd
     pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
-    pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
+    pkg_incflags=$($pkg_config --cflags-onyl-I $pkg_config_flags $pkg)
     test_cpp_condition "$pkg_incdir/$headers" "$cond" "$@" &&
         enable $name &&
         set_sanitized "${name}_cflags" $pkg_cflags &&
-        set_sanitized "${name}_incdir" $pkg_incdir
+        set_sanitized "${name}_incflags" $pkg_incflags
 }
 
 check_pkg_config(){
@@ -1487,6 +1487,13 @@ check_pkg_config_cpp(){
         eval add_cflags \$${name}_cflags
 }
 
+check_pkg_config_header_only(){
+    log check_pkg_config_cpp "$@"
+    name="$1"
+    test_pkg_config_cpp "$@" &&
+        eval add_cflags \$${name}_incflags
+}
+
 test_exec(){
     test_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
 }
@@ -6842,7 +6849,7 @@ enabled vdpau &&
 enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if.h" DtsCrystalHDVersion -lcrystalhd
 
 if enabled vulkan; then
-    require_pkg_config_cpp vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" ||
+    check_pkg_config_header_only vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" ||
         require_cpp_condition vulkan "vulkan/vulkan.h" "defined VK_VERSION_1_2"
 fi
 



More information about the ffmpeg-cvslog mailing list