diff mbox

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

Message ID 1527995724-23698-4-git-send-email-mypopydev@gmail.com
State Accepted
Commit 3769aafb7c9a1fdcd1c9099a8ed7ba1d876c0693
Headers show

Commit Message

Jun Zhao June 3, 2018, 3:15 a.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(-)

Comments

Mark Thompson June 3, 2018, 5:53 p.m. UTC | #1
On 03/06/18 04:15, Jun Zhao wrote:
> 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 --git a/configure b/configure
> index 22eeca2..ede32eb 100755
> --- a/configure
> +++ b/configure
> @@ -6128,7 +6128,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)" ||
> 

Probably fine - what implementation(s) are you testing with here?

(The official ICD loader not supporting pkg-config is kindof unfortunate.)

Thanks,

- Mark
mypopy@gmail.com June 4, 2018, 12:49 a.m. UTC | #2
2018-06-04 1:53 GMT+08:00 Mark Thompson <sw@jkqxz.net>:
>
> On 03/06/18 04:15, Jun Zhao wrote:
> > 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 --git a/configure b/configure
> > index 22eeca2..ede32eb 100755
> > --- a/configure
> > +++ b/configure
> > @@ -6128,7 +6128,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)" ||
> >
>
> Probably fine - what implementation(s) are you testing with here?
>
> (The official ICD loader not supporting pkg-config is kindof unfortunate.)
>
> Thanks,

I used the  intel-opencl-r5.0 (SRB5.0) Linux driver package from
https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver.
BTW: I fix a minor issue in the SRB5.0 pkg-config pc file, about
install docs, you can find in
http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_intel-opencl-installation.pdf
>
>
> - Mark
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/configure b/configure
index 22eeca2..ede32eb 100755
--- a/configure
+++ b/configure
@@ -6128,7 +6128,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)" ||