configure.ac EGL checks clobber user EGL_LIBS/EGL_CFLAGS
Submitted by Alistair Buxton
If configure.ac finds EGL it sets EGL_CFLAGS to empty, and sets EGL_LIBS to a fixed string:
Then later it sets GL_CLFAGS and GL_LIBS to empty:
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:
Note that the Mali EGL detection branch does the same thing.