diff mbox

[FFmpeg-devel,v4,3/4] configure: fix check for opencl

Message ID 1528208486-2362-4-git-send-email-mypopydev@gmail.com
State New
Headers show

Commit Message

Jun Zhao June 5, 2018, 2:21 p.m. UTC
add pkg-config support for opencl check.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/configure b/configure
index 53224f0..aaf7b02 100755
--- a/configure
+++ b/configure
@@ -6135,7 +6135,8 @@  enabled openal            && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal"
                                die "ERROR: openal not found"; } &&
                              { test_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" ||
                                die "ERROR: openal must be installed and version must be 1.1 or compatible"; }
-enabled opencl            && { check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
+enabled opencl            && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
+                               check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
                                check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
                                die "ERROR: opencl not found"; } &&
                              { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||