diff options
author | highgod0401 <highgod0401@gmail.com> | 2013-04-28 11:03:24 +0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-28 23:42:58 +0200 |
commit | df9117921ac3fea7552a20c66b1cfd5967a9f345 (patch) | |
tree | b1fd1b98d231a0e9b8d3fe5b2484731b174eafa2 | |
parent | cb23b06e5e263663b20d6c1231ee1d86e6c54617 (diff) | |
download | ffmpeg-df9117921ac3fea7552a20c66b1cfd5967a9f345.tar.gz |
lavu/opencl: add check version and platform
Reviewed-by: Hanspeter Niederstrasser <niederstrasser@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | libavutil/opencl.h | 6 |
2 files changed, 13 insertions, 2 deletions
@@ -1408,6 +1408,7 @@ HAVE_LIST=" attribute_packed cdio_paranoia_h cdio_paranoia_paranoia_h + cl_cl_h clock_gettime closesocket cmov @@ -3894,6 +3895,7 @@ check_func_headers windows.h Sleep check_func_headers windows.h VirtualAlloc check_func_headers glob.h glob +check_header cl/cl.h check_header direct.h check_header dlfcn.h check_header dxva.h @@ -4041,7 +4043,12 @@ enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32 die "ERROR: openal not found"; } && { check_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 && require2 opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL +enabled opencl && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || + check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL || + die "ERROR: opencl not found"; } && + { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || + check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || + die "ERROR: opencl must be installed and version must be 1.2 or compatible"; } enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || diff --git a/libavutil/opencl.h b/libavutil/opencl.h index acafe36ad6..96a3086b74 100644 --- a/libavutil/opencl.h +++ b/libavutil/opencl.h @@ -31,8 +31,12 @@ #ifndef LIBAVUTIL_OPENCL_H #define LIBAVUTIL_OPENCL_H -#include <CL/cl.h> #include "config.h" +#if HAVE_CL_CL_H +#include <CL/cl.h> +#else +#include <OpenCL/cl.h> +#endif #include "dict.h" #define AV_OPENCL_KERNEL( ... )# __VA_ARGS__ |