configure.ac EGL checks clobber user EGL_LIBS/EGL_CFLAGS
Submitted by Alistair Buxton
Link to original bug (#770987)
Description
If configure.ac finds EGL it sets EGL_CFLAGS to empty, and sets EGL_LIBS to a fixed string:
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/configure.ac#n789
Then later it sets GL_CLFAGS and GL_LIBS to empty:
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/configure.ac#n826
And then finally it does this:
GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS"
GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS"
At this point all the variables are empty. The result of this is that if you need to specify EGL_CFLAGS/EGL_LIBS to make EGL work, then your options will not be passed through to the actual compile.
This is for example the reason why you need to put loads of stuff into LDFLAGS, CFLAGS, CPPFLAGS when building on the raspberry pi as in this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=740530
Note that the Mali EGL detection branch does the same thing.