diff mbox series

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

Message ID MpINnWz--3-2@lynne.ee
State Accepted
Commit 1e5acc1b5985c58e3ec15f136c0c8d662ced3510
Headers show
Series [FFmpeg-devel] configure: do not include -lvulkan in vulkan's pkg-config check | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Lynne Nov. 24, 2021, 7:19 p.m. UTC
Also fixes the non-pkg-config check.

Patch attached.
Subject: [PATCH] configure: do not include -lvulkan in vulkan's pkg-config
 check

Also fixes the non-pkg-config check.
---
 configure | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Comments

Lynne Nov. 25, 2021, 4:55 p.m. UTC | #1
24 Nov 2021, 20:19 by dev@lynne.ee:

> Also fixes the non-pkg-config check.
>
> Patch attached.
>

Ping.
diff mbox series

Patch

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