diff mbox

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

Message ID 1527909663-18854-3-git-send-email-mypopydev@gmail.com
State Superseded
Headers show

Commit Message

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

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

Comments

James Almer June 2, 2018, 4:16 a.m. UTC | #1
On 6/2/2018 12:21 AM, Jun Zhao wrote:
> add pkg-config support for opencl check.
> 
> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> ---
>  configure | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure b/configure
> index 22eeca2..69b8827 100755
> --- a/configure
> +++ b/configure
> @@ -6130,6 +6130,7 @@ enabled openal            && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal"
>                                 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 ||
>                                 check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
> +                               check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||

This should go before the check_lib() one, and the "-lOpenCL" is
superfluous as pkg-config is meant to provide it.

>                                 die "ERROR: opencl not found"; } &&
>                               { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
>                                 test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
>
diff mbox

Patch

diff --git a/configure b/configure
index 22eeca2..69b8827 100755
--- a/configure
+++ b/configure
@@ -6130,6 +6130,7 @@  enabled openal            && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal"
                                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 ||
                                check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
+                               check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
                                die "ERROR: opencl not found"; } &&
                              { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
                                test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||