[Bug 751068] gl: Use pkg-config if found to configure GL/EGL/GLES (as provided by mesa and libmali)

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Nov 13 02:20:39 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=751068

--- Comment #6 from Daniel Stone <daniel at fooishbar.org> ---
I don't think the CFLAGS/LIBS argument is valid, because on those grounds why
would we bother ever transitioning any package to pkg-config? Yes, you will
have to retain the old header/lib checks, but it means that people installing
Mesa (or newer versions of some other implementations) can have things just
work as expected. It also matches the behaviour of Weston, Cogl, and others.

As far as the header 'fix' goes, unfortunately that's not ever going to happen
for various unpleasant reasons. Firstly, let's be clear that it _only_ occurs
on systems without X11 headers installed.

Secondly, the core EGL headers come from Khronos, and part of their
behaviour/API is that on Unix-based platforms, they include Xlib.h, so they can
define EGLNativeDisplayType as Display *, EGLNativeWindowType as Window, etc.
Obviously this is a bad idea - the forest of #ifdef in eglplatform.h tells you
as much. EGL_EXT_platform_base resolves that madness, but we'll continue to
have this issue for as long as the classic EGL API is supported, i.e. forever.

At one point we did look at generating eglplatform.h to automagically work
around the #include issue, but we concluded that would just break other naïve
apps, as well as introduce a build failure mode which only existed on Mesa and
nowhere else.

So the best solution from a very very bad bunch was to introduce a #define
which would allow you to build without X11 headers, and to put that in the
pkg-config file so that apps who didn't particularly care would get the best
possible chance of working if they just used pkg-config.

Alternative suggestions are welcome, but I'm really having trouble seeing the
downside.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list