]> git.sesse.net Git - ffmpeg/commitdiff
configure: fix --enable-omx compile on raspberry pi
authorAman Gupta <aman@tmm1.net>
Thu, 29 Aug 2019 15:44:45 +0000 (08:44 -0700)
committerAman Gupta <aman@tmm1.net>
Thu, 29 Aug 2019 15:52:37 +0000 (08:52 -0700)
Many ffmpeg + rpi compilation guides on the internet recommend
using `./configure --enable-omx --enable-omx-rpi`. This fails
to find the IL OMX headers on device because the omx require_headers
check happens first before the add_cflags in omx_rpi.

A workaround is to use `./configure --enable-omx-rpi` only, since
omx_rpi already implies omx. But because many users expect to use
existing scripts and commands, we swap the order here so omx_rpi
special cases are applied first.

In the past this wasn't an issue because users noticed the OMX_Core.h
missing error and installed libomxil-bellagio-dev. But since
76c82843ccad1, the rpi specific headers from /opt/vc/include/IL
are required.

Signed-off-by: Aman Gupta <aman@tmm1.net>
configure

index 51dc77c7800b0edbc047474e6ed67ab014aa3d61..691ae9bd4f5b40e9d2cb48aa537cd05ea37f5101 100755 (executable)
--- a/configure
+++ b/configure
@@ -6358,10 +6358,10 @@ enabled opengl            && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL
                                check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
                                die "ERROR: opengl not found."
                              }
-enabled omx               && require_headers OMX_Core.h
 enabled omx_rpi           && { check_headers OMX_Core.h ||
                                { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_headers OMX_Core.h ; } ||
                                die "ERROR: OpenMAX IL headers not found"; } && enable omx
+enabled omx               && require_headers OMX_Core.h
 enabled openssl           && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
                                check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||