Merge commit '3d6135eacf3b6a82c3024620c6a28169960464a7'
authorJames Almer <jamrial@gmail.com>
Sun, 9 Apr 2017 17:51:31 +0000 (14:51 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 9 Apr 2017 17:51:31 +0000 (14:51 -0300)
* commit '3d6135eacf3b6a82c3024620c6a28169960464a7':
  configure: Simplify OMX check

Merged-by: James Almer <jamrial@gmail.com>
1  2 
configure

diff --cc configure
+++ b/configure
@@@ -2709,8 -2186,11 +2709,9 @@@ wmv3_vaapi_hwaccel_select="vc1_vaapi_hw
  wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
  
  # hardware-accelerated codecs
 -nvenc_deps_any="dlopen LoadLibrary"
 -nvenc_extralibs='$ldl'
  omx_deps="dlopen pthreads"
  omx_extralibs='$ldl'
+ omx_rpi_select="omx"
  qsvdec_select="qsv"
  qsvenc_select="qsv"
  vaapi_encode_deps="vaapi"
@@@ -5877,32 -4689,13 +5878,30 @@@ enabled mmal              && { check_li
                                   check_lib interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
                                 die "ERROR: mmal not found" &&
                                 check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
- enabled omx_rpi && enable omx
- enabled omx               && { check_header OMX_Core.h ||
-                                 { ! enabled cross_compile && enabled omx_rpi && {
-                                     add_cflags -isystem/opt/vc/include/IL ; }
-                                 check_header OMX_Core.h ; } ||
 +enabled netcdf            && require_pkg_config netcdf netcdf.h nc_inq_libvers
 +enabled openal            && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
 +                               check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
 +                               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            && { check_lib OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
 +                               check_lib 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 opengl            && { check_lib GL/glx.h glXGetProcAddress "-lGL" ||
 +                               check_lib windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
 +                               check_lib OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
 +                               check_lib ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
 +                               die "ERROR: opengl not found."
 +                             }
+ enabled omx_rpi           && { check_header OMX_Core.h ||
+                                { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_header OMX_Core.h ; } ||
                                 die "ERROR: OpenMAX IL headers not found"; }
 -enabled openssl           && { { check_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
 -                                 check_pkg_config openssl openssl/ssl.h SSL_library_init; } && {
 -                               add_cflags $openssl_cflags && add_extralibs $openssl_libs; }||
+ enabled omx               && { check_header OMX_Core.h || die "ERROR: OpenMAX IL headers not found"; }
 +enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
 +                               use_pkg_config openssl openssl/ssl.h SSL_library_init ||
                                 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 ||